Esempio n. 1
0
 public static function profileForm($fields)
 {
     global $parametersMod;
     global $site;
     $standardForm = new \Library\Php\Form\Standard($fields);
     return $standardForm->generateForm($parametersMod->getValue('community', 'user', 'translations', 'button_update'), $site->generateUrl());
 }
Esempio n. 2
0
    public static function generateHtml($fields, $thank_you, $email_to, $button, $email_subject, $id, $layout = null)
    {
        global $site;
        global $module_url;
        global $log;
        switch ($layout) {
            default:
            case "default":
                $answer = '';
                $field = '';
                $field = new \Library\Php\Form\FieldHidden();
                $field->name = 'cm_group';
                $field->value = 'misc';
                $fields[] = $field;
                $field = new \Library\Php\Form\FieldHidden();
                $field->name = 'cm_name';
                $field->value = 'contact_form';
                $fields[] = $field;
                $field = new \Library\Php\Form\FieldHidden();
                $field->name = 'action';
                $field->value = 'contact_form';
                $fields[] = $field;
                $field = new \Library\Php\Form\FieldHidden();
                $field->name = 'module_group';
                $field->value = 'standard';
                $fields[] = $field;
                $field = new \Library\Php\Form\FieldHidden();
                $field->name = 'spec_id';
                $field->value = $id;
                $fields[] = $field;
                $field = new \Library\Php\Form\FieldHidden();
                $field->name = 'spec_url';
                $field->caption = 'URL';
                $field->value = $site->getCurrentUrl();
                $field->visible = false;
                $field->display = false;
                $fields[] = $field;
                $html_form = new \Library\Php\Form\Standard($fields);
                $answer .= $html_form->generateForm($button);
                return '
<div class="ipWidget ipWidgetContactForm">
  ' . $answer . '
</div>
';
        }
    }
Esempio n. 3
0
 private function exportForm()
 {
     global $parametersMod;
     global $cms;
     $answer = '';
     $export_form = new \Library\Php\Form\Standard($this->exportFields);
     $answer .= $export_form->generateForm($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'export_button'), $cms->generateUrl($cms->curModId, 'action=export'));
     return $answer;
 }