From 45819cfba20089d6a3f009c6399e485a63402e68 Mon Sep 17 00:00:00 2001 From: jean Date: Tue, 11 Sep 2012 14:56:13 +1200 Subject: [PATCH] FIX 7856 Show the Create button as disabled if no pagetypes are available for page creation --- javascript/CMSMain.AddForm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/javascript/CMSMain.AddForm.js b/javascript/CMSMain.AddForm.js index 6e4b7f83..d62e906b 100644 --- a/javascript/CMSMain.AddForm.js +++ b/javascript/CMSMain.AddForm.js @@ -55,6 +55,10 @@ } selectedEl.setSelected(true); selectedEl.siblings().setSelected(false); + + // Disable the "Create" button if none of the pagetypes are available + var buttonState = (this.find('#PageType li:not(.disabled)').length) ? 'enable' : 'disable'; + this.find('button[name=action_doAdd]').button(buttonState); } });