Ejemplo n.º 1
0
 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     $this->fieldAmount->setReadonly($bool);
     $this->fieldCurrency->setReadonly($bool);
     return $this;
 }
 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     $this->fieldPostcode->setReadonly($bool);
     $this->fieldCountry->setReadonly($bool);
     $this->fieldLatitude->setReadonly($bool);
     $this->fieldLongditude->setReadonly($bool);
 }
 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         foreach ($this->composite_fields as $field) {
             $field->performReadonlyTransformation();
         }
     }
 }
 /**
  */
 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldFindBuyable = $this->fieldFindBuyable->performReadonlyTransformation();
         $this->fieldSelectedBuyable = $this->fieldSelectedBuyable->performReadonlyTransformation();
     }
 }
 public function setReadonly($readonly)
 {
     parent::setReadonly($readonly);
     foreach ($this->getChildren() as $child) {
         $child->setReadonly($readonly);
     }
     return $this;
 }
Ejemplo n.º 6
0
 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldAmount = $this->fieldAmount->performReadonlyTransformation();
         $this->fieldCurrency = $this->fieldCurrency->performReadonlyTransformation();
     }
 }
 public function testReadonly()
 {
     $field = new FormField('MyField');
     $field->setReadonly(true);
     $this->assertContains('readonly="readonly"', $field->getAttributesHTML());
     $field->setReadonly(false);
     $this->assertNotContains('readonly="readonly"', $field->getAttributesHTML());
 }
Ejemplo n.º 8
0
 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     $this->dateField->setReadonly($bool);
     $this->timeField->setReadonly($bool);
     if ($this->timezoneField) {
         $this->timezoneField->setReadonly($bool);
     }
     return $this;
 }
 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldPageID = $this->fieldPageID->performReadonlyTransformation();
         $this->fieldCustomURL = $this->fieldCustomURL->performReadonlyTransformation();
         $this->fieldTitle = $this->fieldTitle->performReadonlyTransformation();
         $this->fieldLinkmode = $this->fieldLinkmode->performReadonlyTransformation();
     }
 }
 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldAddress = $this->fieldAddress->performReadonlyTransformation();
         $this->fieldLatitude = $this->fieldLatitude->performReadonlyTransformation();
         $this->fieldLongditude = $this->fieldLongditude->performReadonlyTransformation();
     }
 }
Ejemplo n.º 11
0
 public function testReadonly()
 {
     $field = new FormField('MyField');
     $field->setReadonly(true);
     $this->assertContains('readonly="readonly"', $field->getAttributesHTML());
     $field->setReadonly(false);
     $this->assertNotContains('readonly="readonly"', $field->getAttributesHTML());
     $this->assertInstanceOf('FormField', $field->performReadonlyTransformation());
     eval("class FormField_Readonly extends FormField {}");
     $this->assertInstanceOf('FormField_Readonly', $field->performReadonlyTransformation());
 }