diff options
author | Udo Walter | 2017-10-03 20:07:15 +0200 |
---|---|---|
committer | Udo Walter | 2017-10-03 20:07:15 +0200 |
commit | 3941f2482e26590e7f0f24147bc87740ab7f18af (patch) | |
tree | b782293185db8ea8847b335628fb709f2928b69f /modules-available/locations/templates/location-subnets.html | |
parent | [internetaccess] implemented new permission system (diff) | |
download | slx-admin-3941f2482e26590e7f0f24147bc87740ab7f18af.tar.gz slx-admin-3941f2482e26590e7f0f24147bc87740ab7f18af.tar.xz slx-admin-3941f2482e26590e7f0f24147bc87740ab7f18af.zip |
[locations] implemented new permission system
Diffstat (limited to 'modules-available/locations/templates/location-subnets.html')
-rw-r--r-- | modules-available/locations/templates/location-subnets.html | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index 9cfa5cc8..754616c6 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -8,24 +8,26 @@ <button type="submit" class="btn btn-primary">Save</button> </div> <div class="row"> - <div class="col-sm-5"> - <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.*"> + <div class="{{^editAllowed}}disabled{{/editAllowed}}"> + <div class="col-sm-5"> + <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.*"> + </div> </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"> - {{#parents}} - <option value="{{locationid}}" {{#selected}}selected="selected"{{/selected}}>{{locationpad}} {{locationname}}</option> - {{/parents}} - </select> + <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"> + {{#parents}} + <option {{disabled}} value="{{locationid}}" {{#selected}}selected="selected"{{/selected}}>{{locationpad}} {{locationname}}</option> + {{/parents}} + </select> + </div> </div> </div> <div class="col-sm-1 text-center"> - <button type="button" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#deleteLocationModal{{locationid}}"><span class="glyphicon glyphicon-trash"></span></button> + <button {{^deleteAllowed}}disabled{{/deleteAllowed}} type="button" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#deleteLocationModal{{locationid}}"><span class="glyphicon glyphicon-trash"></span></button> </div> </div> <br> @@ -41,11 +43,11 @@ {{#list}} <tr class="cidrmagic"> <td>{{subnetid}}</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="{{^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 class="danger"> <div class="checkbox text-center" style="margin-left: 9px"> - <input type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"> + <input {{^deleteSubnetAllowed}}disabled{{/deleteSubnetAllowed}} type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"> <label class="text-left"></label> </div> </td> @@ -53,7 +55,7 @@ {{/list}} <tr id="loc-sub-{{locationid}}"> <td colspan="4"> - <button class="btn btn-success btn-sm pull-right" type="button" onclick="slxAddSubnetRow(this, {{locationid}})" title="{{lang_addNewSubnet}}"> + <button {{^addSubnetAllowed}}disabled{{/addSubnetAllowed}} 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> @@ -86,7 +88,7 @@ </div> <div class="col-md-4 text-right"> - <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> + <button {{^saveButton}}disabled{{/saveButton}} type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> </div> </div> |