-
-
Notifications
You must be signed in to change notification settings - Fork 366
/
user-manage-roles.html.twig
77 lines (72 loc) · 2.5 KB
/
user-manage-roles.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{% extends "modals/modal.html.twig" %}
{% block modal_title %}{{translate("ROLE.MANAGE")}}{% endblock %}
{% block modal_body %}
<form class="js-form" method="PUT" action="{{site.uri.public}}/api/users/u/{{user.user_name}}/roles">
{% include "forms/csrf.html.twig" %}
<div class="js-form-alerts">
</div>
<div class="js-form-roles">
<table class="table table-striped">
<thead>
<tr>
<th>{{translate("NAME")}}</th>
<th>{{translate("DESCRIPTION")}}</th>
<th>{{translate("REMOVE")}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="padding-bottom">
<label>{{translate("ROLE.ASSIGN_NEW")}}:</label>
<select class="form-control js-select-new" type="text">
<option></option>
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-xs-8 col-sm-4">
<button type="submit" class="btn btn-block btn-lg btn-success">{{translate("UPDATE")}}</button>
</div>
<div class="col-xs-4 col-sm-3 pull-right">
<button type="button" class="btn btn-block btn-lg btn-link" data-dismiss="modal">{{translate('CANCEL')}}</button>
</div>
</div>
</form>
{# This contains a series of <script> blocks, each of which is a client-side Handlebars template.
# Note that these are NOT Twig templates, although the syntax is similar. We wrap them in the `verbatim` tag,
# so that Twig will output them directly into the DOM instead of trying to treat them like Twig templates.
#
# These templates require handlebars-helpers.js, moment.js
#}
{% verbatim %}
<script id="user-roles-select-option" type="text/x-handlebars-template">
<div>
<strong>
{{name}}
</strong>
<br>
{{description}}
</div>
</script>
<script id="user-roles-row" type="text/x-handlebars-template">
<tr class="uf-collection-row">
<td>
{{name}}
<input type="hidden" name="value[{{ rownum }}][role_id]" value="{{id}}">
</td>
<td>
{{description}}
</td>
<td>
<button type="button" class="btn btn-link btn-trash js-delete-row pull-right" title="Delete"> <i class="fas fa-trash"></i> </button>
</td>
</tr>
</script>
{% endverbatim %}
<!-- Include validation rules -->
<script>
{% include "pages/partials/page.js.twig" %}
</script>
{% endblock %}