From ff76c04e9f7108e5721589044651c1021490770c Mon Sep 17 00:00:00 2001 From: rjy7 Date: Fri, 16 Apr 2010 13:41:17 +0000 Subject: [PATCH] Have custom form Javascript enforce edit forms having one step, in case the custom form forgets to. --- productMods/edit/forms/js/customForm.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/productMods/edit/forms/js/customForm.js b/productMods/edit/forms/js/customForm.js index f133d94b..3a3a058c 100644 --- a/productMods/edit/forms/js/customForm.js +++ b/productMods/edit/forms/js/customForm.js @@ -87,7 +87,8 @@ var customForm = { this.editType = $("input[name='editType']").val(); this.entryType = $("input[name='entryType']").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 },