Files
libreevent/src/server/backend/plugins/others/poll/html/settings.html

108 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Settings - Polls :: libreevent-plugin</title>
<link rel="stylesheet" href="/polls/css/style.css">
<link rel="stylesheet" href="/polls/css/popup.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<style>
.material-symbols-outlined {
font-variation-settings:
'FILL' 0,
'wght' 400,
'GRAD' 0,
'opsz' 24
}
.voting-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
}
.voting {
border-radius: 500px;
border: 1px black solid;
font-size: 150%;
cursor: pointer;
}
.voting-counter {
margin: 0;
font-size: 150%;
margin-left: 10px;
margin-right: 10px;
}
body {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.content {
justify-content: flex-start;
}
.input {
width: 30vw;
padding: 20px;
border-radius: 20px;
border: none;
margin-bottom: 1vh;
margin-top: 5px;
}
.poll {
border: black 2px solid;
padding: 1% 10%;
}
.selected {
background-color: green;
}
</style>
</head>
<body>
<div class="content" id="app">
<h1>Polls plugin - Settings</h1>
<div style="margin-bottom: 1%;">
<a href="/admin/plugins">Back to the admin panel</a><br>
<button @click="addPoll();">Add new poll</button>
</div>
<div v-for="poll in polls" class="poll">
<h3>{{ poll.display }}</h3>
<p>{{ poll.comment }}</p>
<button @click="editPoll( poll.id )">Edit</button>
</div>
<div id="popup">
<div class="popup-positioning">
<div class="popup-main">
<form id="popup-message">
<h2 style="font-size: 200%;">{{ operation }} poll</h2>
<label for="title">Poll title</label><br>
<input type="text" v-model="newPoll.display" name="title" id="title" class="input"><br>
<label for="id">Poll id</label><br>
<input type="text" v-model="newPoll.id" name="id" id="id" class="input"><br>
<label for="comment">Comments</label><br>
<textarea type="text" v-model="newPoll.comment" name="comment" id="comment" class="input" rows="5"></textarea><br>
<label for="id">Allow adding suggestions</label>
<input type="checkbox" v-model="newPoll.allowAdding" name="allowAdding" id="allowAdding"><br>
</form>
<button @click="save()" class="submit">Save</button>
<button @click="closePopup()" class="submit">Cancel</button>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="/polls/js/settings.js"></script>
</body>
</html>