1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 00:27:45 +02:00

Userclass exclusion added to default drop-down menu.

This commit is contained in:
CaMer0n
2009-08-04 14:36:56 +00:00
parent 96cdd31536
commit 5ebd168620
4 changed files with 38 additions and 31 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/userclass_class.php,v $
| $Revision: 1.36 $
| $Date: 2009-07-16 08:15:35 $
| $Revision: 1.37 $
| $Date: 2009-08-04 14:36:54 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -333,10 +333,25 @@ class user_class
else
{
$s = ($curval == $k && $curval !== '') ? "selected='selected'" : "";
$text .= "<option value='".$k."' ".$s.">".$v."</option>\n";
$text .= "<option class='uc-select' value='".$k."' ".$s.">".$v."</option>\n";
}
}
// Inverted Classes
if(strpos($optlist, "no-excludes") !== TRUE)
{
$text .= "\n<optgroup label=\"".UC_LAN_INVERTLABEL."\">\n";
foreach ($show_classes as $k => $v)
{
if($k != '0' && $k!=255 && $k !=251) // remove everyone, nobody and readonly from list.
{
$s = ($curval == ('-'.$k) && $curval !== '') ? "selected='selected'" : "";
$text .= "<option class='uc-select-inverted' value='-".$k."' ".$s.">".str_replace("--CLASS--", $v, UC_LAN_INVERT)."</option>\n";
}
}
$text .= "</optgroup>\n";
}
if (strpos($optlist, "language") !== FALSE && $pref['multilanguage'])
{
$text .= "<optgroup label=' ------ ' />\n";
@@ -349,8 +364,8 @@ class user_class
}
// Only return the select box if we've ended up with some options
if ($text) $text = "<select class='tbox select' name='{$fieldname}' {$extra_js}>\n".$text."</select>\n";
return $text;
if ($text) $text = "\n<select class='tbox select' name='{$fieldname}' {$extra_js}>\n".$text."</select>\n";
return $text.$curVal;
}