Commit 6b9e2664 authored by yan_nick's avatar yan_nick Committed by Chris Johnson

Issue #1795790 by yannickoo and loominade: Horrible UI in menu condition -...

Issue #1795790 by yannickoo and loominade: Horrible UI in menu condition - adjusted to allow menu item select element to grow in size with a cap to provide better usability
parent 2343769e
......@@ -41,8 +41,10 @@ class context_condition_menu extends context_condition {
*/
function condition_form($context) {
$form = parent::condition_form($context);
$menu_count = count($form['#options'], COUNT_RECURSIVE);
$form['#type'] = 'select';
$form['#multiple'] = TRUE;
$form['#attributes'] = array('size' => $menu_count > 20 ? 20 : $menu_count);
return $form;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment