aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-12-17 14:59:25 +0100
committerMario <mario@mariovavti.com>2021-12-17 14:59:25 +0100
commit220ed35f5855f22344d7a815da9bb1f6c96f1002 (patch)
treed8603dbf6eb8fef03d0df3c6bbf4aabdb27097e8 /view
parentb1cf5d4e441c6e86525dd0c955bd617e7e492309 (diff)
downloadvolse-hubzilla-220ed35f5855f22344d7a815da9bb1f6c96f1002.tar.gz
volse-hubzilla-220ed35f5855f22344d7a815da9bb1f6c96f1002.tar.bz2
volse-hubzilla-220ed35f5855f22344d7a815da9bb1f6c96f1002.zip
implement contact role deletion
Diffstat (limited to 'view')
-rw-r--r--view/tpl/permcats.tpl44
1 files changed, 30 insertions, 14 deletions
diff --git a/view/tpl/permcats.tpl b/view/tpl/permcats.tpl
index 279903048..d0f175cfb 100644
--- a/view/tpl/permcats.tpl
+++ b/view/tpl/permcats.tpl
@@ -4,7 +4,7 @@
<div class="clear"></div>
</div>
<div class="section-content-tools-wrapper">
- <form action="permcats" id="settings-permcats-form" method="post" autocomplete="off" >
+ <form action="permcats/{{$return_path}}" id="settings-permcats-form" method="post" autocomplete="off" >
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
<input type="hidden" name="return_path" value="{{$return_path}}">
@@ -31,20 +31,36 @@
{{include file="field_acheckbox.tpl" field=$prm}}
{{/foreach}}
</table>
- <div class="settings-submit-wrapper" >
- <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
+ <div class="clearfix">
+ {{if !$is_system_role && $return_path}}
+ <button type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#delete-modal">{{$delet_role_button}}</button>
+ {{/if}}
+ <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button>
</div>
- {{**if $permcats}}
- <table id="permcat-index">
- {{foreach $permcats as $k => $v}}
- <tr class="permcat-row-{{$k}}">
- <td width="99%"><a href="permcats/{{$k}}">{{$v}}</a></td>
- <td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td>
- </tr>
- {{/foreach}}
- </table>
- {{/if**}}
-
</form>
</div>
</div>
+{{if !$is_system_role && $return_path}}
+<div id="delete-modal" class="modal" tabindex="-1">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <div class="h3">
+ {{$delete_label}}
+ </div>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div>
+ <form action="permcats" id="delete-permcat-form" method="post">
+ <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
+ <input type="hidden" name="deleted_role" value="{{$current_role}}">
+ <div id="edit-modal-body" class="modal-body">
+ {{include file="field_select.tpl" field=$delete_role_select}}
+ </div>
+ <div class="modal-footer">
+ <button id="" type="submit" class="btn btn-danger">{{$delet_role_button}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+{{/if}}