diff --git a/e107_admin/users_extended.php b/e107_admin/users_extended.php
index 76c2f349e..07ede9995 100755
--- a/e107_admin/users_extended.php
+++ b/e107_admin/users_extended.php
@@ -483,10 +483,10 @@ class users_ext
}
$text .= "
-
+ |
- ".ADMIN_EDIT_ICON."
-
+ ".ADMIN_EDIT_ICON."
+
|
";
@@ -990,15 +990,17 @@ class users_ext
}
$var['main']['text'] = EXTLAN_34;
$var['main']['link'] = e_SELF;
+
+ $var['pre']['text'] = EXTLAN_45;
+ $var['pre']['link'] = e_SELF."?pre";
- $var['editext']['text'] = EXTLAN_45;
+ $var['editext']['text'] = "Add Custom Field";
$var['editext']['link'] = e_SELF."?editext";
$var['cat']['text'] = EXTLAN_35;
$var['cat']['link'] = e_SELF."?cat";
- $var['pre']['text'] = EXTLAN_56;
- $var['pre']['link'] = e_SELF."?pre";
+
show_admin_menu(EXTLAN_9, $action, $var);
}
diff --git a/e107_core/xml/user_extended.xml b/e107_core/xml/user_extended.xml
index a3e3c557b..9b77ff694 100644
--- a/e107_core/xml/user_extended.xml
+++ b/e107_core/xml/user_extended.xml
@@ -50,6 +50,20 @@
253
253
+ -
+ text
+ class='tbox' size='40' maxlength='254'
+ 253
+ 253
+ 253
+
+ -
+ radio
+ M => UE_LAN_MALE,F => UE_LAN_FEMALE
+ 253
+ 253
+ 253
+
-
text
class='tbox' size='40' maxlength='254'
diff --git a/e107_handlers/user_extended_class.php b/e107_handlers/user_extended_class.php
index 9755a4f12..45345a873 100644
--- a/e107_handlers/user_extended_class.php
+++ b/e107_handlers/user_extended_class.php
@@ -628,66 +628,113 @@ class e107_user_extended
function user_extended_edit($struct, $curval)
{
- global $tp;
- if(trim($curval) == "" && $struct['user_extended_struct_default'] != "")
- {
- $curval = $struct['user_extended_struct_default'];
- }
- $choices = explode(",",$struct['user_extended_struct_values']);
- foreach($choices as $k => $v)
- {
- $choices[$k] = str_replace("[E_COMMA]", ",", $choices[$k]);
- }
- $parms = explode("^,^",$struct['user_extended_struct_parms']);
- $include = preg_replace("/\n/", " ", $tp->toHtml($parms[0]));
- $regex = $tp->toText($parms[1]);
- $regexfail = $tp->toText($parms[2]);
- $fname = "ue[user_".$struct['user_extended_struct_name']."]";
- if(strpos($include, 'class') === FALSE)
- {
- $include .= " class='tbox' ";
- }
+ $tp = e107::getParser();
+ $frm = e107::getForm();
+
+ if(trim($curval) == "" && $struct['user_extended_struct_default'] != "")
+ {
+ $curval = $struct['user_extended_struct_default'];
+ }
+
+ $choices = explode(",",$struct['user_extended_struct_values']);
+
+ foreach($choices as $k => $v)
+ {
+ $choices[$k] = str_replace("[E_COMMA]", ",", $v);
+ }
+
+ $parms = explode("^,^",$struct['user_extended_struct_parms']);
+ $include = preg_replace("/\n/", " ", $tp->toHtml($parms[0]));
+ $regex = $tp->toText($parms[1]);
+ $regexfail = $tp->toText($parms[2]);
+ $fname = "ue[user_".$struct['user_extended_struct_name']."]";
+
+ if(strpos($include, 'class') === FALSE)
+ {
+ $include .= " class='tbox' ";
+ }
- switch($struct['user_extended_struct_type'])
- {
- case EUF_TEXT : //textbox
- case EUF_INTEGER : //integer
- $ret = "";
- return $ret;
- break;
+ switch($struct['user_extended_struct_type'])
+ {
+ case EUF_TEXT : //textbox
+ case EUF_INTEGER : //integer
+ $ret = "";
+ return $ret;
+ break;
- case EUF_RADIO : //radio
- $ret = '';
- foreach($choices as $choice)
- {
- $choice = trim($choice);
- $choice = deftrue($choice, $choice);
- $chk = ($curval == $choice)? " checked='checked' " : "";
- $ret .= " {$choice}";
- }
- return $ret;
+ case EUF_RADIO : //radio
+
+ $ret = '';
+
+ foreach($choices as $choice)
+ {
+ $choice = trim($choice);
+ if(strpos($choice,"|")!==FALSE)
+ {
+ list($val,$label) = explode("|",$choice);
+ }
+ elseif(strpos($choice," => ")!==FALSE) // new in v2.x
+ {
+ list($val,$label) = explode(" => ",$choice);
+ }
+ else
+ {
+ $val = $choice;
+ $label = $choice;
+ }
+
+ $label = deftrue($label, $label);
+
+ if(deftrue('e_BOOTSTRAP'))
+ {
+ $ret .= $frm->radio($fname,$val,($curval == $val),array('label'=>$label));
+ }
+ else
+ {
+ $chk = ($curval == $val)? " checked='checked' " : "";
+ $ret .= " {$label}";
+ }
+
+ }
+
+ return $ret;
+
break;
case EUF_CHECKBOX : //checkboxes
- foreach($choices as $choice)
- {
- $choice = trim($choice);
- if(strpos($choice,"|")!==FALSE)
+ foreach($choices as $choice)
{
- list($val,$label) = explode("|",$choice);
+ $choice = trim($choice);
+
+ if(strpos($choice,"|")!==FALSE)
+ {
+ list($val,$label) = explode("|",$choice);
+ }
+ elseif(strpos($choice," => ")!==FALSE) // new in v2.x
+ {
+ list($val,$label) = explode(" => ",$choice);
+ }
+ else
+ {
+ $val = $choice;
+ $label = $choice;
+ }
+ $label = deftrue($label, $label);
+
+ if(deftrue('e_BOOTSTRAP'))
+ {
+ $ret .= $frm->checkbox($fname,$val,($curval == $val),array('label'=>$label));
+ }
+ else
+ {
+ $chk = ($curval == $val)? " checked='checked' " : "";
+ $ret .= " {$label}
";
+ }
}
- else
- {
- $val = $choice;
- $label = $choice;
- }
- $label = deftrue($label, $label);
- $chk = ($curval == $val)? " checked='checked' " : "";
- $ret .= " {$label}
";
- }
- return $ret;
- break;
+
+ return $ret;
+ break;
case EUF_DROPDOWN : //dropdown
$ret = "