1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-24 15:13:04 +02:00

Support for admin-ui multiple images in a single field.

Usage: 'type' => 'images', 'data' => 'array'
This commit is contained in:
Cameron
2014-08-18 05:22:51 -07:00
parent f4bb971696
commit 3ca4734a18
3 changed files with 33 additions and 7 deletions

View File

@@ -3358,18 +3358,20 @@ class e_form
break;
case 'images':
$value = str_replace(''',"'",html_entity_decode($value)); //FIXME @SecretR Horrible workaround to Line 3203 of admin_ui.php
$ival = e107::unserialize($value);
// return print_a($value, true);
for ($i=0; $i < 5; $i++)
{
$k = $key.'[path]['.$i.']';
$ret .= $this->imagepicker($k, $ival['path'][$i], defset($label, $label), $parms);
{
$k = $key.'['.$i.'][path]';
$ival = $value[$i]['path'];
$ret .= $this->imagepicker($k, $ival, defset($label, $label), $parms);
}
break;
//TODO 'files'
case 'file': //TODO - thumb, image list shortcode, js tooltip...
$label = varset($parms['label'], 'LAN_EDIT');
unset($parms['label']);