public function __construct(Member $member = null, $options = array(), $CSRFSecret = null) { parent::__construct($member, $options, $CSRFSecret); if (sfConfig::get('op_is_use_captcha', false)) { $this->embedForm('captcha', new opCaptchaForm()); } }
public function __construct(Member $member = null, $options = array(), $CSRFSecret = null) { parent::__construct($member, $options, $CSRFSecret); $count = count(opConfig::get('daily_news_day')); $i18n = sfContext::getInstance()->getI18N(); $translated = $i18n->__('[1]Send once a week (%2%)|[2]Send twice a week (%2%)|(2,+Inf]Send %1% times a week (%2%)', array('%1%' => $count, '%2%' => implode(',', $this->generateDayList()))); $choice = new sfChoiceFormat(); $retval = $choice->format($translated, $count); $options = $this->widgetSchema['daily_news']->getOptions(); $options['choices'][1] = $retval; $this->widgetSchema['daily_news']->setOptions($options); }
public function __construct(Member $member = null, $options = array(), $CSRFSecret = null) { parent::__construct($member, $options, $CSRFSecret); if (Doctrine::getTable('SnsConfig')->get('is_allow_config_public_flag_profile_page')) { unset($this['profile_page_public_flag']); } if (!Doctrine::getTable('SnsConfig')->get('is_allow_web_public_flag_age')) { $widget = $this->widgetSchema['age_public_flag']; $choices = $widget->getOption('choices'); unset($choices[4]); $widget->setOption('choices', $choices); $this->validatorSchema['age_public_flag']->setOption('choices', array_keys($choices)); } }
public function __construct(Member $member = null, $options = array(), $CSRFSecret = null) { parent::__construct($member, $options, $CSRFSecret); }
public function __construct(Member $member = null, $options = array(), $CSRFSecret = null) { parent::__construct($member, $options, $CSRFSecret); // Hack for non-rendering secret answer $this->widgetSchema['secret_answer']->setOption('type', 'text'); }