diff options
author | Simon Rettberg | 2019-03-25 11:46:50 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-03-25 11:46:50 +0100 |
commit | 03424ad19ac1bb42635a3d6653565aa0dc6ccf5a (patch) | |
tree | f3b068d5ca0aff6b897f98bb7eb7a5d097cec749 /modules-available/dozmod/templates/ldapfilters.html | |
parent | [dozmod] How about implementing runscript deletion (diff) | |
download | slx-admin-03424ad19ac1bb42635a3d6653565aa0dc6ccf5a.tar.gz slx-admin-03424ad19ac1bb42635a3d6653565aa0dc6ccf5a.tar.xz slx-admin-03424ad19ac1bb42635a3d6653565aa0dc6ccf5a.zip |
Introduce JS helper for bootstrap confirm dialogs on button-submit
Diffstat (limited to 'modules-available/dozmod/templates/ldapfilters.html')
-rw-r--r-- | modules-available/dozmod/templates/ldapfilters.html | 104 |
1 files changed, 41 insertions, 63 deletions
diff --git a/modules-available/dozmod/templates/ldapfilters.html b/modules-available/dozmod/templates/ldapfilters.html index 824ec70b..f12fd049 100644 --- a/modules-available/dozmod/templates/ldapfilters.html +++ b/modules-available/dozmod/templates/ldapfilters.html @@ -4,74 +4,52 @@ {{lang_ldapfiltersIntro}} </p> -<table class="table"> - <thead> - <tr> - <th class="">{{lang_ldapFilterName}}</th> - <th class="">{{lang_ldapFilterAttribute}}</th> - <th class="">{{lang_ldapFilterValue}}</th> - {{#hasEditPermission}} - <th class="slx-smallcol">{{lang_edit}}</th> - <th class="slx-smallcol">{{lang_delete}}</th> - {{/hasEditPermission}} - </tr> - </thead> - <tbody> - {{#ldapfilters}} - <tr> - <td>{{filtername}}</td> - <td>{{filterkey}}</td> - <td>{{filtervalue}}</td> - {{#hasEditPermission}} - <td class="text-center"> - <a class="btn btn-xs btn-primary" href="?do=dozmod§ion=ldapfilters&show=edit&filterid={{filterid}}"> - <span class="glyphicon glyphicon-edit"></span> - </a> - </td> - <td class="text-center"> - <button type="button" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#deleteModal" onclick="setDeleteId('{{filterid}}')"> - <span class="glyphicon glyphicon-trash"></span> - </button> - </td> - {{/hasEditPermission}} - </tr> - {{/ldapfilters}} - </tbody> -</table> +<form method="post" action="?do=dozmod§ion=ldapfilters"> + <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="action" value="deleteFilter"> + <table class="table"> + <thead> + <tr> + <th class="">{{lang_ldapFilterName}}</th> + <th class="">{{lang_ldapFilterAttribute}}</th> + <th class="">{{lang_ldapFilterValue}}</th> + {{#hasEditPermission}} + <th class="slx-smallcol">{{lang_edit}}</th> + <th class="slx-smallcol">{{lang_delete}}</th> + {{/hasEditPermission}} + </tr> + </thead> + <tbody> + {{#ldapfilters}} + <tr> + <td>{{filtername}}</td> + <td>{{filterkey}}</td> + <td>{{filtervalue}}</td> + {{#hasEditPermission}} + <td class="text-center"> + <a class="btn btn-xs btn-primary" href="?do=dozmod&section=ldapfilters&show=edit&filterid={{filterid}}"> + <span class="glyphicon glyphicon-edit"></span> + </a> + </td> + <td class="text-center"> + <button type="submit" name="filterid" value="{{filterid}}" class="btn btn-xs btn-danger" + data-confirm="#confirm-delete" data-title="{{filtername}}"> + <span class="glyphicon glyphicon-trash"></span> + </button> + </td> + {{/hasEditPermission}} + </tr> + {{/ldapfilters}} + </tbody> + </table> +</form> +<div class="hidden" id="confirm-delete">{{lang_ldapFilterDeleteConfirmation}}</div> {{#hasEditPermission}} <div class="text-right"> - <a class="btn btn-sm btn-success" href="?do=dozmod§ion=ldapfilters&show=edit"> + <a class="btn btn-sm btn-success" href="?do=dozmod&section=ldapfilters&show=edit"> <span class="glyphicon glyphicon-plus"></span> {{lang_ldapFilterAdd}} </a> </div> {{/hasEditPermission}} - -<form method="post" action="?do=dozmod§ion=ldapfilters"> - <input type="hidden" name="token" value="{{token}}"> - <input type="hidden" id="deleteAction" name="filterid" value=""> - <div class ="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> - <div class="modal-dialog" role="document"> - <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> - <h4 class="modal-title" id="myModalLabel">{{lang_delete}}</h4> - </div> - <div class="modal-body"> - <p>{{lang_ldapFilterDeleteConfirmation}}</p> - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button> - <button type="submit" name="action" value="deleteFilter" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</button> - </div> - </div> - </div> - </div> -</form> - -<script type="text/javascript"> -function setDeleteId(id) { - $('#deleteAction').val(id) -} -</script> |