mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Admin-UI: Fix for writeParms filter/batch while using 'optArray'
This commit is contained in:
@@ -5903,6 +5903,16 @@ class e_admin_form_ui extends e_form
|
||||
break;
|
||||
|
||||
case 'dropdown': // use the array $parm;
|
||||
|
||||
if(!empty($parms['optArray']))
|
||||
{
|
||||
$fopts = $parms;
|
||||
$parms = $fopts['optArray'];
|
||||
unset($fopts['optArray']);
|
||||
$parms['__options'] = $fopts;
|
||||
}
|
||||
|
||||
|
||||
if(!is_array(varset($parms['__options']))) parse_str($parms['__options'], $parms['__options']);
|
||||
$opts = $parms['__options'];
|
||||
if(vartrue($opts['multiple']))
|
||||
|
@@ -2824,7 +2824,7 @@ class e_form
|
||||
{
|
||||
$attributes['type'] = $parms['type'];
|
||||
}
|
||||
|
||||
|
||||
$this->renderValueTrigger($field, $value, $parms, $id);
|
||||
|
||||
$tp = e107::getParser();
|
||||
@@ -2987,6 +2987,15 @@ class e_form
|
||||
|
||||
if(!is_array(varset($wparms['__options']))) parse_str($wparms['__options'], $wparms['__options']);
|
||||
|
||||
if(!empty($wparms['optArray']))
|
||||
{
|
||||
$fopts = $wparms;
|
||||
$wparms = $fopts['optArray'];
|
||||
unset($fopts['optArray']);
|
||||
$wparms['__options'] = $fopts;
|
||||
}
|
||||
|
||||
|
||||
$opts = $wparms['__options'];
|
||||
unset($wparms['__options']);
|
||||
$_value = $value;
|
||||
@@ -3606,7 +3615,16 @@ class e_form
|
||||
$parms['pattern'] = vartrue($attributes['pattern'], $required_data[3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// XXX Fixes For the above. - use optArray variable. eg. $field['key']['writeParms']['optArray'] = array('one','two','three');
|
||||
if(($attributes['type'] == 'dropdown' || $attributes['type'] == 'radio') && !empty($parms['optArray']))
|
||||
{
|
||||
$fopts = $parms;
|
||||
$parms = $fopts['optArray'];
|
||||
unset($fopts['optArray']);
|
||||
$parms['__options'] = $fopts;
|
||||
}
|
||||
|
||||
$this->renderElementTrigger($key, $value, $parms, $required_data, $id);
|
||||
|
||||
switch($attributes['type'])
|
||||
|
Reference in New Issue
Block a user