summaryrefslogtreecommitdiffstats
path: root/modules-available/sysconfig
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-25 11:46:50 +0100
committerSimon Rettberg2019-03-25 11:46:50 +0100
commit03424ad19ac1bb42635a3d6653565aa0dc6ccf5a (patch)
treef3b068d5ca0aff6b897f98bb7eb7a5d097cec749 /modules-available/sysconfig
parent[dozmod] How about implementing runscript deletion (diff)
downloadslx-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/sysconfig')
-rw-r--r--modules-available/sysconfig/templates/js.html6
-rw-r--r--modules-available/sysconfig/templates/list-configs.html5
-rw-r--r--modules-available/sysconfig/templates/list-modules.html5
3 files changed, 7 insertions, 9 deletions
diff --git a/modules-available/sysconfig/templates/js.html b/modules-available/sysconfig/templates/js.html
index 9e5da884..157e8d12 100644
--- a/modules-available/sysconfig/templates/js.html
+++ b/modules-available/sysconfig/templates/js.html
@@ -1,11 +1,7 @@
+<div class="hidden" id="confirm-delete">{{lang_confirmDeleteQuestion}}</div>
<script type="application/javascript"><!--
document.addEventListener("DOMContentLoaded", function () {
checkBuildStatus();
$('[data-toggle="tooltip"]').tooltip();
- $('.confirm-delete').click(function (event) {
- if (!confirm('{{lang_confirmDeleteQuestion}}')) {
- event.preventDefault();
- }
- });
}, false);
// --></script> \ No newline at end of file
diff --git a/modules-available/sysconfig/templates/list-configs.html b/modules-available/sysconfig/templates/list-configs.html
index fe882c43..ea6705da 100644
--- a/modules-available/sysconfig/templates/list-configs.html
+++ b/modules-available/sysconfig/templates/list-configs.html
@@ -66,8 +66,9 @@
href="?do=SysConfig&amp;action=addconfig&amp;edit={{configid}}" title="{{lang_edit}}">
<span class="glyphicon glyphicon-edit"></span>
</a>
- <button class="btn btn-danger btn-xs confirm-delete" name="del" value="{{configid}}"
- title="{{lang_delete}}" {{perms.config.edit.disabled}}>
+ <button type="submit" class="btn btn-danger btn-xs" name="del" value="{{configid}}"
+ title="{{lang_delete}}" {{perms.config.edit.disabled}} data-confirm="#confirm-delete"
+ data-title="{{config}}">
<span class="glyphicon glyphicon-trash"></span>
</button>
{{/locationid}}
diff --git a/modules-available/sysconfig/templates/list-modules.html b/modules-available/sysconfig/templates/list-modules.html
index c9400696..99d535f1 100644
--- a/modules-available/sysconfig/templates/list-modules.html
+++ b/modules-available/sysconfig/templates/list-modules.html
@@ -40,8 +40,9 @@
title="{{lang_edit}}">
<span class="glyphicon glyphicon-edit"></span>
</a>
- <button class="btn btn-danger btn-xs confirm-delete" name="del" value="{{id}}"
- title="{{lang_delete}}" {{perms.module.edit.disabled}}>
+ <button type="submit" class="btn btn-danger btn-xs" name="del" value="{{id}}"
+ title="{{lang_delete}}" {{perms.module.edit.disabled}} data-confirm="#confirm-delete"
+ data-title="{{title}}">
<span class="glyphicon glyphicon-trash"></span>
</button>
</td>