mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Added 'country' option to user-extended admin area.
This commit is contained in:
@@ -845,7 +845,7 @@ e107::js('footer-inline', js());
|
|||||||
$curVal = '1';
|
$curVal = '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
$types = e107::getUserExt()->user_extended_types;
|
$types = e107::getUserExt()->getFieldTypes();
|
||||||
|
|
||||||
return $this->select('user_extended_struct_type', $types, $curVal, array('class'=>'tbox e-select'));
|
return $this->select('user_extended_struct_type', $types, $curVal, array('class'=>'tbox e-select'));
|
||||||
|
|
||||||
|
@@ -70,19 +70,19 @@ class e107_user_extended
|
|||||||
define('EUF_COUNTRY', 13); // $frm->country()
|
define('EUF_COUNTRY', 13); // $frm->country()
|
||||||
|
|
||||||
$this->typeArray = array(
|
$this->typeArray = array(
|
||||||
'text' => 1,
|
'text' => EUF_TEXT,
|
||||||
'radio' => 2,
|
'radio' => EUF_RADIO,
|
||||||
'dropdown' => 3,
|
'dropdown' => EUF_DROPDOWN,
|
||||||
'db field' => 4,
|
'db field' => EUF_DB_FIELD,
|
||||||
'textarea' => 5,
|
'textarea' => EUF_TEXTAREA,
|
||||||
'integer' => 6,
|
'integer' => EUF_INTEGER,
|
||||||
'date' => 7,
|
'date' => EUF_DATE,
|
||||||
'language' => 8,
|
'language' => EUF_LANGUAGE,
|
||||||
'list' => 9,
|
'list' => EUF_PREDEFINED,
|
||||||
'checkbox' => 10,
|
'checkbox' => EUF_CHECKBOX,
|
||||||
'predefined' => 11, // DON'T USE IT IN PREDEFINED FIELD XML!!! Used in plugin installation routine.
|
'predefined' => EUF_PREFIELD, // DON'T USE IT IN PREDEFINED FIELD XML!!! Used in plugin installation routine.
|
||||||
'addon' => 12,
|
'addon' => EUF_ADDON,
|
||||||
'country' => 13,
|
'country' => EUF_COUNTRY,
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->user_extended_types = array(
|
$this->user_extended_types = array(
|
||||||
@@ -95,7 +95,8 @@ class e107_user_extended
|
|||||||
7 => LAN_DATE,
|
7 => LAN_DATE,
|
||||||
8 => UE_LAN_8,
|
8 => UE_LAN_8,
|
||||||
9 => UE_LAN_9,
|
9 => UE_LAN_9,
|
||||||
10=> UE_LAN_10
|
10=> UE_LAN_10,
|
||||||
|
13=> UE_LAN_13
|
||||||
// 12=> UE_LAN_10
|
// 12=> UE_LAN_10
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -492,6 +493,11 @@ class e107_user_extended
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the field-type of a given field-name.
|
||||||
|
* @param $field
|
||||||
|
* @return bool|int
|
||||||
|
*/
|
||||||
public function getFieldType($field)
|
public function getFieldType($field)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -504,6 +510,17 @@ class e107_user_extended
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a list of all field types.
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getFieldTypes()
|
||||||
|
{
|
||||||
|
return $this->user_extended_types;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the field creation text for a definition
|
// Return the field creation text for a definition
|
||||||
/**
|
/**
|
||||||
* @param $type
|
* @param $type
|
||||||
@@ -566,7 +583,11 @@ class e107_user_extended
|
|||||||
{
|
{
|
||||||
$default_text = '';
|
$default_text = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $db_type.$default_text;
|
return $db_type.$default_text;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user