{#** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA *#} {% import '@PrestaShop/Admin/macros.html.twig' as ps %} {% trans_default_domain 'Admin.Advparameters.Feature' %} {% block employee_addons_connect %} {% include '@PrestaShop/Admin/Module/Includes/modal_addons_connect.html.twig' with { 'level' : level, 'errorMessage' : errorMessage } %} {% endblock %} {% block employee_form %} {{ form_start(employeeForm) }}

{{ 'Employees'|trans }}

{{ form_errors(employeeForm) }} {{ ps.form_group_row(employeeForm.firstname, {}, { 'label': 'First name'|trans({}, 'Admin.Global') }) }} {{ ps.form_group_row(employeeForm.lastname, {}, { 'label': 'Last name'|trans({}, 'Admin.Global') }) }}
{{ ps.form_group_row(employeeForm.email, {}, { 'label': 'Email address'|trans({}, 'Admin.Global') }) }} {% set passwordHelpMessage = 'Password should be at least %num% characters long.'|trans({ '%num%': 8 }, 'Admin.Advparameters.Help') %} {% if isRestrictedAccess %} {% set oldPasswordVars = employeeForm.change_password.old_password.vars|merge(old_password|default({})) %} {% set newPasswordFirstVars = employeeForm.change_password.new_password.children.first.vars|merge(new_password.first_options|default({})) %} {% set newPasswordSecondVars = employeeForm.change_password.new_password.children.second.vars|merge(new_password.second_options|default({})) %}
{# "Change password" button #} {{ form_widget(employeeForm.change_password.change_password_button, { label: 'Change password...'|trans({}, 'messages'), attr: { class: 'btn-outline-secondary js-change-password', } }) }}
{# Current password input #} {{ ps.form_group_row(employeeForm.change_password.old_password, oldPasswordVars, { label: 'Current password'|trans({}, 'messages'), required: true, }) }} {# New password first input #}
{{ ps.label_with_help('New password'|trans({}, 'messages'), passwordHelpMessage, '', employeeForm.change_password.new_password.children.first.vars.id, true) }}
{{ ps.form_widget_with_error(employeeForm.change_password.new_password.children.first, employeeForm.change_password.new_password.children.first.vars) }}
{# New password second input (confirmation) #} {# Empty help text needed to render the text container for validation feedback messages #} {{ ps.form_group_row(employeeForm.change_password.new_password.children.second, newPasswordSecondVars, { label: 'Confirm password'|trans({}, 'messages'), help: '', required: true, }) }}
{{ form_widget(employeeForm.change_password.generated_password) }}
{{ form_widget(employeeForm.change_password.generate_password_button, { label: 'Generate password'|trans({}, 'messages'), attr: { class: 'btn-outline-secondary', } }) }}
{{ ps.form_group_row(employeeForm.change_password.cancel_button, { label: 'Cancel'|trans({}, 'Admin.Actions'), attr: { class: 'btn-outline-secondary js-change-password-cancel', } }) }} {# Password strength feedback messages - used in JS #}
{{ 'Invalid'|trans({}, 'messages') }} {{ 'Okay'|trans({}, 'messages') }} {{ 'Good'|trans({}, 'messages') }} {{ 'Fabulous'|trans({}, 'messages') }}
{% else %} {{ ps.form_group_row(employeeForm.password, {}, { 'label': 'Password'|trans({}, 'Admin.Global'), 'help': passwordHelpMessage, }) }} {% endif %} {% if isRestrictedAccess and showAddonsConnectButton %}
{% if employeeForm.prestashop_addons.vars.is_addons_connected %}

account_circle {{ 'You are currently connected as %username%' |trans({}, 'Admin.Advparameters.Feature') |replace({ '%username%': employeeForm.prestashop_addons.vars.addons_username }) }}

{% endif %}
{% if employeeForm.prestashop_addons.vars.is_addons_connected %} {% set label, target = 'Sign out from PrestaShop Addons'|trans({}, 'Admin.Advparameters.Feature'), '#module-modal-addons-logout' %} {% else %} {% set label, target = 'Sign in'|trans({}, 'Admin.Advparameters.Feature'), '#module-modal-addons-connect' %} {% endif %} {{ form_widget(employeeForm.prestashop_addons, { attr: { 'class': 'btn-outline-secondary', 'data-toggle': 'modal', 'data-target': target, }, label: label, }) }}
{% endif %} {{ ps.form_group_row(employeeForm.optin, {}, { 'label': 'Subscribe to PrestaShop newsletter'|trans, 'help': 'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, you can disable this option.'|trans({}, 'Admin.Advparameters.Help') }) }} {{ ps.form_group_row(employeeForm.default_page, {'attr': {'data-minimumResultsForSearch': '7', 'data-toggle': 'select2'}}, { 'label': 'Default page'|trans, 'help': 'This page will be displayed just after login.'|trans({}, 'Admin.Advparameters.Help') }) }} {{ ps.form_group_row(employeeForm.language, {}, { 'label': 'Language'|trans({}, 'Admin.Global') }) }} {% if not isRestrictedAccess %} {{ ps.form_group_row(employeeForm.active, {}, { 'label': 'Active'|trans({}, 'Admin.Global'), 'help': 'Allow or disallow this employee to log in to the Admin panel.'|trans({}, 'Admin.Advparameters.Help') }) }} {{ ps.form_group_row(employeeForm.profile, { 'attr': { 'data-admin-profile': superAdminProfileId, 'data-get-tabs-url': getTabsUrl, } }, { 'label': 'Permission profile'|trans({}, 'Admin.Advparameters.Feature') }) }} {% if employeeForm.shop_association is defined %} {{ ps.form_group_row(employeeForm.shop_association, {}, { 'label': 'Shop association'|trans({}, 'Admin.Global'), 'help': 'Select the shops the employee is allowed to access.'|trans({}, 'Admin.Advparameters.Help') }) }} {% endif %} {% endif %} {% block employee_form_rest %} {{ form_rest(employeeForm) }} {% endblock %}
{{ form_end(employeeForm) }} {% endblock %}