20
20
{% trans "Save" %}, $("#userEditForm").submit()
23
{% block callBack %}userFormOpen{% endblock %}
25
23
{% block formHtml %}
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'") }}
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) }}
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) }}
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) }}
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'") }}
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) }}
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) }}
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) }}
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) }}
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) }}
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>
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>
82
{% set title %}{% trans "Retired?" %}{% endset %}
83
{% set helpText %}{% trans "Is this user retired?" %}{% endset %}
84
{{ forms.checkbox("retired", title, user.retired, helpText) }}
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'") }}
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'") }}
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'") }}
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'") }}
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'") }}
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'") }}
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'") }}
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'") }}
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) }}
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) }}
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) }}
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) }}
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) }}
58
{% set title %}{% trans "Retired?" %}{% endset %}
59
{% set helpText %}{% trans "Is this user retired?" %}{% endset %}
60
{{ forms.checkbox("retired", title, user.retired, helpText) }}