~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to views/user-form-edit.twig

  • Committer: Dan Garner
  • Date: 2015-09-29 15:16:59 UTC
  • mto: (454.2.11) (471.2.2)
  • mto: This revision was merged to the branch mainline in revision 468.
  • Revision ID: git-v1:ae24387a7b1397750b6ec86d0f286373da05eb16
Fixed Display Version Information Form (not showing media name)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    {% trans "Save" %}, $("#userEditForm").submit()
21
21
{% endblock %}
22
22
 
23
 
{% block callBack %}userFormOpen{% endblock %}
24
 
 
25
23
{% block formHtml %}
26
24
    <div class="row">
27
25
        <div class="col-md-12">
28
 
            <ul class="nav nav-tabs" role="tablist">
29
 
                <li class="active"><a href="#general" role="tab" data-toggle="tab"><span>{% trans "Details" %}</span></a></li>
30
 
                <li><a href="#reference" role="tab" data-toggle="tab"><span>{% trans "Reference" %}</span></a></li>
 
26
            <form id="userEditForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("user.edit", {id: user.userId}) }}">
 
27
                {% set title %}{% trans "User Name" %}{% endset %}
 
28
                {% set helpText %}{% trans "The Login Name of the user." %}{% endset %}
 
29
                {{ forms.text("userName", title, user.userName, helpText, "", "required maxlength='50'") }}
 
30
 
 
31
                {% set title %}{% trans "Email" %}{% endset %}
 
32
                {% set helpText %}{% trans "The Email Address for this user." %}{% endset %}
 
33
                {{ forms.email("email", title, user.email, helpText) }}
 
34
                
31
35
                {% if currentUser.userTypeId == 1 %}
32
 
                    <li><a href="#notifications" role="tab" data-toggle="tab"><span>{% trans "Notifications" %}</span></a></li>
 
36
                    {# This is an admin user and can therefore change the users password #}
 
37
                    {% set title %}{% trans "New Password" %}{% endset %}
 
38
                    {% set helpText %}{% trans "The new Password for this user." %}{% endset %}
 
39
                    {{ forms.password("newPassword", title, "", helpText) }}
 
40
 
 
41
                    {% set title %}{% trans "Retype New Password" %}{% endset %}
 
42
                    {% set helpText %}{% trans "Repeat the new Password for this user." %}{% endset %}
 
43
                    {{ forms.password("retypeNewPassword", title, "", helpText) }}
33
44
                {% endif %}
34
 
            </ul>
35
 
            <form id="userEditForm" class="UserForm form-horizontal" method="put" action="{{ urlFor("user.edit", {id: user.userId}) }}">
36
 
                <div class="tab-content">
37
 
                    <div class="tab-pane active" id="general">
38
 
                        {% set title %}{% trans "User Name" %}{% endset %}
39
 
                        {% set helpText %}{% trans "The Login Name of the user." %}{% endset %}
40
 
                        {{ forms.input("userName", title, user.userName, helpText, "", "required maxlength='50'") }}
41
 
 
42
 
                        {% set title %}{% trans "Email" %}{% endset %}
43
 
                        {% set helpText %}{% trans "The Email Address for this user." %}{% endset %}
44
 
                        {{ forms.email("email", title, user.email, helpText) }}
45
 
 
46
 
                        {% if currentUser.userTypeId == 1 %}
47
 
                            {# This is an admin user and can therefore change the users password #}
48
 
                            {% set title %}{% trans "New Password" %}{% endset %}
49
 
                            {% set helpText %}{% trans "The new Password for this user." %}{% endset %}
50
 
                            {{ forms.password("newPassword", title, "", helpText) }}
51
 
 
52
 
                            {% set title %}{% trans "Retype New Password" %}{% endset %}
53
 
                            {% set helpText %}{% trans "Repeat the new Password for this user." %}{% endset %}
54
 
                            {{ forms.password("retypeNewPassword", title, "", helpText) }}
55
 
                        {% endif %}
56
 
 
57
 
                        {% set title %}{% trans "Homepage" %}{% endset %}
58
 
                        {% set helpText %}{% trans "Homepage for this user. This is the page they will be taken to when they login." %}{% endset %}
59
 
                        {{ forms.dropdown("homePageId", "single", title, user.homePageId, options.homepage, "pageId", "title", helpText) }}
60
 
 
61
 
                        {% set title %}{% trans "User Type" %}{% endset %}
62
 
                        {% set helpText %}{% trans "What is this users type?" %}{% endset %}
63
 
                        {{ forms.dropdown("userTypeId", "single", title, user.userTypeId, options.userTypes, "userTypeId", "userType", helpText) }}
64
 
 
65
 
                        {% set title %}{% trans "Library Quota" %}{% endset %}
66
 
                        {% set helpText %}{% trans "The quota that should be applied. Enter 0 for no quota." %}{% endset %}
67
 
                        <div class="form-group">
68
 
                            <label class="col-sm-2 control-label" for="libraryQuota">{{ title }}</label>
69
 
                            <div class="col-sm-6">
70
 
                                <input class="form-control" name="libraryQuota" type="number" id="libraryQuota" value="{{ user.libraryQuota }}" />
71
 
                                <span class="help-block">{{ helpText }}</span>
72
 
                            </div>
73
 
                            <div class="col-sm-4">
74
 
                                <select name="libraryQuotaUnits" class="form-control">
75
 
                                    <option value="kb">KiB</option>
76
 
                                    <option value="mb">MiB</option>
77
 
                                    <option value="gb">GiB</option>
78
 
                                </select>
79
 
                            </div>
80
 
                        </div>
81
 
 
82
 
                        {% set title %}{% trans "Retired?" %}{% endset %}
83
 
                        {% set helpText %}{% trans "Is this user retired?" %}{% endset %}
84
 
                        {{ forms.checkbox("retired", title, user.retired, helpText) }}
85
 
                    </div>
86
 
                    <div class="tab-pane" id="reference">
87
 
                        {% set title %}{% trans "First Name" %}{% endset %}
88
 
                        {% set helpText %}{% trans "The User's First Name." %}{% endset %}
89
 
                        {{ forms.input("firstName", title, user.firstName, helpText, "", "maxlength='254'") }}
90
 
 
91
 
                        {% set title %}{% trans "Last Name" %}{% endset %}
92
 
                        {% set helpText %}{% trans "The User's Last Name." %}{% endset %}
93
 
                        {{ forms.input("lastName", title, user.lastName, helpText, "", "maxlength='254'") }}
94
 
 
95
 
                        {% set title %}{% trans "Phone Number" %}{% endset %}
96
 
                        {% set helpText %}{% trans "The User's Phone Number." %}{% endset %}
97
 
                        {{ forms.input("phone", title, user.phone, helpText, "", "maxlength='254'") }}
98
 
 
99
 
                        {% set title %}{% trans "Reference 1" %}{% endset %}
100
 
                        {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %}
101
 
                        {{ forms.input("ref1", title, user.ref1, helpText, "", "maxlength='254'") }}
102
 
 
103
 
                        {% set title %}{% trans "Reference 2" %}{% endset %}
104
 
                        {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %}
105
 
                        {{ forms.input("ref2", title, user.ref2, helpText, "", "maxlength='254'") }}
106
 
 
107
 
                        {% set title %}{% trans "Reference 3" %}{% endset %}
108
 
                        {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %}
109
 
                        {{ forms.input("ref3", title, user.ref3, helpText, "", "maxlength='254'") }}
110
 
 
111
 
                        {% set title %}{% trans "Reference 4" %}{% endset %}
112
 
                        {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %}
113
 
                        {{ forms.input("ref4", title, user.ref4, helpText, "", "maxlength='254'") }}
114
 
 
115
 
                        {% set title %}{% trans "Reference 5" %}{% endset %}
116
 
                        {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %}
117
 
                        {{ forms.input("ref5", title, user.ref5, helpText, "", "maxlength='254'") }}
118
 
                    </div>
119
 
                    {% if currentUser.userTypeId == 1 %}
120
 
                        <div class="tab-pane" id="notifications">
121
 
                            {% set title %}{% trans "Receive System Notifications?" %}{% endset %}
122
 
                            {% set helpText %}{% trans "Should this User receive system notifications?" %}{% endset %}
123
 
                            {{ forms.checkbox("isSystemNotification", title, user.isSystemNotification, helpText) }}
124
 
 
125
 
                            {% set title %}{% trans "Receive Display Notifications?" %}{% endset %}
126
 
                            {% set helpText %}{% trans "Should this User receive Display notifications for Displays they have permission to see?" %}{% endset %}
127
 
                            {{ forms.checkbox("isDisplayNotification", title, user.isDisplayNotification, helpText) }}
128
 
                        </div>
129
 
                    {% endif %}
130
 
                </div>
 
45
 
 
46
                {% set title %}{% trans "Homepage" %}{% endset %}
 
47
                {% set helpText %}{% trans "Homepage for this user. This is the page they will be taken to when they login." %}{% endset %}
 
48
                {{ forms.dropdown("homePageId", "single", title, user.homePageId, options.homepage, "pageId", "title", helpText) }}
 
49
 
 
50
                {% set title %}{% trans "User Type" %}{% endset %}
 
51
                {% set helpText %}{% trans "What is this users type?" %}{% endset %}
 
52
                {{ forms.dropdown("userTypeId", "single", title, user.userTypeId, options.userTypes, "userTypeId", "userType", helpText) }}
 
53
 
 
54
                {% set title %}{% trans "Library Quota" %}{% endset %}
 
55
                {% set helpText %}{% trans "The quota in Kb that should be applied. Enter 0 for no quota." %}{% endset %}
 
56
                {{ forms.number("libraryQuota", title, user.libraryQuota, helpText) }}
 
57
 
 
58
                {% set title %}{% trans "Retired?" %}{% endset %}
 
59
                {% set helpText %}{% trans "Is this user retired?" %}{% endset %}
 
60
                {{ forms.checkbox("retired", title, user.retired, helpText) }}
131
61
            </form>
132
62
        </div>
133
63
    </div>