mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 03:24:20 +02:00
Closes #4922 - Option for plugins to extend notification routing.
This commit is contained in:
@@ -456,7 +456,7 @@ class user_class
|
||||
|
||||
* @param string $extra_js - can add JS handlers (e.g. 'onclick', 'onchange') if required
|
||||
*/
|
||||
public function uc_dropdown($fieldname, $curval = 0, $optlist = '', $extra_js = '')
|
||||
public function uc_dropdown($fieldname, $curval = 0, $optlist = '', $extra_js = null)
|
||||
{
|
||||
$optlist = (string) $optlist;
|
||||
$show_classes = self::uc_required_class_list($optlist); // Get list of classes which meet criteria
|
||||
@@ -479,9 +479,9 @@ class user_class
|
||||
{
|
||||
$options = $extra_js;
|
||||
$extra_js = '';
|
||||
|
||||
}
|
||||
|
||||
$id = $fieldname;
|
||||
$class = "tbox form-control";
|
||||
|
||||
if(!empty($options['class']))
|
||||
@@ -489,6 +489,11 @@ class user_class
|
||||
$class .= " ".$options['class'];
|
||||
}
|
||||
|
||||
if(!empty($options['id']))
|
||||
{
|
||||
$id = $options['id'];
|
||||
}
|
||||
|
||||
|
||||
// Inverted Classes
|
||||
if(strpos($optlist, 'no-excludes') === FALSE)
|
||||
@@ -515,7 +520,8 @@ class user_class
|
||||
}
|
||||
|
||||
// Only return the select box if we've ended up with some options
|
||||
if ($text) $text = "\n<select class='".$class."' name='{$fieldname}' id='{$fieldname}' {$extra_js}>\n".$text."</select>\n";
|
||||
|
||||
if ($text) $text = "\n<select class='".$class."' name='$fieldname' id='$id' {$extra_js}>\n".$text."</select>\n";
|
||||
return $text;
|
||||
}
|
||||
|
||||
@@ -1144,7 +1150,6 @@ class user_class
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* See if a class can be edited (in the sense of the class ID not being fixed)
|
||||
* @param integer $classID - class number. Must be >= 0
|
||||
|
Reference in New Issue
Block a user