• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Submit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: index

 public function index()
 {
     $language = OW::getLanguage();
     $billingService = BOL_BillingService::getInstance();
     $adminForm = new Form('adminForm');
     $element = new TextField('creditValue');
     $element->setRequired(true);
     $element->setLabel($language->text('billingcredits', 'admin_usd_credit_value'));
     $element->setDescription($language->text('billingcredits', 'admin_usd_credit_value_desc'));
     $element->setValue($billingService->getGatewayConfigValue('billingcredits', 'creditValue'));
     $validator = new FloatValidator(0.1);
     $validator->setErrorMessage($language->text('billingcredits', 'invalid_numeric_format'));
     $element->addValidator($validator);
     $adminForm->addElement($element);
     $element = new Submit('saveSettings');
     $element->setValue($language->text('billingcredits', 'admin_save_settings'));
     $adminForm->addElement($element);
     if (OW::getRequest()->isPost()) {
         if ($adminForm->isValid($_POST)) {
             $values = $adminForm->getValues();
             $billingService->setGatewayConfigValue('billingcredits', 'creditValue', $values['creditValue']);
             OW::getFeedback()->info($language->text('billingcredits', 'user_save_success'));
         }
     }
     $this->addForm($adminForm);
     $this->setPageHeading(OW::getLanguage()->text('billingcredits', 'config_page_heading'));
     $this->setPageTitle(OW::getLanguage()->text('billingcredits', 'config_page_heading'));
     $this->setPageHeadingIconClass('ow_ic_app');
 }
开发者ID:vazahat,项目名称:dudex,代码行数:29,代码来源:admin.php


示例2: settings

 public function settings()
 {
     $adminForm = new Form('adminForm');
     $language = OW::getLanguage();
     $config = OW::getConfig();
     $element = new TextField('autoclick');
     $element->setRequired(true);
     $validator = new IntValidator(1);
     $validator->setErrorMessage($language->text('autoviewmore', 'admin_invalid_number_error'));
     $element->addValidator($validator);
     $element->setLabel($language->text('autoviewmore', 'admin_auto_click'));
     $element->setValue($config->getValue('autoviewmore', 'autoclick'));
     $adminForm->addElement($element);
     $element = new Submit('saveSettings');
     $element->setValue($language->text('autoviewmore', 'admin_save_settings'));
     $adminForm->addElement($element);
     if (OW::getRequest()->isPost()) {
         if ($adminForm->isValid($_POST)) {
             $values = $adminForm->getValues();
             $config = OW::getConfig();
             $config->saveConfig('autoviewmore', 'autoclick', $values['autoclick']);
             OW::getFeedback()->info($language->text('autoviewmore', 'user_save_success'));
         }
     }
     $this->addForm($adminForm);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:26,代码来源:admin.php


示例3: __construct

 public function __construct($providerName)
 {
     parent::__construct('login-form');
     $language = OW::getLanguage();
     $this->setAction("");
     $label = $language->text('yncontactimporter', 'login_email');
     if ($providerName == 'hyves') {
         $label = $language->text('yncontactimporter', 'login_username');
     }
     // email
     $email = new TextField('email');
     $email->setLabel($label)->setRequired(true);
     $this->addElement($email);
     //pass
     $password = new PasswordField('password');
     $password->setLabel($language->text('yncontactimporter', 'login_password'))->setRequired(true);
     $this->addElement($password);
     //providerName
     $hiddenProviderName = new HiddenField('providerName');
     $hiddenProviderName->setValue($providerName);
     $this->addElement($hiddenProviderName);
     // button submit
     $submit = new Submit('submit');
     $submit->setValue($language->text('yncontactimporter', 'submit_btn_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:26,代码来源:login_form.php


示例4: __construct

 public function __construct()
 {
     parent::__construct('bookmarks_settings');
     $language = OW::getLanguage();
     $this->setAjax();
     $this->setAjaxResetOnSuccess(FALSE);
     $this->setAction(OW::getRouter()->urlForRoute('bookmarks.admin'));
     $this->bindJsFunction('success', 'function()
     {
         OW.info("' . $language->text('bookmarks', 'settings_saved') . '");
     }');
     $notifyIntervalConfigVal = OW::getConfig()->getValue('bookmarks', 'notify_interval');
     $notifyIntervalVal = array(0 => $language->text('bookmarks', 'remainderinterval_dont_send'), 10 => $language->text('bookmarks', 'remainderinterval_10'), 20 => $language->text('bookmarks', 'remainderinterval_20'), 30 => $language->text('bookmarks', 'remainderinterval_30'));
     $notifyInterval = new Selectbox('notify_interval');
     $notifyInterval->addValidator(new BookmarkSelectboxValidator($notifyIntervalVal));
     $notifyInterval->setOptions($notifyIntervalVal);
     $notifyInterval->setValue($notifyIntervalConfigVal);
     $notifyInterval->setLabel($language->text('bookmarks', 'notify_interval_label'));
     $notifyInterval->setDescription($language->text('bookmarks', 'notify_interval_desc'));
     $notifyInterval->setHasInvitation(FALSE);
     $this->addElement($notifyInterval);
     $submit = new Submit('save');
     $submit->setValue($language->text('bookmarks', 'submit_label'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:25,代码来源:admin.php


示例5: __construct

 public function __construct()
 {
     parent::__construct('AddNewIp');
     $submit = new Submit('add');
     $submit->setValue(OW::getLanguage()->text('watchdog', 'form_btn_add_white_ip'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:add_new_ip.php


示例6: __construct

 /**
  * Class constructor
  */
 public function __construct($providerName)
 {
     parent::__construct('provider-config-form');
     $this->setAjax(true);
     $this->bindJsFunction(Form::BIND_SUCCESS, 'function(data){if( data.result ){OW.info(data.message);setTimeout(function(){location.reload();}, 1000);}else{OW.error(data.message);}}');
     $this->setAction(OW::getRouter()->urlForRoute('ynsocialconnect-admin-ajaxUpdateProfileQuestion'));
     $language = OW::getLanguage();
     $service = YNSOCIALCONNECT_BOL_ServicesService::getInstance();
     $questionDtoList = $service->getOWQuestionDtoList($providerName);
     $aliases = $service->findAliasList($providerName);
     $options = $service->getServiceFields($providerName);
     foreach ($questionDtoList as $question) {
         $new_element = new Selectbox('alias[' . $question->name . ']');
         foreach ($options as $option) {
             $new_element->addOption($option->name, $option->label);
         }
         $new_element->setValue(empty($aliases[$question->name]) ? '' : $aliases[$question->name]);
         $this->addElement($new_element);
     }
     $hidden = new TextField('providerName');
     $hidden->addAttribute('type', 'hidden');
     $hidden->setValue($providerName);
     $this->addElement($hidden);
     $submit = new Submit('edit');
     $submit->setValue($language->text('ynsocialconnect', 'save_btn_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:30,代码来源:config_fields_form.php


示例7: __construct

 public function __construct($opponentId)
 {
     parent::__construct('composeMessageForm');
     $this->setEnctype(Form::ENCTYPE_MULTYPART_FORMDATA);
     $field = new HiddenField('uid');
     $field->setValue(UTIL_HtmlTag::generateAutoId('mailbox_new_message_' . $opponentId));
     $this->addElement($field);
     $field = new HiddenField('opponentId');
     $field->setValue($opponentId);
     $this->addElement($field);
     $field = new TextField('subject');
     $field->setInvitation(OW::getLanguage()->text('mailbox', 'subject'));
     $field->setHasInvitation(true);
     $field->setRequired();
     $this->addElement($field);
     $field = new Textarea('message');
     $field->setInvitation(OW::getLanguage()->text('mailbox', 'text_message_invitation'));
     $field->setHasInvitation(true);
     $field->setRequired();
     $this->addElement($field);
     $field = new HiddenField('attachment');
     $this->addElement($field);
     $submit = new Submit('sendBtn');
     $submit->setId('sendBtn');
     $submit->setValue(OW::getLanguage()->text('mailbox', 'add_button'));
     $this->addElement($submit);
     if (!OW::getRequest()->isAjax()) {
         $js = UTIL_JsGenerator::composeJsString('
         owForms["composeMessageForm"].bind( "submit", function( r )
         {
             $("#newmessage-mail-send-btn").addClass("owm_preloader_circle");
         });');
         OW::getDocument()->addOnloadScript($js);
     }
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:35,代码来源:compose_message_form.php


示例8: __construct

 /**
  * Class constructor
  *
  */
 public function __construct()
 {
     parent::__construct('configSaveForm');
     $language = OW::getLanguage();
     $field = new TextField('public_key');
     $field->addValidator(new ConfigRequireValidator());
     $this->addElement($field);
     $field = new CheckboxField('billing_enabled');
     $this->addElement($field);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('admin', 'save_btn_label'));
     $this->addElement($submit);
     $promoUrl = new TextField('app_url');
     $promoUrl->setRequired();
     $promoUrl->addValidator(new UrlValidator());
     $promoUrl->setLabel($language->text('skandroid', 'app_url_label'));
     $promoUrl->setDescription($language->text('skandroid', 'app_url_desc'));
     $promoUrl->setValue(OW::getConfig()->getValue('skandroid', 'app_url'));
     $this->addElement($promoUrl);
     $smartBanner = new CheckboxField('smart_banner');
     $smartBanner->setLabel($language->text('skandroid', 'smart_banner_label'));
     $smartBanner->setDescription($language->text('skandroid', 'smart_banner_desc'));
     $smartBanner->setValue(OW::getConfig()->getValue('skandroid', 'smart_banner'));
     $this->addElement($smartBanner);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:30,代码来源:settings.php


示例9: __construct

 /**
  * Class constructor
  *
  */
 public function __construct($plugins)
 {
     parent::__construct('configForm');
     $language = OW::getLanguage();
     $values = OW::getConfig()->getValues('attachments');
     if ($plugins['video']) {
         $field = new CheckboxField('video_share');
         $field->setValue($values['video_share']);
         $this->addElement($field);
     }
     if ($plugins['links']) {
         $field = new CheckboxField('link_share');
         $field->setValue($values['link_share']);
         $this->addElement($field);
     }
     if ($plugins['photo']) {
         $field = new CheckboxField('photo_share');
         $field->setId('photo_share_check');
         $field->setValue($values['photo_share']);
         $this->addElement($field);
         $field = new TextField('photo_album_name');
         $field->setValue(OW::getLanguage()->text('attachments', 'default_photo_album_name'));
         $field->setRequired();
         $this->addElement($field);
     }
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('attachments', 'config_save_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:34,代码来源:admin.php


示例10: __construct

 public function __construct()
 {
     parent::__construct('payeer-config-form');
     $language = OW::getLanguage();
     $billingService = BOL_BillingService::getInstance();
     $gwKey = BILLINGPAYEER_CLASS_PayeerAdapter::GATEWAY_KEY;
     $element = new TextField('m_key');
     $element->setValue($billingService->getGatewayConfigValue($gwKey, 'm_key'));
     $this->addElement($element);
     $element = new TextField('m_shop');
     $element->setValue($billingService->getGatewayConfigValue($gwKey, 'm_shop'));
     $this->addElement($element);
     $element = new Selectbox('m_curr');
     $element->setValue($billingService->getGatewayConfigValue($gwKey, 'm_curr'))->setHasInvitation(false)->addOption('RUB', 'RUB')->addOption('usd', 'USD');
     $this->addElement($element);
     $element = new Selectbox('lang');
     $element->setValue($billingService->getGatewayConfigValue($gwKey, 'lang'))->setHasInvitation(false)->addOption('ru', 'Русский')->addOption('en', 'English');
     $this->addElement($element);
     $element = new Selectbox('tabNum');
     $element->setValue($billingService->getGatewayConfigValue($gwKey, 'tabNum'))->setHasInvitation(false)->addOption('1', 'Electronic Systems')->addOption('2', 'Cash / Bank Transfers')->addOption('3', 'Terminals')->addOption('4', 'SMS payments');
     $this->addElement($element);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('billingpayeer', 'btn_save'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:26,代码来源:admin.php


示例11: testCompile

 public function testCompile()
 {
     $field = new Submit("test", "Test");
     $expected = "<input type=\"submit\" name=\"test\"  value=\"Test\" />";
     $value = $field->compile();
     $this->assertEquals($expected, $value);
 }
开发者ID:jenwachter,项目名称:html-form,代码行数:7,代码来源:SubmitTest.php


示例12: __construct

 public function __construct()
 {
     parent::__construct('settingsForm');
     $themes = new Selectbox('themeList');
     $themes->setRequired();
     $themes->setLabel(OW::getLanguage()->text('profileprogressbar', 'theme_label'));
     $plugin = OW::getPluginManager()->getPlugin('profileprogressbar');
     $dirIterator = new RecursiveDirectoryIterator($plugin->getStaticDir() . 'css' . DS);
     $interator = new RecursiveIteratorIterator($dirIterator);
     $themesList = array();
     foreach ($interator as $file) {
         if ($file->getFilename() == '.') {
             continue;
         }
         if (!$file->isDir() && pathinfo($file->getPathname(), PATHINFO_EXTENSION) == 'css') {
             $themeName = substr($file->getFilename(), 0, strrpos($file->getFilename(), '.'));
             if (file_exists($plugin->getStaticDir() . 'img' . DS . $themeName . DS . 'background.png') && file_exists($plugin->getStaticDir() . 'img' . DS . $themeName . DS . 'complete.png')) {
                 $themesList[$themeName] = ucfirst($themeName);
             }
         }
     }
     asort($themesList);
     $themes->setOptions($themesList);
     $themes->setValue(OW::getConfig()->getValue('profileprogressbar', 'theme'));
     $this->addElement($themes);
     $validator = new SelectboxValidator($themesList);
     $themes->addValidator($validator);
     $submit = new Submit('save');
     $submit->setValue(OW::getLanguage()->text('profileprogressbar', 'save_settings'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:31,代码来源:settings_form.php


示例13: __construct

 public function __construct($userId)
 {
     parent::__construct();
     $data = OW::getEventManager()->call("photo.entity_albums_find", array("entityType" => "user", "entityId" => $userId));
     $albums = empty($data["albums"]) ? array() : $data["albums"];
     $source = BOL_PreferenceService::getInstance()->getPreferenceValue("pcgallery_source", $userId);
     $this->assign("source", $source == "album" ? "album" : "all");
     $selectedAlbum = BOL_PreferenceService::getInstance()->getPreferenceValue("pcgallery_album", $userId);
     $form = new Form("pcGallerySettings");
     $form->setEmptyElementsErrorMessage(null);
     $form->setAction(OW::getRouter()->urlFor("PCGALLERY_CTRL_Gallery", "saveSettings"));
     $element = new HiddenField("userId");
     $element->setValue($userId);
     $form->addElement($element);
     $element = new Selectbox("album");
     $element->setHasInvitation(true);
     $element->setInvitation(OW::getLanguage()->text("pcgallery", "settings_album_invitation"));
     $validator = new PCGALLERY_AlbumValidator();
     $element->addValidator($validator);
     $albumsPhotoCount = array();
     foreach ($albums as $album) {
         $element->addOption($album["id"], $album["name"] . " ({$album["photoCount"]})");
         $albumsPhotoCount[$album["id"]] = $album["photoCount"];
         if ($album["id"] == $selectedAlbum) {
             $element->setValue($album["id"]);
         }
     }
     OW::getDocument()->addOnloadScript(UTIL_JsGenerator::composeJsString('window.pcgallery_settingsAlbumCounts = {$albumsCount};', array("albumsCount" => $albumsPhotoCount)));
     $element->setLabel(OW::getLanguage()->text("pcgallery", "source_album_label"));
     $form->addElement($element);
     $submit = new Submit("save");
     $submit->setValue(OW::getLanguage()->text("pcgallery", "save_settings_btn_label"));
     $form->addElement($submit);
     $this->addForm($form);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:35,代码来源:gallery_settings.php


示例14: index

 public function index()
 {
     $groups = MODERATION_BOL_Service::getInstance()->getContentGroups();
     if (OW::getRequest()->isPost()) {
         $selectedGroups = empty($_POST["groups"]) ? array() : $_POST["groups"];
         $types = array();
         foreach ($groups as $group) {
             $selected = in_array($group["name"], $selectedGroups);
             foreach ($group["entityTypes"] as $type) {
                 $types[$type] = $selected;
             }
         }
         OW::getConfig()->saveConfig("moderation", "content_types", json_encode($types));
         OW::getFeedback()->info(OW::getLanguage()->text("moderation", "content_types_saved_message"));
         $this->redirect(OW::getRouter()->urlForRoute("moderation.admin"));
     }
     $this->setPageHeading(OW::getLanguage()->text("moderation", "admin_heading"));
     $this->setPageTitle(OW::getLanguage()->text("moderation", "admin_title"));
     $form = new Form("contentTypes");
     $submit = new Submit("save");
     $submit->setLabel(OW::getLanguage()->text("admin", "save_btn_label"));
     $form->addElement($submit);
     $this->addForm($form);
     $this->assign("groups", $groups);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:25,代码来源:admin.php


示例15: __construct

 public function __construct($ctrl)
 {
     parent::__construct('settings-form');
     $configs = OW::getConfig()->getValues('yncontactimporter');
     $ctrl->assign('configs', $configs);
     $l = OW::getLanguage();
     $miValidator = new IntValidator(1, 999);
     $miValidator->setErrorMessage($l->text('yncontactimporter', 'max_validation_error', array('min' => 1, 'max' => 999)));
     //Contacts per page
     $textField['contact_per_page'] = new TextField('contact_per_page');
     $textField['contact_per_page']->setLabel($l->text('yncontactimporter', 'settings_contact_per_page'))->setValue($configs['contact_per_page'])->addValidator($miValidator)->setRequired(true);
     $this->addElement($textField['contact_per_page']);
     //Maximum invite per times
     $textField['max_invite_per_times'] = new TextField('max_invite_per_times');
     $textField['max_invite_per_times']->setLabel($l->text('yncontactimporter', 'settings_max_invite_per_times'))->setValue($configs['max_invite_per_times'])->addValidator($miValidator)->setRequired(true);
     $this->addElement($textField['max_invite_per_times']);
     //Default invite message
     $textField['default_invite_message'] = new Textarea('default_invite_message');
     $textField['default_invite_message']->setLabel($l->text('yncontactimporter', 'settings_default_invite_message'))->setValue($configs['default_invite_message']);
     $this->addElement($textField['default_invite_message']);
     // Logo width
     $textField['logo_width'] = new TextField('logo_width');
     $textField['logo_width']->setLabel($l->text('yncontactimporter', 'settings_logo_width'))->setValue($configs['logo_width'])->addValidator($miValidator)->setRequired(true);
     $this->addElement($textField['logo_width']);
     // Logo Height
     $textField['logo_height'] = new TextField('logo_height');
     $textField['logo_height']->setLabel($l->text('yncontactimporter', 'settings_logo_height'))->setValue($configs['logo_height'])->addValidator($miValidator)->setRequired(true);
     $this->addElement($textField['logo_height']);
     $submit = new Submit('submit');
     $submit->setValue($l->text('yncontactimporter', 'save_btn_label'));
     $submit->addAttribute('class', 'ow_ic_save ow_positive');
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:33,代码来源:settings_form.php


示例16: __construct

 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct('update-question-form');
     $this->setAction(OW::getRouter()->urlFor('OCSFAQ_CTRL_Admin', 'editQuestion'));
     $lang = OW::getLanguage();
     $questionId = new HiddenField('questionId');
     $questionId->setRequired(true);
     $this->addElement($questionId);
     $question = new TextField('question');
     $question->setRequired(true);
     $question->setLabel($lang->text('ocsfaq', 'question'));
     $this->addElement($question);
     $btnSet = array(BOL_TextFormatService::WS_BTN_IMAGE, BOL_TextFormatService::WS_BTN_VIDEO, BOL_TextFormatService::WS_BTN_HTML);
     $answer = new WysiwygTextarea('answer', $btnSet);
     $answer->setRequired(true);
     $answer->setLabel($lang->text('ocsfaq', 'answer'));
     $this->addElement($answer);
     $isFeatured = new CheckboxField('isFeatured');
     $isFeatured->setLabel($lang->text('ocsfaq', 'is_featured'));
     $this->addElement($isFeatured);
     $categories = OCSFAQ_BOL_FaqService::getInstance()->getCategories();
     if ($categories) {
         $category = new Selectbox('category');
         foreach ($categories as $cat) {
             $category->addOption($cat->id, $cat->name);
         }
         $category->setLabel($lang->text('ocsfaq', 'category'));
         $this->addElement($category);
     }
     // submit
     $submit = new Submit('update');
     $submit->setValue($lang->text('ocsfaq', 'btn_save'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:37,代码来源:faq_edit.php


示例17: __construct

    public function __construct()
    {
        parent::__construct('hint-form');
        $this->setAjax(TRUE);
        $this->setAction(OW::getRouter()->urlForRoute('profileprogressbar.admin_hint'));
        $this->setAjaxResetOnSuccess(FALSE);
        $this->bindJsFunction('success', 'function(data)
        {
            $("#profile-progressbar").tipTip({content: data.content});

            OW.info("Settings successfully saved");
        }');
        $checkBox = new CheckboxField('show-hint');
        if ((bool) OW::getConfig()->getValue('profileprogressbar', 'show_hint')) {
            $checkBox->addAttribute('checked', 'checked');
        }
        $checkBox->setLabel(OW::getLanguage()->text('profileprogressbar', 'show_hint_label'));
        $checkBox->setDescription(OW::getLanguage()->text('profileprogressbar', 'show_hint_desc'));
        $this->addElement($checkBox);
        $hintText = new WysiwygTextarea('hint-text');
        $hintText->setRequired();
        $hintText->setSize(WysiwygTextarea::SIZE_L);
        $hintText->setValue(OW::getLanguage()->text('profileprogressbar', 'hint_text'));
        $hintText->setLabel(OW::getLanguage()->text('profileprogressbar', 'hint_label'));
        $hintText->setDescription(OW::getLanguage()->text('profileprogressbar', 'hint_desc'));
        $this->addElement($hintText);
        $submit = new Submit('save');
        $submit->setValue('Save');
        $this->addElement($submit);
    }
开发者ID:vazahat,项目名称:dudex,代码行数:30,代码来源:hint_form.php


示例18: __construct

 /**
  * Class constructor
  *
  */
 public function __construct()
 {
     parent::__construct('configSaveForm');
     $language = OW::getLanguage();
     $configs = OW::getConfig()->getValues('googlelocation');
     $element = new TextField('api_key');
     $element->setValue($configs['api_key']);
     $validator = new StringValidator(0, 40);
     $validator->setErrorMessage($language->text('googlelocation', 'api_key_too_long'));
     $element->addValidator($validator);
     $this->addElement($element);
     $options = array(GOOGLELOCATION_BOL_LocationService::DISTANCE_UNITS_MILES => $language->text('googlelocation', 'miles'), GOOGLELOCATION_BOL_LocationService::DISTANCE_UNITS_KM => $language->text('googlelocation', 'kms'));
     $distanseUnits = new Selectbox('distanse_units');
     $distanseUnits->setOptions($options);
     $distanseUnits->setValue(GOOGLELOCATION_BOL_LocationService::getInstance()->getDistanseUnits());
     $distanseUnits->setHasInvitation(false);
     $this->addElement($distanseUnits);
     $restrictions = new Selectbox('country_restriction');
     $restrictions->setValue(!empty($configs['country_restriction']) ? $configs['country_restriction'] : null);
     $restrictions->setOptions($this->countryList);
     $restrictions->setInvitation(OW::getLanguage()->text('googlelocation', 'no_country_restriction'));
     $this->addElement($restrictions);
     $autofill = OW::getConfig()->getValue('googlelocation', 'auto_fill_location_on_search');
     $autoFillLocationOnSearch = new CheckboxField('auto_fill_location_on_search');
     $autoFillLocationOnSearch->setValue(empty($autofill) || $autofill == '0' ? false : $autofill);
     $this->addElement($autoFillLocationOnSearch);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('base', 'edit_button'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:35,代码来源:admin.php


示例19: __construct

 public function __construct()
 {
     parent::__construct('upload-form');
     $language = OW::getLanguage();
     $this->setEnctype(Form::ENCTYPE_MULTYPART_FORMDATA);
     $fileField = new FileField('photo');
     //$fileField->setRequired(true);
     $this->addElement($fileField);
     // album Field
     $albumField = new TextField('album');
     $albumField->setRequired(true);
     $albumField->setHasInvitation(true);
     $albumField->setId('album_input');
     $albumField->setInvitation($language->text('photo', 'create_album'));
     $this->addElement($albumField);
     // description Field
     $descField = new Textarea('description');
     $descField->setHasInvitation(true);
     $descField->setInvitation($language->text('photo', 'describe_photo'));
     $this->addElement($descField);
     $cancel = new Submit('cancel', false);
     $cancel->setValue($language->text('base', 'cancel_button'));
     $this->addElement($cancel);
     $submit = new Submit('submit', false);
     $this->addElement($submit);
 }
开发者ID:tammyrocks,项目名称:photo,代码行数:26,代码来源:upload_form.php


示例20: __construct

 public function __construct($name)
 {
     parent::__construct($name);
     $this->setAction(OW::getRouter()->urlForRoute('ocsaffiliates.action_signup'));
     $this->setAjax();
     $lang = OW::getLanguage();
     $affName = new TextField('name');
     $affName->setRequired(true);
     $affName->setLabel($lang->text('ocsaffiliates', 'affiliate_name'));
     $this->addElement($affName);
     $email = new TextField('email');
     $email->setRequired(true);
     $email->setLabel($lang->text('ocsaffiliates', 'email'));
     $email->addValidator(new EmailValidator());
     $this->addElement($email);
     $password = new PasswordField('password');
     $password->setRequired(true);
     $password->setLabel($lang->text('ocsaffiliates', 'password'));
     $this->addElement($password);
     $payment = new Textarea('payment');
     $payment->setRequired(true);
     $payment->setLabel($lang->text('ocsaffiliates', 'payment_details'));
     $this->addElement($payment);
     if (OW::getConfig()->getValue('ocsaffiliates', 'terms_agreement')) {
         $terms = new CheckboxField('terms');
         $validator = new RequiredValidator();
         $validator->setErrorMessage($lang->text('ocsaffiliates', 'terms_required_msg'));
         $terms->addValidator($validator);
         $this->addElement($terms);
     }
     $submit = new Submit('signup');
     $submit->setValue($lang->text('ocsaffiliates', 'signup_btn'));
     $this->addElement($submit);
     $this->bindJsFunction(Form::BIND_SUCCESS, "function(data){\n            if ( !data.result ) {\n                OW.error(data.error);\n            }\n            else {\n                document.location.reload();\n            }\n        }");
 }
开发者ID:vazahat,项目名称:dudex,代码行数:35,代码来源:signup_form.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Subnets类代码示例发布时间:2022-05-23
下一篇:
PHP SubmissionLog类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap