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/runmode | |
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/runmode')
-rw-r--r-- | modules-available/runmode/templates/module-machine-list.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules-available/runmode/templates/module-machine-list.html b/modules-available/runmode/templates/module-machine-list.html index 89424922..73ea8a70 100644 --- a/modules-available/runmode/templates/module-machine-list.html +++ b/modules-available/runmode/templates/module-machine-list.html @@ -3,7 +3,7 @@ <a href="?do={{module}}">{{modulename}}</a> </h2> -<form method="post" action="?do=runmode" onsubmit="return confirm('{{lang_confirmDelete}}')"> +<form method="post" action="?do=runmode"> <input type="hidden" name="token" value="{{token}}"> <input type="hidden" name="action" value="delete-machine"> <table class="table"> @@ -36,7 +36,8 @@ </td> <td class="text-center"> {{#canedit}} - <button type="submit" class="btn btn-danger btn-sm" name="machineuuid" value="{{machineuuid}}" {{disabled}}> + <button type="submit" class="btn btn-danger btn-sm" name="machineuuid" value="{{machineuuid}}" {{disabled}} + data-confirm="#confirm-delete" data-title="{{hostname}}"> <span class="glyphicon glyphicon-trash"></span> </button> {{/canedit}} @@ -49,4 +50,5 @@ </tr> {{/list}} </table> -</form>
\ No newline at end of file +</form> +<div class="hidden" id="confirm-delete">{{lang_confirmDelete}}</div>
\ No newline at end of file |