public function getCMSFields() { $fields = parent::getCMSFields(); if ($this->ID) { $fields->addFieldToTab("Root.Main", TextField::create('InstallID', 'Instalation ID'), "Summary"); $fields->addFieldToTab("Root.Main", PasswordField::create("ResponsePassword", "Payment Response Password"), "Summary"); } return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); if ($this->ID) { // Payment Gateway Options $email_options = array("Don't", 'Send to customer and vendor', 'Send only to vendor'); $fields->addFieldToTab("Root.Main", TextField::create('VendorName', 'Vendor name'), "Summary"); $fields->addFieldToTab("Root.Main", DropdownField::create('ProtocolVersion', 'Version of forms protocol to use?', singleton('SagePay')->dbObject('ProtocolVersion')->enumValues()), "Summary"); $fields->addFieldToTab('Root.Main', PasswordField::create('EncryptedPassword', 'Password'), "Summary"); $fields->addFieldToTab("Root.Main", OptionsetField::create('SendEmail', 'How would you like SagePay to send emails?', $email_options), "Summary"); $fields->addFieldToTab("Root.Main", EmailField::create('EmailRecipient', 'Email address of user to recieve email'), "Summary"); } return $fields; }