function getCMSFields($params = null) { $fields = parent::getCMSFields(array('forcetype' => 'Amount')); $fields->removeByName(array("ForCart", "ForItems", "ForShipping", "For")); $limitfield = $fields->fieldByName("Root.Main.Constraints")->fieldByName("Main.UseLimit"); $fields->replaceField("UseLimit", $limitfield->performReadOnlyTransformation()); return $fields; }
public function getCMSFields($params = null) { $fields = parent::getCMSFields(); $fields->addFieldsToTab("Root.Main", array($codefield = TextField::create("Code")->setMaxLength(25)), "Active"); if ($this->owner->Code && $codefield) { $fields->replaceField("Code", $codefield->performReadonlyTransformation()); } return $fields; }