Put focus on acSelector field after type is selected in custom forms.
This commit is contained in:
parent
e4be7c255d
commit
5484036ee9
2 changed files with 8 additions and 3 deletions
|
@ -145,6 +145,7 @@ var customForm = {
|
||||||
} else if (this.typeSelector.length) {
|
} else if (this.typeSelector.length) {
|
||||||
this.typeSelector.val() ? this.acSelectorWrapper.show() : this.hideFields(this.acSelectorWrapper);
|
this.typeSelector.val() ? this.acSelectorWrapper.show() : this.hideFields(this.acSelectorWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initFormWithValidationErrors: function() {
|
initFormWithValidationErrors: function() {
|
||||||
|
@ -173,7 +174,13 @@ var customForm = {
|
||||||
|
|
||||||
// Reinitialize view. If no type selection in a two-step form, go back to type view;
|
// Reinitialize view. If no type selection in a two-step form, go back to type view;
|
||||||
// otherwise, reinitialize full view.
|
// otherwise, reinitialize full view.
|
||||||
(!typeVal.length && customForm.formSteps > 1) ? customForm.initFormTypeView() : customForm.initFormFullView();
|
if (!typeVal.length && customForm.formSteps > 1) {
|
||||||
|
customForm.initFormTypeView();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
customForm.initFormFullView();
|
||||||
|
customForm.acSelector.focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.verifyMatch.click(function() {
|
this.verifyMatch.click(function() {
|
||||||
|
|
|
@ -166,8 +166,6 @@
|
||||||
<c:set var="startYearRequiredHint" value="${requiredHint}" />
|
<c:set var="startYearRequiredHint" value="${requiredHint}" />
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<c:set var="editjson" scope="request">
|
<c:set var="editjson" scope="request">
|
||||||
{
|
{
|
||||||
"formUrl" : "${formUrl}",
|
"formUrl" : "${formUrl}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue