[CLIENT] #17 : Le champs "nom utilisateur" est désormais bloqué lors d'une modification de compte

This commit is contained in:
Notmoo-PC\Notmoo 2018-01-25 16:07:15 +01:00
parent 3b27d5852b
commit 85972092f8
3 changed files with 9 additions and 0 deletions

View File

@ -19,6 +19,7 @@ class AccountManagerScreenController {
void setView(AccountManagerScreenView view) { void setView(AccountManagerScreenView view) {
this.view = view; this.view = view;
this.view.lockUserNameField(model.hasInitialValue());
} }
void updateView() { void updateView() {

View File

@ -28,6 +28,10 @@ class AccountManagerScreenModel {
return initialValue; return initialValue;
} }
boolean hasInitialValue(){
return initialValue!=null;
}
boolean isCurrentValueValid() { boolean isCurrentValueValid() {
return !currentValue.equals(initialValue) return !currentValue.equals(initialValue)
&& currentValue.getUsername()!=null && currentValue.getUsername()!=null

View File

@ -104,4 +104,8 @@ class AccountManagerScreenView implements IFXComponent{
} }
}); });
} }
void lockUserNameField(boolean lock) {
nameTextField.setDisable(lock);
}
} }