1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Issue #2952 Admin-ui : Form-handler 'layouts'

This commit is contained in:
Cameron
2018-01-09 10:20:53 -08:00
parent 1f34b4190e
commit bcc1604ccb

View File

@@ -5540,14 +5540,18 @@ class e_form
break; break;
case 'layouts': //to do - exclude param (exact match) case 'layouts': //to do - exclude param (exact match)
$location = varset($parms['plugin']); // empty - core
$ilocation = vartrue($parms['id'], $location); // omit if same as plugin name
$where = vartrue($parms['area'], 'front'); //default is 'front'
$filter = varset($parms['filter']);
$merge = vartrue($parms['merge']) ? true : false;
$location = varset($parms['plugin']); // empty - core
$ilocation = vartrue($parms['id'], $location); // omit if same as plugin name
$where = vartrue($parms['area'], 'front'); //default is 'front'
$filter = varset($parms['filter']);
$merge = isset($parms['merge']) ? (bool) $parms['merge'] : true;
if($tmp = e107::getTemplateInfo($location,$ilocation, null,true,$merge)) // read xxxx_INFO array from template file. $layouts = e107::getLayouts($location, $ilocation, $where, $filter, $merge, false);
return vartrue($parms['pre'],'').$this->select($key, $layouts,$value,$parms).vartrue($parms['post'],'');
/* if($tmp = e107::getTemplateInfo($location,$ilocation, null,true,$merge)) // read xxxx_INFO array from template file.
{ {
$opt = array(); $opt = array();
foreach($tmp as $k=>$inf) foreach($tmp as $k=>$inf)
@@ -5556,10 +5560,11 @@ class e_form
} }
return vartrue($parms['pre'],'').$this->select($key,$opt,$value,$parms).vartrue($parms['post'],''); return vartrue($parms['pre'],'').$this->select($key,$opt,$value,$parms).vartrue($parms['post'],'');
} }*/
$layouts = e107::getLayouts($location, $ilocation, $where, $filter, $merge, true);
/*
if(varset($parms['default']) && !isset($layouts[0]['default'])) if(varset($parms['default']) && !isset($layouts[0]['default']))
{ {
$layouts[0] = array('default' => $parms['default']) + $layouts[0]; $layouts[0] = array('default' => $parms['default']) + $layouts[0];
@@ -5574,8 +5579,10 @@ class e_form
} }
} }
*/
//$this->selectbox($key, $layouts, $value) //$this->selectbox($key, $layouts, $value)
$ret = (vartrue($parms['raw']) ? $layouts[0] : $this->radio_multi($key, $layouts[0], $value,array('sep'=>"<br />"), $info)); // $ret = (vartrue($parms['raw']) ? $layouts[0] : $this->radio_multi($key, $layouts[0], $value,array('sep'=>"<br />"), $info));
break; break;
case 'templates': //to do - exclude param (exact match) case 'templates': //to do - exclude param (exact match)