summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates/page-panels.html
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/locationinfo/templates/page-panels.html
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/locationinfo/templates/page-panels.html')
-rw-r--r--modules-available/locationinfo/templates/page-panels.html37
1 files changed, 7 insertions, 30 deletions
diff --git a/modules-available/locationinfo/templates/page-panels.html b/modules-available/locationinfo/templates/page-panels.html
index b30e7c87..51acf053 100644
--- a/modules-available/locationinfo/templates/page-panels.html
+++ b/modules-available/locationinfo/templates/page-panels.html
@@ -2,6 +2,9 @@
<p>{{lang_panelsTableHints}}</p>
+<form method="post" action="?do=locationinfo">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="deletePanel">
<table class="table table-hover">
<thead>
<tr>
@@ -45,7 +48,8 @@
</a>
</td>
<td class="text-center" style="vertical-align: middle">
- <button type="button" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#deleteModal" onclick="deletePanel('{{paneluuid}}')" {{edit_disabled}}>
+ <button type="submit" name="uuid" value="{{paneluuid}}" class="btn btn-xs btn-danger"
+ data-confirm="#confirm-delete" data-title="{{panelname}}" {{edit_disabled}}>
<span class="glyphicon glyphicon-trash"></span>
</button>
</td>
@@ -53,6 +57,7 @@
{{/panels}}
</tbody>
</table>
+</form>
<div class="buttonbar text-right">
<a class="btn btn-success" href="?do=locationinfo&amp;show=edit-panel&amp;uuid=new-default">
@@ -68,32 +73,4 @@
{{lang_urlPanel}}
</a>
</div>
-
-<form method="post" action="?do=locationinfo">
-<input type="hidden" name="token" value="{{token}}">
-
-<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">&times;</span></button>
- <h4 class="modal-title" id="myModalLabel">{{lang_delete}}</h4>
- </div>
- <div class="modal-body">
- <p>{{lang_deleteConfirmation}}</p>
- </div>
- <div class="modal-footer">
- <input type="hidden" id="delete-panel-id" name="uuid" value="">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="submit" name="action" value="deletePanel" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</button>
- </div>
- </div>
- </div>
-</div>
-</form>
-
-<script>
- function deletePanel(panelid) {
- $("#delete-panel-id").val(panelid);
- }
-</script> \ No newline at end of file
+<div class="hidden" id="confirm-delete">{{lang_deleteConfirmation}}</div>