i18n.
Email functionality bug fixes.
This commit is contained in:
parent
76d0576824
commit
58b8a3e1c5
2 changed files with 18 additions and 11 deletions
|
|
@ -244,7 +244,8 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
|
||||
if ( getSelectedConnector() != null && getSelectedConnector().getName().equals("E-mail") &&
|
||||
isEmailFieldsValid() == false ) {
|
||||
messages.showMessage(Level.ERROR, _("Check username/password/sender fields"));
|
||||
messages.showMessage(Level.ERROR, _("Check all fields"));
|
||||
|
||||
} else {
|
||||
ConstraintChecker.isValid(configurationWindow);
|
||||
if (checkValidEntitySequenceRows()) {
|
||||
|
|
@ -1297,7 +1298,8 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
key.equals(PredefinedConnectorProperties.JIRA_HOURS_TYPE) ||
|
||||
key.equals(PredefinedConnectorProperties.HOST) ||
|
||||
key.equals(PredefinedConnectorProperties.PORT) ||
|
||||
key.equals(PredefinedConnectorProperties.EMAIL_SENDER) ) {
|
||||
key.equals(PredefinedConnectorProperties.EMAIL_SENDER) ||
|
||||
key.equals(PredefinedConnectorProperties.PROTOCOL) ) {
|
||||
((InputElement) comp).setConstraint("no empty:"
|
||||
+ _("cannot be empty"));
|
||||
} else if ( key
|
||||
|
|
@ -1326,14 +1328,15 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
}
|
||||
|
||||
private boolean isEmailFieldsValid(){
|
||||
if ( protocolsCombobox.getSelectedItem().getLabel().equals("STARTTLS") &&
|
||||
emailUsernameTextbox.getValue() != null &&
|
||||
emailPasswordTextbox.getValue() != null &&
|
||||
emailUsernameTextbox.getValue().length() != 0 &&
|
||||
emailPasswordTextbox.getValue().length() != 0 &&
|
||||
emailSenderTextbox.getValue().matches("^\\S+@\\S+\\.\\S+$") )
|
||||
return true;
|
||||
|
||||
else return false;
|
||||
if ( protocolsCombobox != null && protocolsCombobox.getSelectedItem() != null ){
|
||||
if ( protocolsCombobox.getSelectedItem().getLabel().equals("STARTTLS") &&
|
||||
emailUsernameTextbox.getValue() != null &&
|
||||
emailPasswordTextbox.getValue() != null &&
|
||||
emailUsernameTextbox.getValue().length() != 0 &&
|
||||
emailPasswordTextbox.getValue().length() != 0 &&
|
||||
emailSenderTextbox.getValue().matches("^\\S+@\\S+\\.\\S+$") )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9298,4 +9298,8 @@ msgstr ""
|
|||
|
||||
#: libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/MachineCRUDController.java:631
|
||||
msgid "Machines limit reached"
|
||||
msgstr ""
|
||||
|
||||
#: libreplan-webapp/src/main/java/org/libreplan/web/common/ConfigurationController.java:247
|
||||
msgid "Check fields"
|
||||
msgstr ""
|
||||
Loading…
Add table
Reference in a new issue