summaryrefslogtreecommitdiffstats
path: root/modules-available/usblockoff/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/usblockoff/templates')
-rw-r--r--modules-available/usblockoff/templates/usb-configuration-table.html12
-rw-r--r--modules-available/usblockoff/templates/usb-edit-config.html33
-rw-r--r--modules-available/usblockoff/templates/usb-rules-config.html23
3 files changed, 54 insertions, 14 deletions
diff --git a/modules-available/usblockoff/templates/usb-configuration-table.html b/modules-available/usblockoff/templates/usb-configuration-table.html
index 3ceebce5..35eede5a 100644
--- a/modules-available/usblockoff/templates/usb-configuration-table.html
+++ b/modules-available/usblockoff/templates/usb-configuration-table.html
@@ -65,17 +65,19 @@
<table id="configurationTable" class="table table-condensed table-hover stupidtable">
<thead>
<tr>
- <th data-sort="string">{{lang_serverName}}</th>
- <th>{{lang_ruleInfoTODO}}</th>
- <th>{{lang_edit}}</th>
- <th>{{lang_delete}}</th>
+ <th style="width: 5%" data-sort="int">ID</th>
+ <th style="width: 35%" data-sort="string">{{lang_configName}}</th>
+ <th style="width: 40%">{{lang_description}}</th>
+ <th style="width: 10%">{{lang_edit}}</th>
+ <th style="width: 10%">{{lang_delete}}</th>
</tr>
</thead>
<tbody>
{{#config_list}}
<tr>
+ <td>{{config_id}}</td>
<td data-sort-value="{{config_name}}">{{config_name}}</td>
- <td>TODO: Show Rule information here</td>
+ <td>{{config_desc}}</td>
<td>
<a class="btn btn-xs btn-info" href="?do=usblockoff&amp;show=edit-config&amp;configid={{config_id}}">
<span class="glyphicon glyphicon-edit"></span>
diff --git a/modules-available/usblockoff/templates/usb-edit-config.html b/modules-available/usblockoff/templates/usb-edit-config.html
index 694101d4..1cd24ce7 100644
--- a/modules-available/usblockoff/templates/usb-edit-config.html
+++ b/modules-available/usblockoff/templates/usb-edit-config.html
@@ -14,7 +14,7 @@
<label for="configName">{{lang_configName}}</label>
</div>
<div class="col-sm-7">
- <input required class="form-control" name="configName" id="configName" maxlength="50" value="{{configName}}">
+ <input type="text" class="form-control" name="configName" id="configName" value="{{configName}}">
</div>
<div class="col-sm-2">
<a class="btn btn-default" title="{{lang_configName_helptext}}">
@@ -22,6 +22,20 @@
</a>
</div>
</div>
+ <br>
+ <div class="row">
+ <div class="col-sm-3">
+ <label for="configDesc">{{lang_description}}</label>
+ </div>
+ <div class="col-sm-7">
+ <input class="form-control" name="configDesc" id="configDesc" value="{{configDesc}}">
+ </div>
+ <div class="col-sm-2">
+ <a class="btn btn-default" title="{{lang_configDesc_helptext}}">
+ <span class="glyphicon glyphicon-question-sign"></span>
+ </a>
+ </div>
+ </div>
</div>
</div>
@@ -54,3 +68,20 @@
</div>
</form>
+
+
+
+<script type="application/javascript">
+ document.addEventListener("DOMContentLoaded", function () {
+ $('form').submit(function () {
+ var input = $("#configName");
+ var name = $.trim(input.val());
+ if (!name) {
+ input.addClass("missingInput");
+ return false;
+ }
+ });
+ });
+</script>
+
+
diff --git a/modules-available/usblockoff/templates/usb-rules-config.html b/modules-available/usblockoff/templates/usb-rules-config.html
index 15c7a2f7..8cb63d88 100644
--- a/modules-available/usblockoff/templates/usb-rules-config.html
+++ b/modules-available/usblockoff/templates/usb-rules-config.html
@@ -1,5 +1,10 @@
<div class="panel panel-default">
- <div class="panel-heading">rules.conf</div>
+ <div class="panel-heading">
+ rules.conf
+ <a class="btn btn-default" title="{{lang_firstMatchingRuleCounts}}">
+ <span class="glyphicon glyphicon-question-sign"></span>
+ </a>
+ </div>
<div class="panel-body" id="casualRules">
<div class="list-group">
@@ -9,7 +14,7 @@
<thead>
<tr>
<th data-sort="string" width="20"><span class="glyphicon glyphicon-th-list"></span></th>
- <th width="120">{{lang_target}}</th>
+ <th width="120">{{lang_action}}</th>
<th>{{lang_attributes}}</th>
<th>{{lang_edit}}</th>
<th>{{lang_delete}}</th>
@@ -48,14 +53,16 @@
</tbody>
</table>
<div class="pull-right">
- <a class="btn btn-success" href="?do=usblockoff&show=add-generic-rule&configid={{configid}}"
- style="margin-right: 3px; float: right;">
- <span style="margin-right: 5px;" class="glyphicon glyphicon-plus"></span>
+ <a class="btn btn-success {{#newConfig}}disabled{{/newConfig}}"
+ {{^newConfig}}href="?do=usblockoff&show=add-generic-rule&configid={{configid}}"{{/newConfig}}
+ {{#newConfig}}title="{{lang_disabledButtons_helptext}}" style="pointer-events: auto;"{{/newConfig}}>
+ <span class="glyphicon glyphicon-plus"></span>
<span>{{lang_genericRule}}</span>
</a>
- <a class="btn btn-success" href="?do=usblockoff&show=add-devices&configid={{configid}}"
- style="margin-right: 3px;float: right;">
- <span style="margin-right: 5px;" class="glyphicon glyphicon-plus"></span>
+ <a class="btn btn-success {{#newConfig}}disabled{{/newConfig}}"
+ {{^newConfig}}href="?do=usblockoff&show=add-devices&configid={{configid}}"{{/newConfig}}
+ {{#newConfig}}title="{{lang_disabledButtons_helptext}}" style="pointer-events: auto;"{{/newConfig}}>
+ <span class="glyphicon glyphicon-plus"></span>
<span>{{lang_devices}}</span>
</a>
</div>