当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_QuickForm::createElement方法代码示例

本文整理汇总了PHP中HTML_QuickForm::createElement方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_QuickForm::createElement方法的具体用法?PHP HTML_QuickForm::createElement怎么用?PHP HTML_QuickForm::createElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_QuickForm的用法示例。


在下文中一共展示了HTML_QuickForm::createElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formPoolData

 function formPoolData($name)
 {
     $lang = services::getService('lang');
     $params = services::getService('pageParams');
     $cats = services::getService('cats');
     $this->form($name);
     // Add some elements to the form
     $this->addElement('text', 'poolname', $lang->getMsg('pooldata_form_name'), array('size' => 30, 'maxlength' => 50));
     $this->addElement('textarea', 'pooldesc', $lang->getMsg('pooldata_form_description'), array('rows' => 8, 'cols' => 50));
     $this->addElement('text', 'poolarea', $lang->getMsg('pooldata_form_area'), array('size' => 30, 'maxlength' => 50));
     /*$is_located = array();
       $is_located[] = HTML_QuickForm::createElement('radio', null, null, $lang->getMsg('pooldata_form_is_located_no'), 0);
       $is_located[] = HTML_QuickForm::createElement('radio', null, null, $lang->getMsg('pooldata_form_is_located_yes'), 1);
       $this->addGroup($is_located, 'is_located', $lang->getMsg('pooldata_form_is_located'), '<br>');*/
     $countries = services::getService('countries');
     $this->addElement('select', 'poolcountry', $lang->getMsg('pooldata_form_country'), $countries->getAsArray());
     $adress[] =& HTML_QuickForm::createElement('text', 'plz1', null, array('size' => 2, 'maxlength' => 2));
     $adress[] =& HTML_QuickForm::createElement('text', 'plz2', null, array('size' => 3, 'maxlength' => 3));
     $adress[] =& HTML_QuickForm::createElement('text', 'city', null, array('size' => 20, 'maxlength' => 30));
     $this->addGroup($adress, 'pooladress', $lang->getMsg('userdata_adress2'), '&nbsp;');
     $this->addElement('select', 'is_public', $lang->getMsg('pooldata_form_is_public'), array("0" => $lang->getMsg('pooldata_form_is_located_no'), "1" => $lang->getMsg('pooldata_form_is_located_yes')));
     if ($params->getParam('pool_id')) {
         $this->addElement('hidden', 'pool_id', $params->getParam('pool_id'));
     }
     $this->addElement('submit', 'submit', $lang->getMsg('pooldata_form_submit'));
     // Define filters and validation rules
     $this->registerRule('securehtml', 'callback', 'secureHtml');
     $this->addRule('poolname', $lang->getMsg('pooldata_form_namenecessary'), 'required');
     $this->addRule('pooldesc', $lang->getMsg('pooldata_form_descnecessary'), 'required');
     $this->addRule('pooldesc', $lang->getMsg('pooldata_form_securehtml'), 'securehtml');
     $this->addRule('poolarea', $lang->getMsg('pooldata_form_areanecessary'), 'required');
     $adressrules['plz1'][] = array($lang->getMsg('userdata_plz_numeric'), 'numeric');
     $adressrules['plz2'][] = array($lang->getMsg('userdata_plz_numeric'), 'numeric');
     $this->addGroupRule('pooladress', $adressrules);
 }
开发者ID:BackupTheBerlios,项目名称:cosmopool-multi-svn,代码行数:35,代码来源:formPoolData.php

示例2: getForm

 function getForm()
 {
     if ($this->form) {
         return $this->form;
     }
     $options = array('format' => 'd m Y H i', 'optionIncrement' => array('i' => 15), 'minYear' => date('Y') - 2, 'maxYear' => date('Y') + 2);
     $form = new HTML_QuickForm('protokol', 'POST', $this->url());
     $form->addElement('hidden', 'elev_id');
     $form->addElement('hidden', 'id');
     $form->addElement('date', 'date_start', 'Startdato:', $options);
     $form->addElement('date', 'date_end', 'Slutdato:', $options);
     $radio[0] =& HTML_QuickForm::createElement('radio', null, null, 'fri', '1');
     $radio[1] =& HTML_QuickForm::createElement('radio', null, null, 'syg', '2');
     $radio[2] =& HTML_QuickForm::createElement('radio', null, null, 'fraværende', '3');
     $radio[5] =& HTML_QuickForm::createElement('radio', null, null, 'henstilling', '6');
     $radio[3] =& HTML_QuickForm::createElement('radio', null, null, 'mundtlig advarsel', '4');
     $radio[4] =& HTML_QuickForm::createElement('radio', null, null, 'skriftlig advarsel', '5');
     $radio[6] =& HTML_QuickForm::createElement('radio', null, null, 'hjemsendt', '7');
     $radio[7] =& HTML_QuickForm::createElement('radio', null, null, 'andet', '8');
     $form->addGroup($radio, 'type', 'Type:', ' ');
     $form->addElement('textarea', 'text', '');
     $form->addElement('submit', null, 'Send');
     $form->addRule('date_start', 'Husk dato', 'required', null, 'client');
     $form->addRule('date_end', 'Husk dato', 'required', null, 'client');
     $form->addRule('type', 'Husk type', 'required', null, 'client');
     $form->addRule('text', 'Tekst', 'required', null, 'client');
     return $this->form = $form;
 }
开发者ID:vih,项目名称:intranet.vih.dk,代码行数:28,代码来源:Item.php

示例3: add_elements_to_form

 /**
  * Adds checkboxes / radioboxes to the form.
  */
 function add_elements_to_form($attributes)
 {
     $elements = array();
     $all_elements = $this->_type->list_all();
     foreach ($all_elements as $key => $value) {
         if ($this->_type->allow_multiple) {
             $elements[] = HTML_QuickForm::createElement('checkbox', $key, $key, $this->_translate($value), array('class' => 'checkbox'));
         } else {
             $elements[] = HTML_QuickForm::createElement('radio', null, $key, $this->_translate($value), $key, array('class' => 'radiobutton'));
         }
     }
     if ($this->render_mode == 'auto') {
         if (sizeof($elements) > $this->list_threshold) {
             $this->render_mode = 'vertical';
         } else {
             $this->render_mode = 'horizontal';
         }
     }
     $separator = '<span class="separator separator-' . $this->render_mode . '"></span>';
     $group = $this->_form->addGroup($elements, $this->name, $this->_translate($this->_field['title']), $separator);
     if ($this->_type->allow_multiple) {
         $attributes['class'] = 'checkbox checkbox-' . $this->render_mode;
         $group->setAttributes($attributes);
     } else {
         $attributes['class'] = 'radiobox radiobox-' . $this->render_mode;
         $group->setAttributes($attributes);
     }
 }
开发者ID:nemein,项目名称:openpsa,代码行数:31,代码来源:radiocheckselect.php

示例4: buildQuickForm

 /**
  * Function to actually build the form
  *
  * @return void
  * @access public
  */
 public function buildQuickForm()
 {
     require_once 'CRM/Utils/Money.php';
     $this->_first = true;
     $attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage');
     // name
     $this->add('text', 'title', ts('Title'), $attributes['title'], true);
     $this->add('select', 'contribution_type_id', ts('Contribution Type'), CRM_Contribute_PseudoConstant::contributionType(), true);
     $this->addWysiwyg('intro_text', ts('Introductory Message'), $attributes['intro_text']);
     $this->addWysiwyg('footer_text', ts('Footer Message'), $attributes['footer_text']);
     // is on behalf of an organization ?
     $this->addElement('checkbox', 'is_organization', ts('Allow individuals to contribute and / or signup for membership on behalf of an organization?'), null, array('onclick' => "showHideByValue('is_organization',true,'for_org_text','table-row','radio',false);showHideByValue('is_organization',true,'for_org_option','table-row','radio',false);"));
     $options = array();
     $options[] = HTML_QuickForm::createElement('radio', null, null, ts('Optional'), 1);
     $options[] = HTML_QuickForm::createElement('radio', null, null, ts('Required'), 2);
     $this->addGroup($options, 'is_for_organization', ts(''));
     $this->add('textarea', 'for_organization', ts('On behalf of Label'), $attributes['for_organization']);
     // collect goal amount
     $this->add('text', 'goal_amount', ts('Goal Amount'), array('size' => 8, 'maxlength' => 12));
     $this->addRule('goal_amount', ts('Please enter a valid money value (e.g. %1).', array(1 => CRM_Utils_Money::format('99.99', ' '))), 'money');
     // is this page active ?
     $this->addElement('checkbox', 'is_active', ts('Is this Online Contribution Page Active?'));
     // should the honor be enabled
     $this->addElement('checkbox', 'honor_block_is_active', ts('Honoree Section Enabled'), null, array('onclick' => "showHonor()"));
     $this->add('text', 'honor_block_title', ts('Honoree Section Title'), $attributes['honor_block_title']);
     $this->add('textarea', 'honor_block_text', ts('Honoree Introductory Message'), $attributes['honor_block_text']);
     // add optional start and end dates
     $this->addDateTime('start_date', ts('Start Date'));
     $this->addDateTime('end_date', ts('End Date'));
     $this->addFormRule(array('CRM_Contribute_Form_ContributionPage_Settings', 'formRule'));
     parent::buildQuickForm();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:38,代码来源:Settings.php

示例5: __construct

 public function __construct()
 {
     parent::__construct('delete_interest', 'Delete Interest', 'Admin/delete_interest.php');
     if ($this->loginError) {
         return;
     }
     $form = new HTML_QuickForm('deleter');
     $interest_list = new pdAuthInterests($this->db);
     $form->addElement('select', 'interests', 'Select interest(s) to delete:', $interest_list->list, array('multiple' => 'multiple', 'size' => 15));
     $form->addGroup(array(HTML_QuickForm::createElement('button', 'cancel', 'Cancel', array('onclick' => 'history.back()')), HTML_QuickForm::createElement('submit', 'submit', 'Delete')), null, null, '&nbsp;', false);
     if ($form->validate()) {
         $values = $form->exportValues();
         foreach ($values['interests'] as $interest_id) {
             $names[] = $interest_list->list[$interest_id];
         }
         $interest_list->dbDelete($this->db, $values['interests']);
         echo 'You have successfully removed the following interest from the ', 'database: <br/><b>', implode(', ', $names), '</b></p>', '<br><a href="', $_SERVER['PHP_SELF'], '">Delete another interest</a>';
     } else {
         $renderer =& $form->defaultRenderer();
         $form->accept($renderer);
         $this->form =& $form;
         $this->renderer =& $renderer;
         echo '<h3>Delete Interest </h3>';
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:25,代码来源:delete_interest.php

示例6: buildQuickForm

 /**
  * This function provides the HTML form elements that are specific to the Individual Contact Type
  * 
  * @access public
  * @return None 
  */
 function buildQuickForm(&$form)
 {
     $form->applyFilter('__ALL__', 'trim');
     // prefix
     $form->addElement('select', 'prefix_id', ts('Prefix'), array('' => ts('- prefix -')) + CRM_Core_PseudoConstant::individualPrefix());
     $attributes = CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Individual');
     // first_name
     $form->addElement('text', 'first_name', ts('First Name'), $attributes['first_name']);
     //middle_name
     $form->addElement('text', 'middle_name', ts('Middle Name'), $attributes['middle_name']);
     // last_name
     $form->addElement('text', 'last_name', ts('Last Name'), $attributes['last_name']);
     // suffix
     $form->addElement('select', 'suffix_id', ts('Suffix'), array('' => ts('- suffix -')) + CRM_Core_PseudoConstant::individualSuffix());
     // nick_name
     $form->addElement('text', 'nick_name', ts('Nick Name'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'nick_name'));
     // greeting type
     $form->addElement('select', 'greeting_type', ts('Greeting'), CRM_Core_SelectValues::greeting());
     // job title
     $form->addElement('text', 'job_title', ts('Job title'), $attributes['job_title']);
     // radio button for gender
     $genderOptions = array();
     $gender = CRM_Core_PseudoConstant::gender();
     foreach ($gender as $key => $var) {
         $genderOptions[$key] = HTML_QuickForm::createElement('radio', null, ts('Gender'), $var, $key);
     }
     $form->addGroup($genderOptions, 'gender_id', ts('Gender'));
     $form->addElement('checkbox', 'is_deceased', null, ts('Contact is deceased'));
     $form->addElement('date', 'birth_date', ts('Date of birth'), CRM_Core_SelectValues::date('birth'));
     $form->addRule('birth_date', ts('Select a valid date.'), 'qfDate');
     $form->addElement('text', 'home_URL', ts('Website'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'home_URL'));
     $form->addRule('home_URL', ts('Enter a valid Website.'), 'url');
     $config =& CRM_Core_Config::singleton();
     CRM_Core_ShowHideBlocks::links($this, 'demographics', '', '');
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:41,代码来源:Individual.php

示例7: buildForm

 function buildForm()
 {
     $this->_formBuilt = true;
     $this->addElement('header', 'data_header', 'Your personal data');
     $name[] =& HTML_QuickForm::createElement('text', 'first', 'Firstname', array('size' => 16, 'maxlength' => 63));
     $name[] =& HTML_QuickForm::createElement('text', 'last', 'Lastname', array('size' => 16, 'maxlength' => 63));
     $this->addGroup($name, 'name', 'Your name :', null, false);
     $this->addElement('text', 'company', 'Your company :', array('size' => 30, 'maxlength' => 63));
     $this->addElement('text', 'address1', 'Your address :', array('size' => 30, 'maxlength' => 63));
     $this->addElement('text', 'address2', '&nbsp;', array('size' => 30, 'maxlength' => 63));
     $this->addElement('text', 'zip', 'Zip code :', array('size' => 16, 'maxlength' => 16));
     $this->addElement('text', 'city', 'City :', array('size' => 30, 'maxlength' => 63));
     $countries = array('FR' => 'France', 'GE' => 'Germany', 'RU' => 'Russia', 'UK' => 'United Kingdom');
     $this->addElement('select', 'country', 'Your country :', $countries);
     $this->addElement('text', 'phone', 'Phone number :', array('size' => 16, 'maxlength' => 16));
     $this->addElement('text', 'fax', 'Fax number :', array('size' => 16, 'maxlength' => 16));
     $prevnext[] =& $this->createElement('submit', $this->getButtonName('back'), '<< Previous step');
     $prevnext[] =& $this->createElement('submit', $this->getButtonName('next'), 'Finish');
     $this->addGroup($prevnext, 'buttons', '', '&nbsp;', false);
     $this->addGroupRule('name', 'First and last names are required', 'required');
     $this->addRule('company', 'Company is required', 'required');
     $this->addRule('address1', 'Address is required', 'required');
     $this->addRule('city', 'City is required', 'required');
     $this->setDefaultAction('next');
 }
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:25,代码来源:regWizard.php

示例8: getForm

 function getForm()
 {
     if ($this->form) {
         return $this->form;
     }
     $faggruppe = VIH_Model_Fag_Gruppe::getList();
     foreach ($faggruppe as $grp) {
         $faggruppelist[$grp->get('id')] = $grp->get('navn');
     }
     $undervisere = VIH_Model_Ansat::getList('lærere');
     $form = new HTML_QuickForm('fag', 'POST', $this->url());
     $form->addElement('hidden', 'id');
     $form->addElement('text', 'navn', 'Navn');
     $form->addElement('select', 'faggruppe_id', 'Faggruppe', $faggruppelist);
     $form->addElement('text', 'identifier', 'Identifier');
     $form->addElement('textarea', 'kort_beskrivelse', 'Kort beskrivelse', array('cols' => 80, 'rows' => 5));
     $form->addElement('textarea', 'beskrivelse', 'Beskrivelse', array('cols' => 80, 'rows' => 20));
     $form->addElement('textarea', 'udvidet_beskrivelse', 'Udvidet beskrivelse', array('cols' => 80, 'rows' => 20));
     $form->addElement('header', null, 'Til søgemaskinerne');
     $form->addElement('text', 'title', 'Titel');
     $form->addElement('textarea', 'description', 'Beskrivelse');
     $form->addElement('textarea', 'keywords', 'Nøgleord');
     $underviserlist = array();
     foreach ($undervisere as $underviser) {
         $underviserlist[] = HTML_QuickForm::createElement('checkbox', $underviser->get('id'), null, $underviser->get('navn'));
     }
     $form->addGroup($underviserlist, 'underviser', 'Underviser', '<br />');
     $form->addElement('checkbox', 'published', 'Udgivet');
     $form->addElement('submit', null, 'Gem');
     return $this->form = $form;
 }
开发者ID:vih,项目名称:intranet.vih.dk,代码行数:31,代码来源:Edit.php

示例9: formRegister2

 function formRegister2($name, $login, $pass, $email)
 {
     $lang = services::getService('lang');
     $this->form($name);
     // Add some elements to the form
     $this->addElement('hidden', 'name', $login);
     $this->addElement('hidden', 'password', $pass);
     $this->addElement('hidden', 'email', $email);
     $adress1 = array();
     $adress1[] =& HTML_QuickForm::createElement('text', 'street', null, array('size' => 20, 'maxlength' => 50));
     $adress1[] =& HTML_QuickForm::createElement('text', 'house', null, array('size' => 3, 'maxlength' => 10));
     $this->addGroup($adress1, 'adress1', $lang->getMsg('userdata_adress1'), '&nbsp;');
     $adress2 = array();
     $adress2[] =& HTML_QuickForm::createElement('text', 'plz', null, array('size' => 5, 'maxlength' => 5));
     $adress2[] =& HTML_QuickForm::createElement('text', 'city', null, array('size' => 20, 'maxlength' => 30));
     $this->addGroup($adress2, 'adress2', $lang->getMsg('userdata_adress2'), '&nbsp;');
     $this->addElement('select', 'country', $lang->getMsg('userdata_country'), array("DE" => $lang->getMsg('country_DE'), "AT" => $lang->getMsg('country_AT'), "CH" => $lang->getMsg('country_CH'), "GR" => $lang->getMsg('country_GR'), "US" => $lang->getMsg('country_US'), "GB" => $lang->getMsg('country_GB')));
     $this->addElement('checkbox', 'adresspublic', $lang->getMsg('userdata_adresspublic'));
     $this->addElement('checkbox', 'emailpublic', $lang->getMsg('userdata_emailpublic'));
     $this->addElement('text', 'phone', $lang->getMsg('userdata_phone'), array('size' => 20, 'maxlength' => 20));
     $this->addElement('checkbox', 'phonepublic', $lang->getMsg('userdata_phonepublic'));
     $this->addElement('textarea', 'description', $lang->getMsg('userdata_description'), array('rows' => 5, 'cols' => 50));
     // Define filters and validation rules
     $this->addElement('submit', 'submit2', $lang->getMsg('register_submit2'));
     // Define filters and validation rules
     $adress1rules['street'][] = array($lang->getMsg('userdata_street_necessary'), 'required');
     $adress1rules['house'][] = array($lang->getMsg('userdata_house_necessary'), 'required');
     $adress2rules['plz'][] = array($lang->getMsg('userdata_plz_necessary'), 'required');
     $adress2rules['plz'][] = array($lang->getMsg('userdata_plz_numeric'), 'numeric');
     $adress2rules['city'][] = array($lang->getMsg('userdata_city_necessary'), 'required');
     $this->addGroupRule('adress1', $adress1rules);
     $this->addGroupRule('adress2', $adress2rules);
 }
开发者ID:BackupTheBerlios,项目名称:cosmopool-multi-svn,代码行数:33,代码来源:formRegister.php

示例10: array

 /**
  * Defines how a radio button widget should be built.
  *
  * @param Dataface_Record $record The Dataface_Record that is being edited.
  * @param array &$field The field configuration data structure that the widget is being generated for.
  * @param HTML_QuickForm The form to which the field is to be added.
  * @param string $formFieldName The name of the field in the form.
  * @param boolean $new Whether this widget is being built for a new record form.
  * @return HTML_QuickForm_element The element that can be added to a form.
  *
  */
 function &buildWidget(&$record, &$field, &$form, $formFieldName, $new = false)
 {
     $widget =& $field['widget'];
     if (!@$widget['separator']) {
         $widget['separator'] = '<br />';
     }
     if (isset($field['vocabulary']) and $field['vocabulary']) {
         $radios = array();
         $dummyForm = new HTML_QuickForm();
         $options =& Dataface_FormTool::getVocabulary($record, $field);
         $options__classes = Dataface_FormTool::getVocabularyClasses($record, $field);
         // CSS classes
         foreach ($options as $opt_val => $opt_text) {
             if ($opt_val === '') {
                 continue;
             }
             $radios[] =& $dummyForm->createElement('radio', null, null, $opt_text, $opt_val, array('class' => 'radio-of-' . $field['name'] . ' ' . @$options__classes[$opt_val]));
         }
         $factory =& Dataface_FormTool::factory();
         $el =& $factory->addGroup($radios, $field['name'], $widget['label']);
     } else {
         error_log("Your field {$formFieldName} is missing the vocabulary directive.");
         throw new Exception("Your field {$formFieldName} is missing the vocabulary directive.");
     }
     return $el;
 }
开发者ID:JerOrc,项目名称:xataface-module-radio,代码行数:37,代码来源:widget.php

示例11: __construct

 public function __construct()
 {
     parent::__construct('authorize_new_users');
     if ($this->loginError) {
         return;
     }
     $this->loadHttpVars(true, true);
     $this->users = pdUserList::getNotVerified($this->db);
     echo '<h2>Users Requiring Authentication</h2>';
     if ($this->users == null || count($this->users) == 0) {
         echo 'All users authorized.';
         return;
     }
     $form = new HTML_QuickForm('authorizeUsers', 'post');
     foreach ($this->users as $user) {
         $form->addGroup(array(HTML_QuickForm::createElement('advcheckbox', "submit[auth][{$user->login}]", null, null, null, array('no', 'yes')), HTML_QuickForm::createElement('select', "submit[access][{$user->login}]", null, AccessLevel::getAccessLevels()), HTML_QuickForm::createElement('static', null, null, $user->login), HTML_QuickForm::createElement('static', null, null, $user->name), HTML_QuickForm::createElement('static', null, null, $user->email)), 'all', null, '</td><td class="stats_odd">', false);
     }
     $form->addElement('submit', null, 'Submit');
     $this->form =& $form;
     if ($form->validate()) {
         $this->processForm();
     } else {
         $this->renderForm();
     }
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:25,代码来源:authorize_new_users.php

示例12: buildQuickForm

 /**
  * Function to actually build the form
  *
  * @return None
  * @access public
  */
 function buildQuickForm()
 {
     //Setting Upload File Size
     $config =& new CRM_Core_Config();
     if ($config->maxImportFileSize >= 8388608) {
         $uploadFileSize = 8388608;
     } else {
         $uploadFileSize = $config->maxImportFileSize;
     }
     $uploadSize = round($uploadFileSize / (1024 * 1024), 2);
     $this->assign('uploadSize', $uploadSize);
     $this->add('file', 'uploadFile', ts('Import Data File'), 'size=30 maxlength=60', true);
     $this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile');
     $this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array(1 => $uploadSize, 2 => $uploadFileSize)), 'maxfilesize', $uploadFileSize);
     $this->setMaxFileSize($uploadFileSize);
     $this->addRule('uploadFile', ts('Input file must be in CSV format'), 'asciiFile');
     $this->addElement('checkbox', 'skipColumnHeader', ts('First row contains column headers'));
     $duplicateOptions = array();
     $duplicateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('Skip'), CRM_CONTRIBUTE_IMPORT_PARSER_DUPLICATE_SKIP);
     $duplicateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('Update'), CRM_CONTRIBUTE_IMPORT_PARSER_DUPLICATE_UPDATE);
     $duplicateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('Fill'), CRM_CONTRIBUTE_IMPORT_PARSER_DUPLICATE_FILL);
     // for contributions NOCHECK == SKIP
     //      $duplicateOptions[] = HTML_QuickForm::createElement('radio',
     //          null, null, ts('No Duplicate Checking'), CRM_Contribute_Import_Parser::DUPLICATE_NOCHECK);
     $this->addGroup($duplicateOptions, 'onDuplicate', ts('On duplicate entries'));
     $this->setDefaults(array('onDuplicate' => CRM_CONTRIBUTE_IMPORT_PARSER_DUPLICATE_SKIP));
     //build date formats
     require_once 'CRM/Core/Form/Date.php';
     CRM_Core_Form_Date::buildAllowedDateFormats($this);
     $this->addButtons(array(array('type' => 'upload', 'name' => ts('Continue >>'), 'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', 'isDefault' => true), array('type' => 'cancel', 'name' => ts('Cancel'))));
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:37,代码来源:UploadFile.php

示例13: add_elements_to_form

 /**
  * Adds a (multi)select widget to the form, depending on the base type config.
  */
 function add_elements_to_form($attributes)
 {
     // Let us try to be a bit smarter here, avoiding an all-out load for read-only
     // fields.
     // TODO: This doesn't support Access control yet.
     if ($this->_field['readonly']) {
         $this->_all_elements = array();
         foreach ($this->_type->selection as $key) {
             $this->_all_elements[$key] = $this->_type->get_name_for_key($key);
         }
     } else {
         $this->_all_elements = $this->_type->list_all();
     }
     $select_attributes = array_merge($attributes, array('class' => $this->_type->allow_multiple ? 'list' : 'dropdown', 'id' => "{$this->_namespace}{$this->name}"));
     $select_attributes['class'] .= ' selectcomponent';
     $select_element = HTML_QuickForm::createElement('select', $this->name, $this->_translate($this->_field['title']), array(), $select_attributes);
     // Translate and add
     foreach ($this->_all_elements as $key => $value) {
         $option_attributes = array();
         $icon = midcom::get('componentloader')->get_component_icon($key, false);
         if ($icon) {
             $option_attributes['style'] = 'background-image: url("' . MIDCOM_STATIC_URL . '/' . midcom::get('componentloader')->get_component_icon($key) . '")';
         }
         $select_element->addOption($this->_translate($value), $key, $option_attributes);
     }
     $select_element->setMultiple($this->_type->allow_multiple);
     if ($this->_type->allow_multiple) {
         $select_element->setSize($this->height);
     }
     $this->_select_element = $this->_form->addElement($select_element);
 }
开发者ID:nemein,项目名称:openpsa,代码行数:34,代码来源:selectcomponent.php

示例14: text_elem

 public static function text_elem($name, $args, &$def_js)
 {
     $obj = HTML_QuickForm::createElement('ckeditor', $name, __('Text to display'));
     $obj->setFCKProps('400', '300', false);
     //	$def_js .= '$(\''.$this->getAttribute('name').'\').'.$v['name'].'.value = \''.$v['default'].'\';';
     return $obj;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:NoteCommon_0.php

示例15: otherFormatForm

 /**
  *
  */
 public function otherFormatForm($result_pubs)
 {
     if ($result_pubs == null) {
         return;
     }
     $form = new HTML_QuickForm('otherFormatForm');
     $form->addElement('hidden', 'pub_ids', implode(",", $result_pubs));
     $form->addGroup(array(HTML_QuickForm::createElement('submit', 'cv_format', 'Show results in CV format'), HTML_QuickForm::createElement('submit', 'bibtex_format', 'Show results in BibTex format')), null, null, '&nbsp;');
     return $form;
 }
开发者ID:papersdb,项目名称:papersdb,代码行数:13,代码来源:search_results.php


注:本文中的HTML_QuickForm::createElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。