diff options
author | Christian Hofmaier | 2020-12-03 12:58:52 +0100 |
---|---|---|
committer | Christian Hofmaier | 2020-12-03 12:58:52 +0100 |
commit | 2d49c621abeff1909b7f4c90d5273157a4f70286 (patch) | |
tree | 5bf548871469c1309f4fa9d43cfd63ec52f89a43 /modules-available/locations/templates/ajax-opening-location.html | |
parent | [statistics_reporting/statistics] Include system/runmode total counts (diff) | |
download | slx-admin-2d49c621abeff1909b7f4c90d5273157a4f70286.tar.gz slx-admin-2d49c621abeff1909b7f4c90d5273157a4f70286.tar.xz slx-admin-2d49c621abeff1909b7f4c90d5273157a4f70286.zip |
[locations] Add scheduler to openingtimes modal
- only load/safe without further functionality
- add backend to rebootcontrol
Diffstat (limited to 'modules-available/locations/templates/ajax-opening-location.html')
-rw-r--r-- | modules-available/locations/templates/ajax-opening-location.html | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/modules-available/locations/templates/ajax-opening-location.html b/modules-available/locations/templates/ajax-opening-location.html index 09fe7869..3b2ea7ae 100644 --- a/modules-available/locations/templates/ajax-opening-location.html +++ b/modules-available/locations/templates/ajax-opening-location.html @@ -124,7 +124,49 @@ </div> </div> +{{#rebootcontrol}} +<hr> +<div class="row"> + <div class="col-sm-4"> + <div class="checkbox checkbox-inline"> + <input id="wol" name="wol" class="wol" type="checkbox"> + <label for="wol">{{lang_wakeonlan}}</label> + </div> + </div> + <div class="col-sm-8"> + <input disabled type="number" id="wol-offset" name="wol-offset" class="wol-offset" value="{{wol-options.wol-offset}}" placeholder="0" min="0" max="15"> + <label for="wol-offset">{{lang_offsetEarly}}</label> + </div> + <div class="col-sm-4"> + <div class="checkbox checkbox-inline"> + <input id="sd" name="sd" class="sd" type="checkbox"> + <label for="sd">{{lang_shutdown}}</label> + </div> + </div> + <div class="col-sm-8"> + <input disabled type="number" id="sd-offset" name="sd-offset" class="sd-offset" value="{{sd-options.sd-offset}}" placeholder="0" min="0" max="15"> + <label for="sd-offset">{{lang_offsetLate}}</label> + </div> +</div> +{{/rebootcontrol}} + <script type="application/javascript"><!-- + let wol = $('#wol'); + let sd = $('#sd'); + + wol.attr('checked',{{wol}}); + sd.attr('checked',{{sd}}); + $('#wol-offset').attr('disabled', !$('#wol').is(':checked')); + $('#sd-offset').attr('disabled', !$('#sd').is(':checked')); + + wol.on('click', function(){ + $('#wol-offset').attr('disabled', !$(this).is(':checked')); + }); + + sd.on('click', function(){ + $('#sd-offset').attr('disabled', !$(this).is(':checked')); + }); + (function() { var scheduleData = {{{schedule_data}}}; @@ -167,7 +209,6 @@ $('#simple-mode').remove(); $('#expert-mode').show(); }); - })(); //--></script> |