Have custom form Javascript enforce edit forms having one step, in case the custom form forgets to.

This commit is contained in:
rjy7 2010-04-16 13:41:17 +00:00
parent 072512c220
commit ff76c04e9f

View file

@ -87,7 +87,8 @@ var customForm = {
this.editType = $("input[name='editType']").val(); this.editType = $("input[name='editType']").val();
this.entryType = $("input[name='entryType']").val().capitalizeWords(); this.entryType = $("input[name='entryType']").val().capitalizeWords();
this.secondaryType = $("input[name='secondaryType']").val().capitalizeWords(); this.secondaryType = $("input[name='secondaryType']").val().capitalizeWords();
this.formSteps = $("input[name='steps']").val(); // Enforce one step for edit forms, in case the form forgets to
this.formSteps = this.editType === 'edit' ? '1' : $("input[name='steps']").val();
this.returnView = parseInt(this.returnViewField.val()); // returns NaN for empty string this.returnView = parseInt(this.returnViewField.val()); // returns NaN for empty string
}, },