public function insertBrick(HTML_QuickForm2_Container $form) { if ($form instanceof Am_Form_Signup_Aff || $form->getId() == 'aff') { // little trick - if we are in affiliate form, replace word "User" to "Affiliate" $this->labels['User Agreement'] = ___('Affiliate Agreement'); $this->labels['Please agree to User Agreement'] = ___('Please agree to Affiliate Agreement'); } if ($this->getConfig('do_not_show_agreement_text')) { $conteiner = $form; } else { $conteiner = $form->addFieldset()->setId('fieldset-agreement')->setLabel($this->___('User Agreement')); $agreement = $conteiner->addStatic('_agreement', array('class' => 'no-label')); $agreement->setContent('<div class="agreement">' . $this->getText() . '</div>'); } $checkbox = $conteiner->addCheckbox('i_agree')->setLabel($this->___('I Agree')); $checkbox->addRule('required', $this->___('Please agree to User Agreement')); }