diff options
author | Simon Rettberg | 2018-02-15 13:18:56 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-02-15 13:18:56 +0100 |
commit | 5309badac125114399ec2cf39b095e0d9efcd09f (patch) | |
tree | 2ca212dc4e9271165e67af834b073c7c8590b4ce /modules-available/rebootcontrol/templates/header.html | |
parent | [inc/Permission] Add readonly string (diff) | |
download | slx-admin-5309badac125114399ec2cf39b095e0d9efcd09f.tar.gz slx-admin-5309badac125114399ec2cf39b095e0d9efcd09f.tar.xz slx-admin-5309badac125114399ec2cf39b095e0d9efcd09f.zip |
[rebootcontrol] Rewrite permission handling, simplify html/javascript
Diffstat (limited to 'modules-available/rebootcontrol/templates/header.html')
-rw-r--r-- | modules-available/rebootcontrol/templates/header.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/modules-available/rebootcontrol/templates/header.html b/modules-available/rebootcontrol/templates/header.html new file mode 100644 index 00000000..b84cb426 --- /dev/null +++ b/modules-available/rebootcontrol/templates/header.html @@ -0,0 +1,63 @@ +<div class="page-header"> + <button type="button" id="settingsButton" class="btn btn-default pull-right" data-toggle="modal" data-target="#settingsModal"><span class="glyphicon glyphicon-cog"></span> {{lang_settings}}</button> + <h1>{{lang_rebootControl}}</h1> +</div> + +<div> + <label>{{lang_location}}: + <select id="locationDropdown" class="form-control" onchange="selectLocation()"> + {{#locations}} + <option value="{{locationid}}" {{disabled}} {{#selected}}selected{{/selected}}>{{locationpad}} {{locationname}}</option> + {{/locations}} + </select> + </label> + <div class="pull-right"> + <button type="button" id="shutdownButton" class="btn btn-danger action-button" data-toggle="modal" data-target="#shutdownModal" disabled> + <span class="glyphicon glyphicon-off"></span> + {{lang_shutdownButton}} + </button> + <button type="button" id="rebootButton" class="btn btn-warning action-button" data-toggle="modal" data-target="#rebootModal" disabled> + <span class="glyphicon glyphicon-repeat"></span> + {{lang_rebootButton}} + </button> + <button type="button" id="selectAllButton" class="btn btn-primary select-button" disabled> + <span class="glyphicon glyphicon-check"></span> + {{lang_selectall}} + </button> + <button type="button" id="unselectAllButton" class="btn btn-default select-button collapse" disabled> + <span class="glyphicon glyphicon-unchecked"></span> + {{lang_unselectall}} + </button> + </div> +</div> + +<div id="settingsModal" class="modal fade" role="dialog"> + <div class="modal-dialog"> + + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h4 class="modal-title"><b>{{lang_settings}}</b></h4> + </div> + <div class="modal-body"> + <p>{{lang_pubKey}}</p> + <pre>{{pubKey}}</pre> + <p>{{lang_newKeypairExplanation}}</p> + </div> + <div class="modal-footer"> + <button {{perms.newkeypair.disabled}} class="btn btn-danger pull-right" onclick="generateNewKeypair()" type="button"><span class="glyphicon glyphicon-refresh"></span> {{lang_genNew}}</button> + </div> + </div> + </div> +</div> + +<script type="application/javascript"> + + // Change Location when selected in Dropdown Menu + function selectLocation() { + var dropdown = $("#locationDropdown"); + var location = dropdown.val(); + window.location.replace("?do=rebootcontrol&location="+location); + } + +</script>
\ No newline at end of file |