TASKPM/libreplan-webapp/src/main/webapp/users/_editUser.zul

169 lines
8.8 KiB
Text
Raw Normal View History

<!--
This file is part of LibrePlan
Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
Desenvolvemento Tecnolóxico de Galicia
This program 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
(at your option) any later version.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<?taglib uri="/WEB-INF/tld/i18n.tld" prefix="i18n" ?>
<window id="${arg.top_id}">
<caption id="caption" sclass="caption-title" />
<tabbox>
<tabs>
<tab label="${i18n:_('User data')}"></tab>
</tabs>
<tabpanels>
<tabpanel>
<vbox>
<!-- User details -->
<vbox>
<label value="${i18n:_('Password cannot be managed for LDAP users because LDAP authentication is being used')}" visible="@{controller.ldapUserLdapConfiguration}" />
</vbox>
<groupbox closable="false">
<caption label="${i18n:_('General user data')}" />
<grid fixedLayout="false" span="true">
<columns>
<column width="200px" />
<column />
</columns>
<rows>
<row>
<label value="${i18n:_('Login name')}" />
<textbox id="loginName"
value="@{controller.user.loginName}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"
onBlur="controller.updateWindowTitle()"
disabled="@{controller.ldapUser}" />
</row>
<row>
<label value="${i18n:_('First name')}" />
<textbox id="firstName"
value="@{controller.user.firstName}" width="300px"/>
</row>
<row>
<label value="${i18n:_('Last name')}" />
<textbox id="lastName"
value="@{controller.user.lastName}" width="300px"/>
</row>
<row>
<label value="${i18n:_('Password')}" />
<textbox id="password" type="password"
onChange="controller.setPassword(self.value);" width="300px" disabled="@{controller.ldapUserLdapConfiguration}"/>
</row>
<row>
<label value="${i18n:_('Password confirmation')}" />
<textbox id="passwordConfirmation" type="password"
constraint="@{controller.validatePasswordConfirmation}"
width="300px" disabled="@{controller.ldapUserLdapConfiguration}"/>
</row>
<row>
<label value="${i18n:_('Disabled')}" />
<checkbox id="disabled"
checked="@{controller.user.disabled}" width="300px"
disabled="@{controller.ldapUser}" />
</row>
<row>
<label value="${i18n:_('E-mail')}" />
<textbox id="email"
value="@{controller.user.email}" width="300px"/>
</row>
<row>
<label value="${i18n:_('Authentication type')}" />
<label value="@{controller.user.authenticationType}" />
</row>
</rows>
</grid>
</groupbox>
<!-- Associated UserRoles -->
<groupbox closable="false">
<caption label="${i18n:_('Association with roles')}" />
<vbox>
<label value="${i18n:_('Roles of LDAP users cannot be managed because LDAP roles are being used.')}" visible="@{controller.ldapUserRolesLdapConfiguration}" />
</vbox>
<hbox align="center">
<combobox id="userRolesCombo" autodrop="true" />
<button label="${i18n:_('Add role')}"
onClick="controller.addSelectedRole()" disabled="@{controller.ldapUserRolesLdapConfiguration}"/>
</hbox>
<grid id="listing" model="@{controller.roles}">
<columns sizable="true">
<column label="${i18n:_('Role name')}" />
<column label="${i18n:_('Actions')}" />
</columns>
<rows>
<row self="@{each='role'}" value="@{role}">
<label value="@{role.displayName}" />
<hbox>
<button sclass="icono" image="/common/img/ico_borrar1.png"
hoverImage="/common/img/ico_borrar.png"
tooltiptext="${i18n:_('Delete')}"
onClick="controller.removeRole(self.parent.parent.value);" disabled="@{controller.ldapUserRolesLdapConfiguration}">
</button>
</hbox>
</row>
</rows>
</grid>
</groupbox>
<!-- Associated Profiles -->
<groupbox closable="false">
<caption label="${i18n:_('Association with profiles')}" />
<vbox>
<label value="${i18n:_('Profiles of LDAP users cannot be managed because LDAP roles are being used.')}" visible="@{controller.ldapUserRolesLdapConfiguration}" />
</vbox>
<hbox align="center">
<autocomplete id="profileAutocomplete"
autodrop="true" constraint=""
finder="ProfileFinder" />
<button label="${i18n:_('Add profile')}"
onClick="controller.addSelectedProfile()" disabled="@{controller.ldapUserRolesLdapConfiguration}"/>
</hbox>
<grid id="profilesListing" model="@{controller.profiles}">
<columns sizable="true">
<column label="${i18n:_('Profile name')}" />
<column label="${i18n:_('Actions')}" />
</columns>
<rows>
<row self="@{each='profile'}" value="@{profile}">
<label value="@{profile.profileName}" />
<hbox>
<button sclass="icono" image="/common/img/ico_borrar1.png"
hoverImage="/common/img/ico_borrar.png"
tooltiptext="${i18n:_('Delete')}"
onClick="controller.removeProfile(self.parent.parent.value);" disabled="@{controller.ldapUserRolesLdapConfiguration}">
</button>
</hbox>
</row>
</rows>
</grid>
</groupbox>
</vbox>
</tabpanel>
</tabpanels>
</tabbox>
<button onClick="controller.saveAndExit();"
label="${i18n:_('Save')}" sclass="save-button global-action" />
<button onClick="controller.saveAndContinue();"
label="${i18n:_('Save &amp; Continue')}" sclass="saveandcontinue-button global-action" />
<button onClick="controller.cancelForm();"
label="${i18n:_('Cancel')}" sclass="cancel-button global-action" />
</window>