diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java index 9ce701fad..dc6d24aed 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java @@ -284,16 +284,7 @@ public class UserCRUDController extends BaseCRUDController implements //because they are not directly associated to an attribute passwordBox.setRawValue(""); passwordConfirmationBox.setRawValue(""); - hideAuthenticationTypesCombo(); - } - - private void hideAuthenticationTypesCombo() { - Row comboRow = (Row) editWindow - .getFellowIfAny("authenticationTypeComboRow"); - Row labelRow = (Row) editWindow - .getFellowIfAny("authenticationTypeLabelRow"); - comboRow.setVisible(false); - labelRow.setVisible(true); + prepareAuthenticationTypesCombo(); } @Override @@ -323,10 +314,7 @@ public class UserCRUDController extends BaseCRUDController implements Row comboRow = (Row) editWindow .getFellowIfAny("authenticationTypeComboRow"); - Row labelRow = (Row) editWindow - .getFellowIfAny("authenticationTypeLabelRow"); comboRow.setVisible(true); - labelRow.setVisible(false); } @Override @@ -489,6 +477,11 @@ public class UserCRUDController extends BaseCRUDController implements } public void setAuthenticationType(Comboitem item) { + if (item == null) { + throw new WrongValueException( + editWindow.getFellowIfAny("authenticationTypeCombo"), + _("cannot be empty")); + } UserAuthenticationType authenticationType = (UserAuthenticationType) item .getValue(); User user = getUser(); diff --git a/libreplan-webapp/src/main/webapp/users/_editUser.zul b/libreplan-webapp/src/main/webapp/users/_editUser.zul index 034b80802..76c6a1075 100644 --- a/libreplan-webapp/src/main/webapp/users/_editUser.zul +++ b/libreplan-webapp/src/main/webapp/users/_editUser.zul @@ -90,10 +90,6 @@ - -