diff --git a/administrator/components/com_users/views/users/tmpl/modal.php b/administrator/components/com_users/views/users/tmpl/modal.php index 9baf6fe79c014..ec412b4e276ea 100644 --- a/administrator/components/com_users/views/users/tmpl/modal.php +++ b/administrator/components/com_users/views/users/tmpl/modal.php @@ -27,13 +27,29 @@ $enabledStates = array(0 => 'icon-publish', 1 => 'icon-unpublish'); $activatedStates = array(0 => 'icon-publish', 1 => 'icon-unpublish'); $userRequired = (int) $input->get('required', 0, 'int'); + +/** + * Mootools compatibility + * + * There is an extra option passed in the url for the iframe &ismoo=0 for the bootstraped field. + * By default the value will be 1 or defaults to mootools behaviour using function jSelectUser() + * + * This should be removed when mootools won't be shipped by Joomla. + */ +$isMoo = $input->getInt('ismoo', 1); + +if ($isMoo) +{ + $onClick = "window.parent.jSelectUser(this);window.parent.jQuery('.modal.in').modal('hide');"; +} + ?>