';
if ($savedRyform) {
foreach ($savedRyform as $id => $ryform) {
if (!is_object($ryform)) {
p('!!! ERROR !!!', $ryform);
continue;
}
$ryform->id = $id+1;
if (!isset($ryform->formName) || !$ryform->formName)
$ryform->formName = 'Element '.$id;
if (count($savedRyform) > 1)
$display_id = ''.strval(intval($id)+1).'';
else
$display_id = '';
$script_up = ($id != 0)?_l(_i('16/arrow_up', _t('up')), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.$id, 'ryform_action' => 'up')).' ':'';
$script_down = ($id != count($savedRyform)-1)?_l(_i('16/arrow_down', _t('down')), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.$id, 'ryform_action' => 'down')).' ':'';
$icon = (isset(self::$ryformsIcons[get_class($ryform)]))?self::$ryformsIcons[get_class($ryform)]:_i('32/brick');
$input .= _s('t row '.($id%2),
''._l(($def->type == DEF_TYPE_RYFORM?_i('16/arrow_redo', _t('change')):_i('16/add', _t('add'))), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.strval(intval($id)+1), 'ryform_action' => 'list')).' '.$display_id.' | '.
''.$script_up.$script_down.' | '.
'
'.$icon.' |
'.
_l($ryform->formName, $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.$id, 'ryform_action' => 'edit')).' '.
' '._t(get_class($ryform).'_short_description').' |
'.$ryform->getHtmlRepr().' |
| '.
_l(_i('16/script_edit', _t('edit')), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.$id, 'ryform_action' => 'edit')).' '.
_l(_i('16/script_code', _t('edit_source')), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.$id, 'ryform_action' => 'source')).' '.
_l(_i('16/script_delete', _t('del')), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':'.$id, 'ryform_action' => 'del')).' | | ');
}
}
$input .= '
';
if (count($savedRyform) == 0 || $def->type != DEF_TYPE_RYFORM) {
if (is_string($def->params))
$infos = _l(_i('16/add', _t('add')), $url_params, array('new_ryform' => $def->params, 'ryform_name' => $parent_ryform_name.$deffullname.':0', 'ryform_action' => 'add'));
else if (count($def->params) == 1)
$infos = _l(_i('16/add', _t('add')), $url_params, array('new_ryform' => $def->params[0], 'ryform_name' => $parent_ryform_name.$deffullname.':0', 'ryform_action' => 'add'));
else
$infos = _l(_i('16/add', _t('add')), $url_params, array('ryform_name' => $parent_ryform_name.$deffullname.':0', 'ryform_action' => 'list'));
if ($type == DEF_TYPE_RYFORMS_ARRAY)
$infos .= ' '._l(_i('16/application_form_add', _t('multiadd')), $url_params, array('ryform_name' => $deffullname, 'ryform_action' => 'list_multiadd'));
}
break;
case DEF_TYPE_FUNCTION:
if (is_array($def->defaultValue))
list($result_type, $value) = call_user_func_array($def->params, $def->defaultValue);
else
list($result_type, $value) = call_user_func($def->params);
if ($result_type == DATA_HTML_FORM) {
return array(DATA_HTML_FORM, $value);
} else {
unset($url_params[$deffullname.'_action']);
$input = $value;
}
break;
default:
$input = '