X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fforms%2FGeom.php;h=cad18a777b413a242715a113236abae2d3617770;hp=751d7982b08e164fad2d99476446dea58797ad9a;hb=a64d41557a62ec6051d7fa08d1ba941e089aa5c2;hpb=3c4eae3c94fd2369087cd3cc73e195cbc48fc433 diff --git a/application/forms/Geom.php b/application/forms/Geom.php index 751d798..cad18a7 100644 --- a/application/forms/Geom.php +++ b/application/forms/Geom.php @@ -20,12 +20,23 @@ class Syj_Form_Geom extends Zend_Form 'attribs' => array('maxlength' => '40', 'size' => '20'), 'validators' => array(new Zend_Validate_StringLength(0, 40)) )); + + $translator = $this->getTranslator(); + $anchor = $this->getView()->Anchor("termsofuse", $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, + 'decorators' => array( + 'ViewHelper', + 'label', + array('HtmlTag', array('tag' => 'div', 'id' => 'geom_accept_container'))))); + $submit = array('Submit', 'geom_submit', array('label' => __("save"))); - $this->addElements(array($id, $data, $title, $submit)); + $this->addElements(array($id, $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');