예제 #1
0
 function form($object)
 {
     if (!defined("SYS_FORMS")) {
         require_once BASE . "subsystems/forms.php";
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = "";
         $object->body = "";
     } else {
         $form->meta("id", $object->id);
     }
     $form->register("title", "Article Title", new textcontrol($object->title, 80, false, 200));
     $form->register("body", "Article Body", new htmleditorcontrol($object->body));
     $form->register("submit", "", new buttongroupcontrol("Save", "", "Cancel"));
     pathos_forms_cleanup();
     return $form;
 }
예제 #2
0
 function form($textitem = null)
 {
     pathos_lang_loadDictionary('standard', 'core');
     if (!defined('SYS_FORMS')) {
         include_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!$textitem) {
         $textitem->text = '';
         $form->meta('id', 0);
     } else {
         $form->meta('id', $textitem->id);
     }
     $form->register('text', '', new htmleditorcontrol($textitem->text));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     pathos_forms_cleanup();
     return $form;
 }
 function form($object)
 {
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('name', 'Milestone', new textcontrol($object->name));
     $form->register('description', 'Description', new texteditorcontrol($object->description));
     $form->register('submit', '', new buttongroupcontrol('Save', '', 'Cancel'));
     pathos_forms_cleanup();
     return $form;
 }
예제 #4
0
    }
    pathos_forms_initialize();
    $form = new form();
    $form->meta('module', 'codemapmodule');
    $form->meta('action', 'contact_send');
    $form->meta('stepstone_id', $_GET['id']);
    $form->register('email', 'Your Email', new textcontrol());
    $form->register('name', 'Your Name', new textcontrol());
    if ($stepstone->developer != '') {
        $form->meta('type', 'dev');
        // We have a developer
        $form->register('subject', 'Subject', new textcontrol());
        $form->register('message', 'Message', new texteditorcontrol());
        $template = new template('codemapmodule', '_form_contactDeveloper');
    } else {
        $form->meta('type', 'vol');
        $form->register(null, '', new htmlcontrol('<i>Please list your reasons for volunteering</i>'));
        $form->register('reasons', '', new texteditorcontrol());
        $form->register(null, '', new htmlcontrol('<i>How can you help with this feature?</i>'));
        $form->register('howhelp', '', new texteditorcontrol());
        $form->register(null, '', new htmlcontrol('<i>What past experience and qualifications do you have?</i>'));
        $form->register('experience', '', new texteditorcontrol());
        $template = new template('codemapmodule', '_form_contactVolunteer');
    }
    $form->register('submit', '', new buttongroupcontrol('Send', '', 'Cancel'));
    $template->assign('form_html', $form->toHTML());
    $template->output();
    pathos_forms_cleanup();
} else {
    echo SITE_404_HTML;
}