diff options
Diffstat (limited to 'modules-available/serversetup-bwlp/templates')
6 files changed, 299 insertions, 118 deletions
diff --git a/modules-available/serversetup-bwlp/templates/download.html b/modules-available/serversetup-bwlp/templates/download.html new file mode 100644 index 00000000..6752f7fc --- /dev/null +++ b/modules-available/serversetup-bwlp/templates/download.html @@ -0,0 +1,38 @@ +<div class="panel-footer"> + <div> + <div class="btn-group" role="group"> + <a class="btn btn-default" href="?do=ServerSetup&action=getimage"> + <span class="glyphicon glyphicon-download-alt"></span> + {{lang_downloadImage}} + </a> + <span class="btn btn-default" data-toggle="modal" data-target="#help-usbimg"><span class="glyphicon glyphicon-question-sign"></span></span> + </div> + </div> +</div> + +<div class="modal fade" id="help-usbimg" tabindex="-1" role="dialog"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + {{lang_usbImage}} + </div> + <div class="modal-body"> + <p>{{lang_usbImgHelp}}</p> + <p> + <b>Linux</b> + <br> + {{lang_usbImgHelpLinux}} + </p> + <p> + <b>Windows</b> + <br> + {{lang_usbImgHelpWindows}} + </p> + <p> + <a href="https://rufus.akeo.ie/#download">{{lang_downloadRufus}}</a> + </p> + </div> + </div> + </div> +</div>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp/templates/heading.html b/modules-available/serversetup-bwlp/templates/heading.html index d68360f1..e2aa0bff 100644 --- a/modules-available/serversetup-bwlp/templates/heading.html +++ b/modules-available/serversetup-bwlp/templates/heading.html @@ -1 +1,3 @@ -<h1>{{lang_moduleHeading}}</h1>
\ No newline at end of file +<div class="page-header"> + <h1>{{lang_moduleHeading}}</h1> +</div>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp/templates/ipxe-new-boot-entry.html b/modules-available/serversetup-bwlp/templates/ipxe-new-boot-entry.html new file mode 100644 index 00000000..fd9e1d72 --- /dev/null +++ b/modules-available/serversetup-bwlp/templates/ipxe-new-boot-entry.html @@ -0,0 +1,108 @@ +<h2>{{lang_newBootEntryHead}}</h2> + +<div class="panel panel-default"> + <div class="panel-heading"> + {{lang_bootEntryData}} + </div> + <div class="panel-body"> + <form method="post" action="?do=serversetup"> + <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="action" value="savebootentry"> + <input type="hidden" name="entryid" value="{{oldentryid}}"> + + <div class="form-group"> + <div class="radio"> + <input class="type-radio" type="radio" name="type" value="exec" id="type-exec" {{exec_checked}}> + <label for="type-exec">{{lang_execEntry}}</label> + </div> + <div class="radio"> + <input class="type-radio" type="radio" name="type" value="script" id="type-script" {{script_checked}}> + <label for="type-script">{{lang_scriptEntry}}</label> + </div> + </div> + + <div class="form-group"> + <label for="input-id"> + {{lang_entryId}} {{lang_idFormatHint}} + </label> + <input id="input-id" class="form-control" name="newid" value="{{entryid}}" pattern="^[a-z0-9\-_]{1,16}$" minlength="1" maxlength="16" required> + </div> + <div class="form-group"> + <label for="input-title"> + {{lang_entryTitle}} + </label> + <input id="input-title" class="form-control" name="title" value="{{title}}" maxlength="100"> + </div> + + <div class="type-form" id="form-exec"> + <div class="form-group"> + <label for="input-ex"> + {{lang_imageToLoad}} + </label> + <input id="input-ex" class="form-control" name="entry[executable]" value="{{entry.executable}}"> + </div> + <div class="form-group"> + <label for="input-rd"> + {{lang_initRd}} + </label> + <input id="input-rd" class="form-control" name="entry[initRd]" value="{{entry.initRd}}"> + </div> + <div class="form-group"> + <label for="input-cmd"> + {{lang_commandLine}} + </label> + <input id="input-cmd" class="form-control" name="entry[commandLine]" + value="{{entry.commandLine}}"> + </div> + <div class="form-group"> + <div class="checkbox checkbox-inline"> + <input id="exec-replace" class="form-control" type="checkbox" + name="entry[replace]" {{entry.replace_checked}}> + <label for="exec-replace">{{lang_execReplace}}</label> + </div> + </div> + <div class="form-group"> + <div class="checkbox checkbox-inline"> + <input id="exec-au" class="form-control" type="checkbox" + name="entry[autoUnload]" {{entry.autoUnload_checked}}> + <label for="exec-au">{{lang_execAutoUnload}}</label> + </div> + </div> + <div class="form-group"> + <div class="checkbox checkbox-inline"> + <input id="exec-reset" class="form-control" type="checkbox" + name="entry[resetConsole]" {{entry.resetConsole_checked}}> + <label for="exec-reset">{{lang_execResetConsole}}</label> + </div> + </div> + </div> + + <div class="type-form" id="form-script"> + <div class="form-group"> + <label for="script-ta"> + {{lang_scriptContent}} + </label> + <textarea id="script-ta" class="form-control" rows="10" + name="entry[script]">{{entry.script}}</textarea> + </div> + </div> + + <div class="buttonbar text-right"> + <button type="submit" class="btn btn-primary"> + <span class="glyphicon glyphicon-floppy-disk"></span> + {{lang_save}} + </button> + </div> + </form> + </div> +</div> + +<script><!-- +document.addEventListener('DOMContentLoaded', function () { + $('.type-radio').click(function () { + $('.type-form').hide(); + $('#form-' + $(this).val()).show(); + }); + $('.type-radio[checked]').click(); +}); +// --></script>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp/templates/ipxe.html b/modules-available/serversetup-bwlp/templates/ipxe.html deleted file mode 100644 index f4b0b4d3..00000000 --- a/modules-available/serversetup-bwlp/templates/ipxe.html +++ /dev/null @@ -1,117 +0,0 @@ -<form method="post" action="?do=ServerSetup"> - <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1"> - <input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1"> - <input type="hidden" name="action" value="ipxe"> - <input type="hidden" name="token" value="{{token}}"> - <div class="panel panel-default"> - <div class="panel-heading"> - {{lang_bootMenu}} - </div> - <div class="panel-body"> - <p> - {{lang_bootInfo}} - </p> - <br> - - <div class="form-group"> - <strong>{{lang_bootBehavior}}</strong> - <div class="radio"> - <input type="radio" name="defaultentry" value="net" {{active-net}} id="id-net" {{perms.edit.menu.disabled}}> - <label for="id-net">bwLehrpool</label> - </div> - <div class="radio"> - <input type="radio" name="defaultentry" value="hdd" {{active-hdd}} id="id-hdd" {{perms.edit.menu.disabled}}> - <label for="id-hdd">{{lang_localHDD}}</label> - </div> - <div class="radio"> - <input type="radio" name="defaultentry" value="custom" {{active-custom}} id="id-custom" {{perms.edit.menu.disabled}}> - <label for="id-custom">{{lang_customEntry}} ("custom")</label> - </div> - </div> - - <div class="form-group"> - <strong>{{lang_menuDisplayTime}}</strong> - <div class="input-group form-narrow"> - <input type="text" class="form-control" name="timeout" value="{{timeout}}" pattern="\d+" {{perms.edit.menu.readonly}}> - <span class="input-group-addon">{{lang_seconds}}</span> - </div> - </div> - - <div class="form-group"> - <strong>{{lang_masterPassword}}</strong> - <div class="form-narrow"> - <input type="{{password_type}}" class="form-control" name="masterpassword" value="{{masterpasswordclear}}" {{perms.edit.menu.readonly}}> - </div> - <i>{{lang_masterPasswordHelp}}</i> - </div> - - <div class="form-group"> - <strong>{{lang_menuCustom}}</strong> <a class="btn btn-default btn-xs" data-toggle="modal" data-target="#help-custom"><span class="glyphicon glyphicon-question-sign"></span></a> - <textarea class="form-control" name="custom" rows="8" {{perms.edit.menu.readonly}}>{{custom}}</textarea> - </div> - </div> - - <div class="panel-footer"> - <button class="btn btn-primary pull-right" name="action" value="ipxe" {{perms.edit.menu.disabled}}>{{lang_bootMenuCreate}}</button> - <div> - <div class="btn-group" role="group"> - <a class="btn btn-default {{perms.download.disabled}}" href="?do=ServerSetup&action=getimage"> - <span class="glyphicon glyphicon-download-alt"></span> - {{lang_downloadImage}} - </a> - <span class="btn btn-default" data-toggle="modal" data-target="#help-usbimg"><span class="glyphicon glyphicon-question-sign"></span></span> - </div> - </div> - </div> - </div> -</form> - -<div class="modal fade" id="help-custom" tabindex="-1" role="dialog"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - {{lang_menuCustom}} - </div> - <div class="modal-body"> - {{lang_menuCustomHint1}} - <br>{{lang_example}}: - <pre>LABEL custom - MENU LABEL ^My Boot Entry - KERNEL http://1.2.3.4/kernel - INITRD http://1.2.3.4/initramfs-stage31 - APPEND custom=option - IPAPPEND 3</pre> - {{lang_menuCustomHint2}} LABEL <strong>custom</strong> - {{lang_menuCustomHint3}} - </div> - </div> - </div> -</div> - -<div class="modal fade" id="help-usbimg" tabindex="-1" role="dialog"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - {{lang_usbImage}} - </div> - <div class="modal-body"> - <p>{{lang_usbImgHelp}}</p> - <p> - <b>Linux</b> - <br> - {{lang_usbImgHelpLinux}} - </p> - <p> - <b>Windows</b> - <br> - {{lang_usbImgHelpWindows}} - </p> - <p> - <a href="https://rufus.akeo.ie/#download">{{lang_downloadRufus}}</a> - </p> - </div> - </div> - </div> -</div>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp/templates/menu-edit.html b/modules-available/serversetup-bwlp/templates/menu-edit.html new file mode 100644 index 00000000..cf10296e --- /dev/null +++ b/modules-available/serversetup-bwlp/templates/menu-edit.html @@ -0,0 +1,114 @@ +<h2>{{lang_editMenuHead}}</h2> + +<div class="panel panel-default"> + <div class="panel-heading"> + {{title}} + {{^title}} + {{lang_newMenu}} + {{/title}} + </div> + <div class="panel-body list-group"> + <form method="post" action="?do=serversetup"> + <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="action" value="savemenu"> + <input type="hidden" name="menuid" value="{{menuid}}"> + <div class="row list-group-item"> + <div class="col-sm-3"> + <label for="panel-title">{{lang_menuTitle}}</label> + </div> + <div class="col-sm-9"> + <input class="form-control" name="title" id="panel-title" type="text" value="{{title}}" {{readonly}}> + </div> + </div> + <div class="row list-group-item"> + <div class="col-sm-3"> + <label for="panel-timeout">{{lang_menuTimeout}}</label> + </div> + <div class="col-sm-9"> + <div class="input-group"> + <input class="form-control" name="timeout" id="panel-timeout" type="number" min="0" max="9999" + value="{{timeout}}" {{readonly}}> + <span class="input-group-addon">{{lang_seconds}}</span> + </div> + </div> + </div> + <div class="row list-group-item"> + <div class="col-sm-3"> + </div> + <div class="col-sm-9"> + <div class="checkbox"> + <input name="defmenu" id="panel-defmenu" type="checkbox" {{#isdefault}}checked{{/isdefault}} {{disabled}}> + <label for="panel-defmenu">{{lang_defaultMenu}}</label> + </div> + </div> + </div> + <div> + <table class="table"> + <thead> + <tr> + <th></th> + <th>{{lang_entryId}}</th> + <th>{{lang_title}}</th> + <th>{{lang_hotkey}}</th> + <th>{{lang_sortOrder}}</th> + <th>{{lang_password}}</th> + </tr> + </thead> + <tbody> + {{#entries}} + <tr> + <td class="slx-smallcol"> + <div class="radio radio-inline"> + <input type="radio" name="defaultentry" value="{{menuentryid}}" + {{#isdefault}}checked{{/isdefault}} {{perms.ipxe.menu.edit.disabled}} {{disabled}}> + <label></label> + </div> + </td> + <td class="text-nowrap"> + {{#entryid}} + <select class="form-control" name="entry[{{menuentryid}}][entryid]" {{readonly}}> + <option value="">{{lang_spacer}}</option> + {{#entrylist}} + <option value="{{entryid}}" {{selected}}>{{title}}</option> + {{/entrylist}} + </select> + {{/entryid}} + {{^entryid}} + <i>{{lang_spacer}}</i> + {{/entryid}} + </td> + <td {{^entryid}}colspan="2"{{/entryid}}> + <input class="form-control" name="entry[{{menuentryid}}][title]" value="{{title}}" + maxlength="100" {{readonly}}> + </td> + {{#entryid}} + <td> + <select class="form-control" name="entry[{{menuentryid}}][hotkey]" {{readonly}}> + <option value="">{{lang_none}}</option> + {{#keys}} + <option {{selected}}>{{key}}</option> + {{/keys}} + </select> + </td> + {{/entryid}} + <td> + <input class="form-control" name="entry[{{menuentryid}}][sortval]" value="{{sortval}}" {{readonly}}> + </td> + <td> + <input class="form-control" name="entry[{{menuentryid}}][plainpass]" id="panel-passwd" type="{{password_type}}" + value="{{plainpass}}" {{readonly}}> + </td> + </tr> + {{/entries}} + </tbody> + </table> + </div> + <div class="text-right"> + <button type="submit" class="btn btn-primary" {{disabled}}> + <span class="glyphicon glyphicon-floppy-disk"></span> + {{lang_save}} + </button> + </div> + </form> + </div> +</div>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp/templates/menu-list.html b/modules-available/serversetup-bwlp/templates/menu-list.html new file mode 100644 index 00000000..a862cff2 --- /dev/null +++ b/modules-available/serversetup-bwlp/templates/menu-list.html @@ -0,0 +1,36 @@ +<h2>{{lang_listOfMenus}}</h2> + +<table class="table"> + <thead> + <tr> + <th>{{lang_menuTitle}}</th> + <th class="slx-smallcol">{{lang_locationCount}}</th> + <th class="slx-smallcol">{{lang_isDefault}}</th> + <th class="slx-smallcol">{{lang_edit}}</th> + </tr> + </thead> + <tbody> + {{#table}} + <tr> + <td> + {{title}} + </td> + <td class="text-right"> + {{locationCount}} + </td> + <td> + {{#isdefault}} + <span class="glyphicon glyphicon-ok"></span> + {{/isdefault}} + </td> + <td> + {{#allowEdit}} + <a href="?do=serversetup&show=editmenu&id={{menuid}}" class="btn btn-xs btn-default"> + <span class="glyphicon glyphicon-edit"></span> + </a> + {{/allowEdit}} + </td> + </tr> + {{/table}} + </tbody> +</table>
\ No newline at end of file |