aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/admin/templates/forms/role.html.twig
blob: 46a447704ad2522b8e18603db568a806bedb5953 (plain) (blame)
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
<form class="js-form" method="{{form.method | default('POST')}}" action="{{site.uri.public}}/{{form.action}}">
    {% include "forms/csrf.html.twig" %}
    <div class="js-form-alerts">
    </div>
    <div class="row">
        {% if 'name' not in form.fields.hidden %}
        <div class="col-sm-12">
            <div class="form-group">
                <label>{{translate("ROLE.NAME")}}</label>
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-edit fa-fw"></i></span>
                    <input type="text" class="form-control" name="name" autocomplete="off" value="{{role.name}}" placeholder="{{translate("ROLE.NAME_EXPLAIN")}}" {% if 'name' in form.fields.disabled %}disabled{% endif %}>
                </div>
            </div>
        </div>
        {% endif %}
        {% if 'slug' not in form.fields.hidden %}
        <div class="col-sm-12">
            <div class="form-group">
                <label>{{translate("SLUG")}}</label>
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-tag fa-fw"></i></span>
                    <input type="text" class="form-control" name="slug" autocomplete="off" value="{{role.slug}}" placeholder="{{translate("SLUG")}}" {% if 'slug' in form.fields.disabled %}disabled{% endif %} readonly>
                    {% if 'slug' not in form.fields.disabled %}
                        <span class="input-group-btn" data-toggle="buttons">
                            <label class="btn btn-primary">
                                <input type="checkbox" id="form-role-slug-override" autocomplete="off"> {{translate("OVERRIDE")}}
                            </label>
                        </span>
                    {% endif %}
                </div>
            </div>
        </div>
        {% endif %}
        {% if 'description' not in fields.hidden %}
        <div class="col-sm-12">
            <div class="form-group">
                <label for="input_description">{{translate("DESCRIPTION")}}</label>
                <textarea id="input_description" class="form-control" type="text" name="description" {% if 'description' in form.fields.disabled %}disabled{% endif %} rows=6>{{role.description}}</textarea>
            </div>
        </div>
        {% endif %}
    </div><br>
    <div class="row">
        <div class="col-xs-8 col-sm-4">
            <button type="submit" class="btn btn-block btn-lg btn-success">{{form.submit_text}}</button>
        </div>
        <div class="col-xs-4 col-sm-4 pull-right">
            <button type="button" class="btn btn-block btn-lg btn-link" data-dismiss="modal">{{translate("CANCEL")}}</button>
        </div>
    </div>
</form>
<!-- Include validation rules -->
<script>
{% include "pages/partials/page.js.twig" %}
</script>