diff options
author | Simon Rettberg | 2018-02-14 13:18:47 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-02-14 13:18:47 +0100 |
commit | 8aebf6191f0942b6e0fbdc5b07f8069a68d3ee70 (patch) | |
tree | ae82d4302cc639335908e7c73be23ec337eb6d35 /modules-available/locations/templates/location-subnets.html | |
parent | [dozmod] Move subpages to pages/, hide pages where user has no permission (diff) | |
download | slx-admin-8aebf6191f0942b6e0fbdc5b07f8069a68d3ee70.tar.gz slx-admin-8aebf6191f0942b6e0fbdc5b07f8069a68d3ee70.tar.xz slx-admin-8aebf6191f0942b6e0fbdc5b07f8069a68d3ee70.zip |
[locations] One permission for direct subnet editing; restructure handling a bit
Diffstat (limited to 'modules-available/locations/templates/location-subnets.html')
-rw-r--r-- | modules-available/locations/templates/location-subnets.html | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index 2cc8e98b..9db75f0b 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -8,17 +8,17 @@ <button type="submit" class="btn btn-primary">Save</button> </div> <div class="row"> - <div class="{{^editAllowed}}disabled{{/editAllowed}}"> + <div> <div class="col-sm-6"> <div class="input-group"> <span class="input-group-addon slx-ga">{{lang_name}}</span> - <input class="form-control" type="text" name="locationname" value="{{locationname}}" pattern=".*\S.*"> + <input {{perms.location.edit.name.disabled}} class="form-control" type="text" name="locationname" value="{{locationname}}" pattern=".*\S.*"> </div> </div> <div class="col-sm-6"> <div class="input-group"> <span class="input-group-addon slx-ga2">{{lang_parentLocation}}</span> - <select class="form-control" name="parentlocationid"> + <select class="form-control" name="parentlocationid" {{perms.location.edit.parent.disabled}}> {{#parents}} <option {{disabled}} value="{{locationid}}" {{#selected}}selected="selected"{{/selected}}>{{locationpad}} {{locationname}}</option> {{/parents}} @@ -40,11 +40,11 @@ {{#list}} <tr class="cidrmagic"> <td>{{subnetid}}</td> - <td class="{{^editSubnetAllowed}}disabled{{/editSubnetAllowed}}"><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 class="{{^editSubnetAllowed}}disabled{{/editSubnetAllowed}}"><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><input {{perms.location.edit.subnets.disabled}} 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 {{perms.location.edit.subnets.disabled}} 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"> <div class="checkbox text-center" style="margin-left: 9px"> - <input {{^deleteSubnetAllowed}}disabled{{/deleteSubnetAllowed}} type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"> + <input {{perms.location.edit.subnets.disabled}} type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"> <label class="text-left"></label> </div> </td> @@ -52,7 +52,7 @@ {{/list}} <tr id="loc-sub-{{locationid}}"> <td colspan="4"> - <button {{^addSubnetAllowed}}disabled{{/addSubnetAllowed}} class="btn btn-success btn-sm pull-right" type="button" onclick="slxAddSubnetRow(this, {{locationid}})" title="{{lang_addNewSubnet}}"> + <button {{perms.location.edit.subnets.disabled}} class="btn btn-success btn-sm pull-right" type="button" onclick="slxAddSubnetRow(this, {{locationid}})" title="{{lang_addNewSubnet}}"> <span class="glyphicon glyphicon-plus"></span> {{lang_subnet}} </button> </td> @@ -74,19 +74,16 @@ {{/haveStatistics}} </div> <div class="col-md-4 text-center"> - <div class="btn-group"> - {{#roomplanner}} - <a class="btn btn-default" href="?do=roomplanner&locationid={{locationid}}" target="_blank" - onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false"> - <span class="glyphicon glyphicon-move"></span> {{lang_editRoomplan}} - </a> - {{/roomplanner}} - </div> - + {{#roomplanner}} + <a class="btn btn-default {{perms.roomplanner.edit.disabled}}" href="?do=roomplanner&locationid={{locationid}}" target="_blank" + onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false"> + <span class="glyphicon glyphicon-move"></span> {{lang_editRoomplan}} + </a> + {{/roomplanner}} </div> <div class="col-md-4 text-right"> - <button style="margin-right: 10px" {{^deleteAllowed}}disabled{{/deleteAllowed}} type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteLocationModal{{locationid}}"><span class="glyphicon glyphicon-trash"></span> {{lang_deleteLocation}}</button> - <button onclick="deleteSubnetWarning('{{locationid}}')" {{^saveButton}}disabled{{/saveButton}} type="button" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> + <button {{perms.location.delete.disabled}} type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteLocationModal{{locationid}}"><span class="glyphicon glyphicon-trash"></span> {{lang_deleteLocation}}</button> + <button onclick="deleteSubnetWarning('{{locationid}}')" {{perms.save_button.disabled}} type="button" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> </div> </div> |