public function __get($var)
 {
     switch ($var) {
         case 'left_menu':
             $this->left_menu = '';
             return $this->left_menu;
             break;
         case 'content_rendered':
             return erLhcoreClassFormRenderer::renderForm($this);
             break;
         case 'xls_columns_data':
             $parts = explode('||', $this->xls_columns);
             $totalParts = array();
             foreach ($parts as $part) {
                 $subParts = explode(';', $part);
                 $dataParts = array();
                 foreach ($subParts as $subPart) {
                     $data = explode('=', $subPart);
                     $dataParts[$data[0]] = $data[1];
                 }
                 $totalParts[] = $dataParts;
             }
             return $this->xls_columns_data = $totalParts;
             break;
         case 'hide_delete':
             return $this->hide_delete = !erLhcoreClassUser::instance()->hasAccessTo('lhform', 'delete_fm');
             break;
         default:
             break;
     }
 }
示例#2
0
        echo erLhcoreClassDesign::baseurl('form/fill');
    }
    ?>
/<?php 
    echo $form->id;
    ?>
?new"><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/fill', 'Return');
    ?>
</a>
<?php 
} else {
    ?>

<?php 
    $errors = erLhcoreClassFormRenderer::getErrors();
    if (!empty($errors)) {
        ?>
		<?php 
        include erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php');
    }
    ?>

<form method="post" enctype="multipart/form-data" action="<?php 
    if (isset($action_url)) {
        echo $action_url;
    } else {
        echo erLhcoreClassDesign::baseurl('form/fill');
    }
    ?>
/<?php 
 public static function renderInputTypeEmail($params)
 {
     $additionalAttributes = self::renderAdditionalAtrributes($params);
     $value = '';
     if (ezcInputForm::hasPostData()) {
         $validationFields = array();
         $validationFields[$params['name']] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'validate_email');
         $form = new ezcInputForm(INPUT_POST, $validationFields);
         $Errors = array();
         if (!$form->hasValidData($params['name']) || isset($params['required']) && $params['required'] == 'required' && $form->{$params['name']} == '') {
             self::$errors[] = (isset($params['name_literal']) ? $params['name_literal'] : $params['name']) . ' ' . erTranslationClassLhTranslation::getInstance()->getTranslation('form/fill', 'is required');
         } elseif ($form->hasValidData($params['name'])) {
             $value = $form->{$params['name']};
             self::$collectedInfo[$params['name']] = array('main' => isset($params['main']) && $params['main'] == 'true', 'definition' => $params, 'value' => $form->{$params['name']});
             // It's main form e-mail
             if (self::$collectedInfo[$params['name']]['main'] == true) {
                 self::$mainEmail = self::$collectedInfo[$params['name']]['value'];
             }
         }
     } else {
         if (isset(self::$collectedInfo[$params['name']]['value'])) {
             $value = self::$collectedInfo[$params['name']]['value'];
         } else {
             $value = isset($params['value']) ? $params['value'] : '';
         }
     }
     $placeholder = isset($params['placeholder']) ? ' placeholder="' . htmlspecialchars($params['placeholder']) . '" ' : '';
     return "<input type=\"text\" name=\"{$params['name']}\" {$additionalAttributes} {$placeholder} value=\"" . htmlspecialchars($value) . "\" />";
 }
 public static function setCollectedInformation($information)
 {
     self::$collectedInfo = $information;
 }
示例#5
0
<?php

// For IE to support headers if chat is installed on different domain
header('P3P: CP="NOI ADM DEV COM NAV OUR STP"');
try {
    $form = erLhAbstractModelForm::fetch((int) $Params['user_parameters']['form_id']);
} catch (Exception $e) {
    erLhcoreClassModule::redirect();
    exit;
}
if ($form->active == 0) {
    erLhcoreClassModule::redirect();
    exit;
}
$tpl = erLhcoreClassTemplate::getInstance('lhform/fill.tpl.php');
$tpl->set('content', $form->content_rendered);
if (erLhcoreClassFormRenderer::isCollected()) {
    erLhcoreClassFormRenderer::storeCollectedInformation($form, erLhcoreClassFormRenderer::getCollectedInfo());
}
$tpl->set('form', $form);
$tpl->set('embed_mode', true);
$tpl->set('action_url', erLhcoreClassDesign::baseurl('form/formwidget'));
$Result['content'] = $tpl->fetch();
$Result['pagelayout'] = 'widget';
$Result['dynamic_height'] = true;
$Result['dynamic_height_append'] = 10;
$Result['dynamic_height_message'] = 'lhc_sizing_form_embed';
$Result['pagelayout_css_append'] = 'embed-widget';
<?php

$tpl = erLhcoreClassTemplate::getInstance('lhform/viewcollected.tpl.php');
$collected = erLhAbstractModelFormCollected::fetch((int) $Params['user_parameters']['collected_id']);
$object_trans = $collected->form->getModuleTranslations();
erLhcoreClassFormRenderer::setCollectedInformation($collected->content_array);
erLhcoreClassFormRenderer::setCollectedObject($collected);
$tpl->set('collected', $collected);
$tpl->set('form', $collected->form);
$tpl->set('content', $collected->form->content_rendered);
$Result['content'] = $tpl->fetch();
$Result['path'] = array();
$Result['path'][] = $object_trans['path'];
$Result['path'][] = array('url' => erLhcoreClassDesign::baseurl('abstract/list') . '/Form', 'title' => $object_trans['name']);
$Result['path'][] = array('url' => erLhcoreClassDesign::baseurl('form/collected') . '/' . $collected->form->id, 'title' => $collected->form);
$Result['path'][] = array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('form/viewcollected', 'Collected information'));
$Result['additional_header_css'] = '<link rel="stylesheet" type="text/css" href="' . erLhcoreClassDesign::designCSS('css/jquery-ui-1.10.4.custom.css') . '" />';
$Result['additional_header_js'] = '<script type="text/javascript" language="javascript" src="' . erLhcoreClassDesign::designJS('js/jquery-ui-1.10.4.custom.min.js') . '"></script>';