summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/templates/location-subnets.html
diff options
context:
space:
mode:
authorSimon Rettberg2016-06-24 17:08:24 +0200
committerSimon Rettberg2016-06-24 17:08:24 +0200
commit3d0cb99c70dd9714655cf26893504e4bd007b036 (patch)
tree8b5cdaee9c0196aedb6a5c3f8138005a18091fa8 /modules-available/locations/templates/location-subnets.html
parentmodified the editor toolbar. (diff)
downloadslx-admin-3d0cb99c70dd9714655cf26893504e4bd007b036.tar.gz
slx-admin-3d0cb99c70dd9714655cf26893504e4bd007b036.tar.xz
slx-admin-3d0cb99c70dd9714655cf26893504e4bd007b036.zip
[locations] Support CIDR notion (start field), tweak templates a bit
Diffstat (limited to 'modules-available/locations/templates/location-subnets.html')
-rw-r--r--modules-available/locations/templates/location-subnets.html34
1 files changed, 19 insertions, 15 deletions
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html
index b0353416..23035002 100644
--- a/modules-available/locations/templates/location-subnets.html
+++ b/modules-available/locations/templates/location-subnets.html
@@ -43,31 +43,35 @@
<th title="{{lang_deleteSubnet}}"><span class="glyphicon glyphicon-trash"></span></th>
</tr>
{{#list}}
- <tr>
+ <tr class="cidrmagic">
<td>{{subnetid}}</td>
- <td><input class="form-control" type="text" name="startaddr[{{subnetid}}]" value="{{startaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td>
- <td><input class="form-control" type="text" name="endaddr[{{subnetid}}]" value="{{endaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td>
+ <td><input class="form-control cidrstart" type="text" name="startaddr[{{subnetid}}]" value="{{startaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td>
+ <td><input class="form-control cidrend" type="text" name="endaddr[{{subnetid}}]" value="{{endaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td>
<td class="danger" align="center"><input type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"></td>
</tr>
{{/list}}
<tr id="loc-sub-{{locationid}}">
- <td colspan="2">
+ <td colspan="4">
<button class="btn btn-success btn-sm" type="button" onclick="slxAddSubnetRow(this, {{locationid}})" title="{{lang_addNewSubnet}}">
<span class="glyphicon glyphicon-plus-sign"></span> {{lang_subnet}}
</button>
</td>
- <td colspan="2" align="right">
- <button type="submit" class="btn btn-primary">{{lang_save}}</button>
- </td>
</tr>
</table>
+ <br>
+ <div class="pull-right">
+ <button type="submit" class="btn btn-primary">{{lang_save}}</button>
+ </div>
+ <div class="slx-bold">{{lang_locationInfo}}</div>
+ {{#haveDozmod}}
+ <div>
+ <span class="slx-ga2">{{lang_referencingLectures}}:</span> {{lectures}}
+ </div>
+ {{/haveDozmod}}
+ {{#haveStatistics}}
+ <div>
+ <span class="slx-ga2">{{lang_matchingMachines}}:</span> <a href="?do=Statistics&amp;filter=location&amp;argument={{locationid}}">{{machines}} / {{machines_online}} / {{machines_used}} ({{used_percent}}%)</a>
+ </div>
+ {{/haveStatistics}}
</form>
- <br>
- <div class="slx-bold">{{lang_locationInfo}}</div>
- <div>
- <span class="slx-ga2">{{lang_referencingLectures}}:</span> {{lectures}}
- </div>
- <div>
- <span class="slx-ga2">{{lang_matchingMachines}}:</span> <a href="?do=Statistics&amp;filter=location&amp;argument={{locationid}}">{{machines}} / {{machines_online}} / {{machines_used}} ({{used_percent}}%)</a>
- </div>
</div> \ No newline at end of file