Disable first and last name in user edition if user is bound to any resource

FEA: ItEr76S27ResourceBinding
This commit is contained in:
Manuel Rego Casasnovas 2012-05-09 09:03:57 +02:00
parent 88920249ec
commit 521aa36bfc
2 changed files with 10 additions and 3 deletions

View file

@ -317,4 +317,8 @@ public class User extends BaseEntity implements IHumanIdentifiable{
return firstName + " " + lastName;
}
public boolean isBound() {
return worker != null;
}
}

View file

@ -2,7 +2,8 @@
This file is part of LibrePlan
Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
Desenvolvemento Tecnolóxico de Galicia
Desenvolvemento Tecnolóxico de Galicia
Copyright (C) 2010-2012 Igalia, S.L.
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
@ -53,12 +54,14 @@
<row>
<label value="${i18n:_('First name')}" />
<textbox id="firstName"
value="@{controller.user.firstName}" width="300px"/>
value="@{controller.user.firstName}" width="300px"
disabled="@{controller.user.bound}" />
</row>
<row>
<label value="${i18n:_('Last name')}" />
<textbox id="lastName"
value="@{controller.user.lastName}" width="300px"/>
value="@{controller.user.lastName}" width="300px"
disabled="@{controller.user.bound}" />
</row>
<row>
<label value="${i18n:_('Password')}" />