mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 15:46:44 +02:00
Generic $frm->userclass() method added.
This commit is contained in:
@@ -1666,7 +1666,7 @@ class e_form
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//TODO
|
|
||||||
/**
|
/**
|
||||||
* Universal Userclass selector - checkboxes, dropdown, everything.
|
* Universal Userclass selector - checkboxes, dropdown, everything.
|
||||||
* @param $name - form element name
|
* @param $name - form element name
|
||||||
@@ -1675,9 +1675,20 @@ class e_form
|
|||||||
* @param options - query string or array. 'options=admin,mainadmin,classes&vetted=1&exclusions=0' etc.
|
* @param options - query string or array. 'options=admin,mainadmin,classes&vetted=1&exclusions=0' etc.
|
||||||
* @return the userclass form element
|
* @return the userclass form element
|
||||||
*/
|
*/
|
||||||
function userclass($name, $curval, $type, $options)
|
function userclass($name, $curval=255, $type=null, $options=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
switch ($type)
|
||||||
|
{
|
||||||
|
case 'checkbox':
|
||||||
|
return e107::getUserClass()->uc_checkboxes($name,$curval,$options,null,true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'dropdown':
|
||||||
|
default:
|
||||||
|
return e107::getUserClass()->uc_dropdown($name,$curval,$options);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user