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


PHP TextField::setLabel方法代码示例

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


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

示例1: __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

示例2: 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

示例3: index

 public function index($params = array())
 {
     $userService = BOL_UserService::getInstance();
     $language = OW::getLanguage();
     $this->setPageHeading($language->text('hotlist', 'admin_heading_settings'));
     $this->setPageHeadingIconClass('ow_ic_gear_wheel');
     $settingsForm = new Form('settingsForm');
     $settingsForm->setId('settingsForm');
     $expiration_time = new TextField('expiration_time');
     $expiration_time->setRequired();
     $expiration_time->setLabel($language->text('hotlist', 'label_expiration_time'));
     $expiration_time_value = (int) OW::getConfig()->getValue('hotlist', 'expiration_time') / 86400;
     $expiration_time->setValue($expiration_time_value);
     $settingsForm->addElement($expiration_time);
     $submit = new Submit('save');
     $submit->addAttribute('class', 'ow_ic_save');
     $submit->setValue($language->text('hotlist', 'label_save_btn_label'));
     $settingsForm->addElement($submit);
     $this->addForm($settingsForm);
     if (OW::getRequest()->isPost()) {
         if ($settingsForm->isValid($_POST)) {
             $data = $settingsForm->getValues();
             OW::getConfig()->saveConfig('hotlist', 'expiration_time', $data['expiration_time'] * 86400);
             OW::getFeedback()->info($language->text('hotlist', 'settings_saved'));
             $this->redirect();
         }
     }
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:28,代码来源:admin.php

示例4: 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

示例5: __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

示例6: __construct

 /**
  * Class constructor
  *
  */
 public function __construct($configs)
 {
     parent::__construct('configSaveForm');
     $language = OW::getLanguage();
     $field = new RadioField('itunes_mode');
     $field->setOptions(array("test" => $language->text("skadateios", "itunes_mode_test"), "live" => $language->text("skadateios", "itunes_mode_live")));
     $field->setValue($configs["itunes_mode"]);
     $this->addElement($field);
     $field = new CheckboxField('billing_enabled');
     $field->setValue($configs["billing_enabled"]);
     $this->addElement($field);
     $field = new TextField('itunes_secret');
     $field->addValidator(new ConfigRequireValidator());
     $field->setValue($configs["itunes_secret"]);
     $this->addElement($field);
     $promoUrl = new TextField('app_url');
     $promoUrl->setRequired();
     $promoUrl->addValidator(new UrlValidator());
     $promoUrl->setLabel($language->text('skadateios', 'app_url_label'));
     $promoUrl->setDescription($language->text('skadateios', 'app_url_desc'));
     $promoUrl->setValue($configs['app_url']);
     $this->addElement($promoUrl);
     $smartBanner = new CheckboxField('smart_banner');
     $smartBanner->setLabel($language->text('skadateios', 'smart_banner_label'));
     $smartBanner->setDescription($language->text('skadateios', 'smart_banner_desc'));
     $smartBanner->setValue($configs['smart_banner']);
     $this->addElement($smartBanner);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('admin', 'save_btn_label'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:36,代码来源:settings.php

示例7: __construct

    public function __construct()
    {
        parent::__construct();
        $language = OW::getLanguage();
        $serviceLang = BOL_LanguageService::getInstance();
        $addSectionForm = new Form('qst_add_section_form');
        $addSectionForm->setAjax();
        $addSectionForm->setAjaxResetOnSuccess(true);
        $addSectionForm->setAction(OW::getRouter()->urlFor("ADMIN_CTRL_Questions", "ajaxResponder"));
        $input = new HiddenField('command');
        $input->setValue('addSection');
        $addSectionForm->addElement($input);
        $qstSectionName = new TextField('section_name');
        $qstSectionName->addAttribute('class', 'ow_text');
        $qstSectionName->addAttribute('style', 'width: auto;');
        $qstSectionName->setRequired();
        $qstSectionName->setLabel($language->text('admin', 'questions_new_section_label'));
        $addSectionForm->addElement($qstSectionName);
        $this->addForm($addSectionForm);
        $addSectionForm->bindJsFunction('success', ' function (result) {
                if ( result.result )
                {
                    OW.info(result.message);
                }
                else
                {
                    OW.error(result.message);
                }

                window.location.reload();
            } ');
    }
开发者ID:hardikamutech,项目名称:loov,代码行数:32,代码来源:add_question_section.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()
 {
     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

示例10: __construct

 public function __construct($interlocutorId)
 {
     $language = OW::getLanguage();
     parent::__construct('mailbox-create-conversation-form');
     $this->setAction(OW::getRouter()->urlFor('MAILBOX_CTRL_Mailbox', 'sendMessageAjaxResponder', array('userId' => $interlocutorId)));
     $this->setId('mailbox-create-conversation-form');
     $this->setEnctype('multipart/form-data');
     $this->setAjax();
     $this->setAjaxResetOnSuccess(false);
     $hidden = new HiddenField('userId');
     $hidden->setValue($interlocutorId);
     $this->addElement($hidden);
     //thickbox
     $validatorSubject = new StringValidator(0, 2048);
     $validatorSubject->setErrorMessage($language->text('mailbox', 'message_too_long_error', array('maxLength' => 2048)));
     $subject = new TextField('subject');
     $subject->setLabel($language->text('mailbox', 'subject'))->addAttribute('class', 'ow_text');
     $subject->addValidator($validatorSubject);
     $subject->setRequired(true);
     $this->addElement($subject);
     $validatorTextarea = new StringValidator(0, 24000);
     $validatorTextarea->setErrorMessage($language->text('mailbox', 'message_too_long_error', array('maxLength' => 24000)));
     $message = new WysiwygTextarea('message', array(BOL_TextFormatService::WS_BTN_IMAGE, BOL_TextFormatService::WS_BTN_VIDEO), false);
     $message->setLabel($language->text('mailbox', 'text'))->addAttribute('class', 'ow_text');
     $message->addAttribute('rows', '10');
     $message->addValidator($validatorTextarea);
     $message->setRequired(true);
     $this->addElement($message);
     if (OW::getConfig()->getValue('mailbox', 'enable_attachments')) {
         $multiUpload = new MAILBOX_CLASS_AjaxFileUpload('attachments');
         $multiUpload->setId('attachments');
         $this->addElement($multiUpload);
     }
     $captcha = new MailboxCaptchaField('captcha');
     $captcha->addValidator(new MailboxCaptchaValidator($captcha->getId()));
     $LastSendStamp = BOL_PreferenceService::getInstance()->getPreferenceValue('mailbox_create_conversation_stamp', OW::getUser()->getId());
     $this->displayCapcha = BOL_PreferenceService::getInstance()->getPreferenceValue('mailbox_create_conversation_display_capcha', OW::getUser()->getId());
     if (!$this->displayCapcha && $LastSendStamp + self::DISPLAY_CAPTCHA_TIMEOUT > time()) {
         BOL_PreferenceService::getInstance()->savePreferenceValue('mailbox_create_conversation_display_capcha', true, OW::getUser()->getId());
         $this->displayCapcha = true;
     }
     $captcha->addAttribute('disabled', 'disabled');
     $this->addElement($captcha);
     $submit = new Submit('send');
     $submit->setValue($language->text('mailbox', 'send_button'));
     $submit->addAttribute('class', 'ow_button ow_ic_mail');
     $this->addElement($submit);
     if (!OW::getRequest()->isAjax()) {
         $messageError = $language->text('mailbox', 'create_conversation_fail_message');
         $messageSuccess = $language->text('mailbox', 'create_conversation_message');
         $js = " owForms['mailbox-create-conversation-form'].bind( 'success',\n            function( json )\n            {\n                var from = \$('#mailbox-create-conversation-form');\n                var captcha = from.find('input[name=captcha]');\n\n                if ( json.result == 'permission_denied' )\n                {\n                    if ( json.message != undefined )\n                    {\n                        OW.error(json.message);\n                    }\n                    else\n                    {\n                        OW.error(" . json_encode(OW::getLanguage()->text('mailbox', 'write_permission_denied')) . ");\n                    }\n                }\n                else if ( json.result == 'display_captcha' )\n            \t{\n                   window." . $captcha->jsObjectName . ".refresh();\n\n                   if ( captcha.attr('disabled') != 'disabled' )\n                   {\n                        owForms['mailbox-create-conversation-form'].getElement('captcha').showError(" . json_encode(OW::getLanguage()->text('base', 'form_validator_captcha_error_message')) . ");\n                   }\n                   else\n                   {\n                        captcha.removeAttr('disabled');\n                   }\n\n                   from.find('tr.captcha').show();\n                   from.find('tr.mailbox_conversation').hide();\n                }\n                else if ( json.result == true )\n            \t{\n            \t    window.mailbox_send_message_floatbox.close();\n                    \$('#attach_file_inputs').hide();\n\n                    captcha.attr('disabled','disabled');\n                    from.find('tr.captcha').hide();\n                    owForms['mailbox-create-conversation-form'].resetForm();\n                    window." . $captcha->jsObjectName . ".refresh();\n\n            \t    OW.info('{$messageSuccess}');\n                    from.find('tr.captcha').hide();\n                    from.find('tr.mailbox_conversation').show();\n                }\n                else\n                {\n                    OW.error('{$messageError}');\n                }\n\n                \$('#mailbox-create-conversation-form input[name=userId]').val(" . $interlocutorId . ");\n\n        \t} ); ";
         OW::getDocument()->addOnloadScript($js);
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:54,代码来源:create_conversation_form.php

示例11: __construct

 public function __construct($name)
 {
     parent::__construct($name);
     $lang = OW::getLanguage();
     $period = new TextField('period');
     $period->setRequired(true);
     $period->setLabel($lang->text('ocsaffiliates', 'settings_timeout'));
     $this->addElement($period);
     $status = new Selectbox('status');
     $status->setRequired(true);
     $status->setHasInvitation(false);
     $options = array('active' => $lang->text('ocsaffiliates', 'status_active'), 'unverified' => $lang->text('ocsaffiliates', 'status_unverified'));
     $status->addOptions($options);
     $status->setLabel($lang->text('ocsaffiliates', 'settings_status'));
     $this->addElement($status);
     $clickAmount = new TextField('clickAmount');
     $clickAmount->setRequired(true);
     $clickAmount->setLabel($lang->text('ocsaffiliates', 'settings_click_amount'));
     $clickAmount->addValidator(new FloatValidator());
     $this->addElement($clickAmount);
     $regAmount = new TextField('regAmount');
     $regAmount->setRequired(true);
     $regAmount->setLabel($lang->text('ocsaffiliates', 'settings_reg_amount'));
     $regAmount->addValidator(new FloatValidator());
     $this->addElement($regAmount);
     $saleCommission = new Selectbox('saleCommission');
     $saleCommission->setRequired(true);
     $options = array('amount' => $lang->text('ocsaffiliates', 'commission_amount'), 'percent' => $lang->text('ocsaffiliates', 'commission_percent'));
     $saleCommission->addOptions($options);
     $saleCommission->setLabel($lang->text('ocsaffiliates', 'settings_sale_commission'));
     $this->addElement($saleCommission);
     $saleAmount = new TextField('saleAmount');
     $saleAmount->setLabel($lang->text('ocsaffiliates', 'settings_sale_amount'));
     $saleAmount->addValidator(new FloatValidator());
     $this->addElement($saleAmount);
     $salePercent = new TextField('salePercent');
     $salePercent->setLabel($lang->text('ocsaffiliates', 'settings_sale_percent'));
     $salePercent->addValidator(new FloatValidator());
     $this->addElement($salePercent);
     $showRates = new CheckboxField('showRates');
     $showRates->setLabel($lang->text('ocsaffiliates', 'show_rates'));
     $this->addElement($showRates);
     $allowBanners = new CheckboxField('allowBanners');
     $allowBanners->setLabel($lang->text('ocsaffiliates', 'allow_banners'));
     $this->addElement($allowBanners);
     $terms = new CheckboxField('terms');
     $terms->setLabel($lang->text('ocsaffiliates', 'enable_terms'));
     $this->addElement($terms);
     $submit = new Submit('save');
     $submit->setLabel($lang->text('ocsaffiliates', 'save'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:52,代码来源:settings_form.php

示例12: __construct

 public function __construct($name, $senderId, $context = MCOMPOSE_BOL_Service::CONTEXT_USER, $initJs = true, $inPopup = true)
 {
     parent::__construct($name);
     $language = OW::getLanguage();
     $this->userId = $senderId;
     $this->context = $context;
     $this->setAction(OW::getRouter()->urlFor('MCOMPOSE_CTRL_Compose', 'send', array('userId' => $senderId, 'formName' => $this->getName())));
     $this->setMethod(self::METHOD_POST);
     $this->setId($this->getName());
     $this->setEnctype('multipart/form-data');
     $this->setAjax();
     $this->setAjaxResetOnSuccess(false);
     $to = new MCOMPOSE_CLASS_UserSelectField('recipients', OW::getLanguage()->text('mcompose', 'selector_invitation_label'));
     $to->setRequired();
     $this->addElement($to);
     //thickbox
     $validatorSubject = new StringValidator(0, 2048);
     $validatorSubject->setErrorMessage($language->text('mailbox', 'message_too_long_error', array('maxLength' => 2048)));
     $subject = new TextField('subject');
     $subject->setInvitation('Subject');
     $subject->setHasInvitation(true);
     $subject->setLabel($language->text('mailbox', 'subject'))->addAttribute('class', 'ow_text');
     $subject->addValidator($validatorSubject);
     $subject->setRequired(true);
     $this->addElement($subject);
     $validatorTextarea = new StringValidator(0, 24000);
     $validatorTextarea->setErrorMessage($language->text('mailbox', 'message_too_long_error', array('maxLength' => 24000)));
     $message = new WysiwygTextarea('message', array(BOL_TextFormatService::WS_BTN_IMAGE, BOL_TextFormatService::WS_BTN_VIDEO), true);
     $message->setLabel($language->text('mailbox', 'text'))->addAttribute('class', 'ow_text');
     $message->setSize(300);
     $message->addValidator($validatorTextarea);
     $message->setRequired(true);
     $this->addElement($message);
     if (OW::getConfig()->getValue('mailbox', 'enable_attachments')) {
         $multiUpload = new MAILBOX_CLASS_AjaxFileUpload('attachments');
         //$multiUpload->setId('attachments');
         $this->addElement($multiUpload);
     }
     // Captcha
     $captcha = new MailboxCaptchaField('captcha');
     $captcha->addValidator(new MailboxCaptchaValidator($captcha->getId()));
     $captcha->addAttribute('disabled', 'disabled');
     $this->addElement($captcha);
     $submit = new Submit('send');
     $submit->setValue($language->text('mailbox', 'send_button'));
     $submit->addAttribute('class', 'ow_button ow_ic_mail');
     $this->addElement($submit);
     if ($initJs) {
         $js = "owForms['" . $this->getName() . "'].bind( 'success',\n            function( json )\n            {\n                var _complete = function(){ \n                    if ( _scope.floatBox ) _scope.floatBox.close();\n                };\n\n                var form = \$('#" . $this->getName() . "');\n                var captcha = form.find('input[name=captcha]');\n\n                if ( json.result == 'permission_denied' )\n                {\n                    if ( json.message )\n                    {\n                        OW.error(json.message);\n                    }\n                    else\n                    {\n                        OW.error(" . json_encode(OW::getLanguage()->text('mailbox', 'write_permission_denied')) . ");\n                    }\n                    \n                    _complete();\n                }\n                else if ( json.result == 'display_captcha' )\n            \t{\n                   window." . $captcha->jsObjectName . ".refresh();\n\n                   if ( captcha.attr('disabled') != 'disabled' )\n                   {\n                        owForms['" . $this->getName() . "'].getElement('captcha').showError(" . json_encode(OW::getLanguage()->text('base', 'form_validator_captcha_error_message')) . ");\n                   }\n                   else\n                   {\n                        captcha.removeAttr('disabled');\n                   }\n\n                   form.find('tr.captcha').show();\n                   form.find('tr.mailbox_conversation').hide();\n                }\n                else if ( json.result == true )\n            \t{\n                    captcha.attr('disabled','disabled');\n                    form.find('tr.captcha').hide();\n                    window." . $captcha->jsObjectName . ".refresh();\n\n                    form.find('tr.captcha').hide();\n                    form.find('tr.mailbox_conversation').show();\n\n                    owForms['" . $this->getName() . "'].resetForm();\n                    form.find('textarea[name=message]').get(0).htmlareaRefresh();\n\n                    if ( json.error )\n                        OW.error(json.error);\n\n                    if ( json.warning )\n                        OW.warning(json.warning);\n\n                     if ( json.message )\n                        OW.info(json.message);\n                        \n                    _complete();\n                }\n                else if ( json.error )\n                {\n                    OW.error(json.error);\n                    \n                    _complete();\n                }\n\n            }); ";
         OW::getDocument()->addOnloadScript($js);
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:52,代码来源:form.php

示例13: __construct

 public function __construct()
 {
     parent::__construct('category-add-form');
     $lang = OW::getLanguage();
     $name = new TextField('name');
     $name->setRequired(true);
     $name->setLabel($lang->text('ocsfundraising', 'category'));
     $this->addElement($name);
     // submit
     $submit = new Submit('add');
     $submit->setValue($lang->text('ocsfundraising', 'btn_add'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:13,代码来源:category_add_form.php

示例14: __construct

 public function __construct()
 {
     parent::__construct('settings-form');
     $lang = OW::getLanguage();
     $period = new TextField('period');
     $period->setLabel($lang->text('membership', 'remind_expiration'));
     $period->setRequired(true);
     $period->addValidator(new IntValidator(2, 10000));
     $this->addElement($period);
     $submit = new Submit('save');
     $submit->setValue($lang->text('base', 'edit_button'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:13,代码来源:settings_form.php

示例15: __construct

 public function __construct()
 {
     parent::__construct('config-form');
     $lang = OW::getLanguage();
     $months = new TextField('months');
     $months->setRequired(true);
     $months->addValidator(new IntValidator(1, 12));
     $months->setLabel($lang->text('ocsguests', 'store_period'));
     $this->addElement($months);
     $submit = new Submit('save');
     $submit->setLabel($lang->text('ocsguests', 'save'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:13,代码来源:admin.php


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