);
public function init() {
- $id = array('Hidden', 'geom_id');
$data = array('Hidden', 'geom_data', array('required' => true));
$title = array('Text', 'geom_title', array(
'attribs' => array('maxlength' => '40', 'size' => '20'),
'validators' => array(new Zend_Validate_StringLength(0, 40))
));
+
+ $translator = $this->getTranslator();
+ $anchor = $this->getView()->Anchor("termsofuse?format=raw",
+ $translator->translate("terms of use"),
+ array('id' => 'geom_termsofuse_anchor'));
+ $text = $translator->translate("I've read and accepted %s");
+ $text = vsprintf($text, $anchor);
+ $touaccept = array('Checkbox', 'geom_accept', array("label" => $text,
+ 'helper' => 'SyjFormCheckbox', // similar to FormCheckbox without a hidden input
+ 'decorators' => array(
+ 'ViewHelper',
+ 'label',
+ array('HtmlTag', array('tag' => 'div', 'id' => 'geom_accept_container', 'class' => 'logged-hide')))));
+
$submit = array('Submit', 'geom_submit', array('label' => __("save")));
- $this->addElements(array($id, $data, $title, $submit));
+ $this->addElements(array($data, $title, $touaccept, $submit));
- // fieldset around title
- //$this->addDisplayGroup(array('geom_title'), 'metadata', array('decorators' => array('FormElements', 'Fieldset')));
+ $decorator = $this->geom_accept->getDecorator('Zend_Form_Decorator_Label');
+ $decorator->setOption('escape', false);
$this->geom_title->addDecorator('HtmlTag', array('tag' => 'br', 'openOnly' => true))->
addDecorator('label');