Skip to content
Snippets Groups Projects
Commit 08d3be74 authored by srosse's avatar srosse
Browse files

Merge OpenOLAT 9.3 to OpenOLAT default branch with 9395e31b5b685c8e95923a5cb9d3a6b0b454751c

parents 842f1f3b c1c071e7
No related branches found
No related tags found
No related merge requests found
...@@ -235,9 +235,12 @@ public class UserSearchFlexiController extends FlexiAutoCompleterController { ...@@ -235,9 +235,12 @@ public class UserSearchFlexiController extends FlexiAutoCompleterController {
} }
} }
@Override
protected String getSearchValue(UserRequest ureq) { protected String getSearchValue(UserRequest ureq) {
String searchValue = ureq.getParameter(autoCompleterContainer.getId(JSNAME_INPUTFIELD)); if(autoCompleterContainer != null) {
return searchValue; return ureq.getParameter(autoCompleterContainer.getId(JSNAME_INPUTFIELD));
}
return null;
} }
@Override @Override
......
...@@ -305,15 +305,26 @@ class ImportStep00 extends BasicStep { ...@@ -305,15 +305,26 @@ class ImportStep00 extends BasicStep {
} }
boolean isMandatoryField = um.isMandatoryUserProperty(usageIdentifyer, userPropertyHandler); boolean isMandatoryField = um.isMandatoryUserProperty(usageIdentifyer, userPropertyHandler);
if (isMandatoryField && !StringHelper.containsNonWhitespace(thisValue)) { if (isMandatoryField && !StringHelper.containsNonWhitespace(thisValue)) {
textAreaElement.setErrorKey("error.mandatory", new String[] { String.valueOf(i + 1), translate(userPropertyHandler.i18nFormElementLabelKey()) }); String label = "";
if(userPropertyHandler.i18nFormElementLabelKey() != null) {
label = translate(userPropertyHandler.i18nFormElementLabelKey());
}
textAreaElement.setErrorKey("error.mandatory", new String[] { String.valueOf(i + 1), label });
importDataError = true; importDataError = true;
break; break;
} }
// used for call-back value depending on PropertyHandler // used for call-back value depending on PropertyHandler
ValidationError validationError = new ValidationError(); ValidationError validationError = new ValidationError();
if (!userPropertyHandler.isValidValue(null, thisValue, validationError, getLocale())) { if (!userPropertyHandler.isValidValue(null, thisValue, validationError, getLocale())) {
textAreaElement.setErrorKey("error.lengthorformat", new String[] { String.valueOf(i + 1), translate(userPropertyHandler.i18nFormElementLabelKey()), String error = "unkown";
translate(validationError.getErrorKey(), validationError.getArgs()) }); String label = "";
if(userPropertyHandler.i18nFormElementLabelKey() != null) {
label = translate(userPropertyHandler.i18nFormElementLabelKey());
}
if(validationError.getErrorKey() != null) {
error = translate(validationError.getErrorKey(), validationError.getArgs());
}
textAreaElement.setErrorKey("error.lengthorformat", new String[] { String.valueOf(i + 1), label, error});
importDataError = true; importDataError = true;
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment