public function __construct($id = null, $config = null) { $this->name = ___('Newsletter'); parent::__construct($id, $config); }
public function __construct($id = null, $config = null) { $this->name = ___('Random Questions'); parent::__construct($id, $config); }
public function getAvailableBricks() { return Am_Form_Brick::getAvailableBricks($this); }
/** @return array of Am_Form_Brick */ function getBricks() { $ret = array(); foreach ($this->getFields() as $brickConfig) { if (strpos($brickConfig['id'], 'PageSeparator') === 0) { continue; } $b = Am_Form_Brick::createFromRecord($brickConfig); if (!$b) { continue; } $ret[] = $b; } $event = new Am_Event(Am_Event::SAVED_FORM_GET_BRICKS, array('type' => $this->type, 'code' => $this->code, 'savedForm' => $this)); $event->setReturn($ret); $this->getDi()->hook->call($event); $ret = $event->getReturn(); foreach ($ret as $brick) { $brick->init(); } return $ret; }
protected function renderHideIfLoggedInCheckbox(Am_Form_Brick $brick) { if ($this->brickedForm instanceof Am_Form_Signup && (!empty($this->bricks['product']) || !empty($this->bricks['paysystem']))) { if ($brick->hideIfLoggedInPossible() != Am_Form_Brick::HIDE_DONT) { static $checkbox_id = 0; $checkbox_id++; $checked = $brick->hideIfLoggedIn(); if ($brick->hideIfLoggedInPossible() == Am_Form_Brick::HIDE_ALWAYS) { $checked = "checked='checked'"; $disabled = "disabled='disabled'"; } else { $disabled = ""; $checked = $brick->hideIfLoggedIn() ? "checked='checked'" : ''; } return "<span class='hide-if-logged-in'><input type='checkbox'" . " id='chkbox-{$checkbox_id}' value=1 {$checked} {$disabled} />" . "<label for='chkbox-{$checkbox_id}'>(hide if logged-in)</label></span>\n"; } } }
/** @return array of Am_Form_Brick */ function getBricks() { $ret = array(); foreach ($this->getFields() as $brickConfig) { if (strpos($brickConfig['id'], 'PageSeparator') === 0) { continue; } $b = Am_Form_Brick::createFromRecord($brickConfig); if (!$b) { continue; } $ret[] = $b; } return $ret; }
public function __construct($id = null, $config = null) { $this->name = ___('Payout Method'); parent::__construct($id, $config); }
protected function renderHideIfLoggedInCheckbox(Am_Form_Brick $brick) { if ($this->brickedForm->isHideBricks()) { if ($brick->hideIfLoggedInPossible() != Am_Form_Brick::HIDE_DONT) { static $checkbox_id = 0; $checkbox_id++; $checked = $brick->hideIfLoggedIn(); if ($brick->hideIfLoggedInPossible() == Am_Form_Brick::HIDE_ALWAYS) { $checked = "checked='checked'"; $disabled = "disabled='disabled'"; } else { $disabled = ""; $checked = $brick->hideIfLoggedIn() ? "checked='checked'" : ''; } return "<span class='hide-if-logged-in'><input type='checkbox'" . " id='chkbox-{$checkbox_id}' value=1 {$checked} {$disabled} />" . " <label for='chkbox-{$checkbox_id}'>" . ___('hide if logged-in') . "</label></span>\n"; } } }
public function __construct($id = null, $config = null) { $this->name = ___("Form Page Break"); parent::__construct($id, $config); }