From c73ba9167ba4a01660be85b00f64764c074ab6a7 Mon Sep 17 00:00:00 2001 From: Earl Miles <merlin@logrus.com> Date: Thu, 29 Jan 2009 00:11:56 +0000 Subject: [PATCH] #364167 by drewish: Prevent a broken UI when the number of handlers does not match up to settings on a page. --- delegator/plugins/tasks/page.admin.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/delegator/plugins/tasks/page.admin.inc b/delegator/plugins/tasks/page.admin.inc index 9c4d6f46..4fd48af1 100644 --- a/delegator/plugins/tasks/page.admin.inc +++ b/delegator/plugins/tasks/page.admin.inc @@ -1135,7 +1135,9 @@ function delegator_page_argument_form_multiple(&$form, &$form_state) { '#description' => t('By allowing multiple handlers, the task handler UI will open up, allowing you to add and remove task handlers and adjust their priority.'), ); - if (count($task_handlers) > 1) { + // If they've selected multiple handlers and actually have more than one + // don't let them switch back to single. + if ($form_state['page']->multiple && count($task_handlers) > 1) { $form['multiple']['#disabled'] = TRUE; $form['multiple']['#description'] .= t('You may not modify this value while multiple task handlers exist. If you wish to change this to single only, you must reduce the number of task handlers attached to the page to zero or one.'); } -- GitLab