Skip to content
Snippets Groups Projects
Commit c73ba916 authored by Earl Miles's avatar Earl Miles
Browse files

#364167 by drewish: Prevent a broken UI when the number of handlers does not...

#364167 by drewish: Prevent a broken UI when the number of handlers does not match up to settings on a page.
parent 7169f50c
No related branches found
No related tags found
No related merge requests found
...@@ -1135,7 +1135,9 @@ function delegator_page_argument_form_multiple(&$form, &$form_state) { ...@@ -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.'), '#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']['#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.'); $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.');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment