public function testRenderCorrectStateTranslationAfterCallingContactStateLabel()
 {
     $super = User::getByUsername('super');
     $contact = ContactTestHelper::createContactByNameForOwner('test', $super);
     ZurmoHtml::activeLabel($contact, 'state');
     $element = new AddressElement($contact, 'primaryAddress', new ZurmoActiveForm());
     $this->assertContains('<label for="Contact_primaryAddress_state">State</label>', $element->render());
 }
Ejemplo n.º 2
0
 /**
  * Override so we can force required to false.
  * Uses activeLabel instead of activeLabelEx.
  */
 public function labelEx($model, $attribute, $htmlOptions = array())
 {
     $htmlOptions['required'] = false;
     return ZurmoHtml::activeLabel($model, $attribute, $htmlOptions);
 }