{# /** * Copyright (C) 2024 Xibo Signage Ltd * * Xibo - Digital Signage - https://xibosignage.com * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Xibo. If not, see . */ #} {% extends "form-base.twig" %} {% import "forms.twig" as forms %} {% block formTitle %} {% trans "Add User" %} {% endblock %} {% block formButtons %} {% trans "Cancel" %}, XiboDialogClose() {% trans "Save" %}, $("#userAddForm").submit() {% endblock %} {% block callBack %}userFormOpen{% endblock %} {% block formHtml %}
{% set title %}{% trans "Username" %}{% endset %} {% set helpText %}{% trans "The Username of the user." %}{% endset %} {{ forms.input("userName", title, "", helpText, "", "required maxlength='50'") }} {% set title %}{% trans "Password" %}{% endset %} {% set helpText %}{% trans "The Password for this user." %}{% endset %} {{ forms.password("password", title, "", helpText, "", "required") }} {% set title %}{% trans "Email" %}{% endset %} {% set helpText %}{% trans "The Email Address for this user." %}{% endset %} {{ forms.email("email", title, "", helpText) }} {% set title %}{% trans "User Type" %}{% endset %} {% set helpText %}{% trans "What is this users type?" %}{% endset %} {{ forms.dropdown("userTypeId", "single", title, options.defaultUserType, options.userTypes, "userTypeId", "userType", helpText) }} {% set title %}{% trans "Library Quota" %}{% endset %} {% set helpText %}{% trans "The quota that should be applied. Enter 0 for no quota." %}{% endset %}
{{ helpText }}
{% set attributes = [ { name: "data-live-search", value: "true" }, { name: "data-placeholder--id", value: null }, { name: "data-placeholder--value", value: "" }, { name: "data-search-url", value: url_for("group.search") }, { name: "data-search-term", value: "group" }, { name: "data-id-property", value: "groupId" }, { name: "data-text-property", value: "group" }, { name: "data-initial-key", value: "userGroupId" }, { name: "data-initial-value", value: options.defaultGroupId }, { name: "data-selected-text-format", value: "count > 4" } ] %} {% set title %}{% trans "Initial User Group" %}{% endset %} {% set helpText %}{% trans "Select a User Group for this User so that they get access to the parts of the application they need." %}{% endset %} {{ forms.dropdown("groupId", "single", title, null, [], "groupId", "group", helpText, "pagedSelect", "", "", "", attributes) }} {{ forms.message("User Groups are an easy way to configure a set of features and sharing which can be applied to multiple users. After adding a User they can be assigned to multiple Groups or have individual sharing assigned to them directly."|trans, "card p-3 mb-3 bg-light") }} {% set title %}{% trans "Homepage" %}{% endset %} {% set helpText %}{% trans "Homepage for this user. This is the page they will be taken to when they login." %}{% endset %}
{{ helpText }}
{% if currentUser.featureEnabled("folder.userHome") %}

{{ "Set a home folder to use as the default folder for new content."|trans }}

{{ forms.hidden("homeFolderId", 1) }}
{% endif %}
{% set title %}{% trans "First Name" %}{% endset %} {% set helpText %}{% trans "The User's First Name." %}{% endset %} {{ forms.input("firstName", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Last Name" %}{% endset %} {% set helpText %}{% trans "The User's Last Name." %}{% endset %} {{ forms.input("lastName", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Phone Number" %}{% endset %} {% set helpText %}{% trans "The User's Phone Number." %}{% endset %} {{ forms.input("phone", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Reference 1" %}{% endset %} {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %} {{ forms.input("ref1", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Reference 2" %}{% endset %} {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %} {{ forms.input("ref2", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Reference 3" %}{% endset %} {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %} {{ forms.input("ref3", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Reference 4" %}{% endset %} {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %} {{ forms.input("ref4", title, "", helpText, "", "maxlength='254'") }} {% set title %}{% trans "Reference 5" %}{% endset %} {% set helpText %}{% trans "A reference field for custom user data" %}{% endset %} {{ forms.input("ref5", title, "", helpText, "", "maxlength='254'") }}
{% if currentUser.userTypeId == 1 %}
{% set title %}{% trans "Receive System Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive system notifications?" %}{% endset %} {{ forms.checkbox("isSystemNotification", title, 0, helpText) }} {% set title %}{% trans "Receive Display Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive Display notifications for Displays they have permission to see?" %}{% endset %} {{ forms.checkbox("isDisplayNotification", title, 0, helpText) }} {% set title %}{% trans "Receive DataSet Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive DataSet notification emails?" %}{% endset %} {{ forms.checkbox("isDataSetNotification", title, 0, helpText) }} {% set title %}{% trans "Receive Layout Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive Layout notification emails?" %}{% endset %} {{ forms.checkbox("isLayoutNotification", title, 0, helpText) }} {% set title %}{% trans "Receive Library Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive Library notification emails?" %}{% endset %} {{ forms.checkbox("isLibraryNotification", title, 0, helpText) }} {% set title %}{% trans "Receive Report Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive Report notification emails?" %}{% endset %} {{ forms.checkbox("isReportNotification", title, 0, helpText) }} {% set title %}{% trans "Receive Schedule Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive Schedule notification emails?" %}{% endset %} {{ forms.checkbox("isScheduleNotification", title, 0, helpText) }} {% set title %}{% trans "Receive Custom Notifications?" %}{% endset %} {% set helpText %}{% trans "Should this User receive notifications emails for Notifications manually created in CMS?" %}{% endset %} {{ forms.checkbox("isCustomNotification", title, 0, helpText) }}
{% endif %}
{% set title %}{% trans "Hide navigation?" %}{% endset %} {% set helpText %}{% trans "Should the navigation side bar be hidden for this User?" %}{% endset %} {{ forms.checkbox("hideNavigation", title, 0, helpText) }} {% set title %}{% trans "Hide User Guide?" %}{% endset %} {% set helpText %}{% trans "Should this User see the new user guide when they log in?" %}{% endset %} {{ forms.checkbox("newUserWizard", title, 0, helpText) }} {% set title %}{% trans "Force Password Change" %}{% endset %} {% set helpText %}{% trans "Should this User be forced to change password next time they log in?" %}{% endset %} {{ forms.checkbox("isPasswordChangeRequired", title, 0, helpText) }}
{% endblock %}