fixed asking for username on new device

This commit is contained in:
boccioli_m
2015-09-22 16:24:37 +02:00
parent 664602b751
commit ef82210c70

View File

@@ -497,18 +497,20 @@ public class NewTest extends javax.swing.JPanel {
"Please remove forbidden chars from the tests suite name; allowed are: "+ allowedChars.replace("\\", "").replace("*", ""));
return false;
}
if(!(txtContactName.getText().matches(ALLOWED_CHARSET3)
)){
SwingUtils.showMessage(this, "checkDataFields()",
"Please provide a valid user name");
return false;
} else{ //check if the user name is in LDAP *FOR THE MOMENT IT DOES NOT WORK*
if ( !userExists(txtContactName.getText())){
OptionResult ret = SwingUtils.showOption(this, "checkDataFields()",
"Could not find user name "+txtContactName.getText() + "\nDo you want to continue generating the test?", OptionType.YesNoCancel);
if(ret != OptionResult.Yes){
return false;
}
if (sType == TypeOfNewFile.Test){
if(!(txtContactName.getText().matches(ALLOWED_CHARSET3)
)){
SwingUtils.showMessage(this, "checkDataFields()",
"Please provide a valid user name");
return false;
} else{ //check if the user name is in LDAP *FOR THE MOMENT IT DOES NOT WORK*
if ( !userExists(txtContactName.getText())){
OptionResult ret = SwingUtils.showOption(this, "checkDataFields()",
"Could not find user name "+txtContactName.getText() + "\nDo you want to continue generating the test?", OptionType.YesNoCancel);
if(ret != OptionResult.Yes){
return false;
}
}
}
}
//check parameters table