Merge pull request #338 from litvinovg/autocomplete_form
[i18n sprint] Language-neutral help text in autocomplete forms
This commit is contained in:
commit
1511e00c61
2 changed files with 3 additions and 3 deletions
|
@ -125,7 +125,7 @@ Also multiple types parameter set to true only if more than one type returned-->
|
|||
};
|
||||
var i18nStrings = {
|
||||
selectAnExisting: '${i18n().select_an_existing?js_string}',
|
||||
orCreateNewOne: '${i18n().or_create_new_one?js_string}',
|
||||
selectAnExistingOrCreateNewOne: '${i18n().select_an_existing_or_create_a_new_one?js_string}',
|
||||
selectedString: '${i18n().selected?js_string}'
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -695,10 +695,10 @@ var customForm = {
|
|||
// ac fields there are cases where we also have to check if the help text is already there
|
||||
if (!$(selectedObj).val() || $(selectedObj).hasClass(this.acHelpTextClass) || $(selectedObj).val().substring(0, 18) == customForm.selectAnExisting ) {
|
||||
typeText = this.getTypeNameForLabels($(selectedObj));
|
||||
var helpText = customForm.selectAnExisting + " " + typeText + " " + customForm.orCreateNewOne ;
|
||||
var helpText = customForm.selectAnExistingOrCreateNewOne ;
|
||||
//Different for object property autocomplete
|
||||
if ( this.acSelectOnly ) {
|
||||
helpText = customForm.selectAnExisting + " " + typeText;
|
||||
helpText = customForm.selectAnExisting;
|
||||
}
|
||||
$(selectedObj).val(helpText)
|
||||
.addClass(this.acHelpTextClass);
|
||||
|
|
Loading…
Add table
Reference in a new issue