예제 #1
0
 /**
  * Create New Customer form fields
  *
  * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset
  * @return array
  */
 protected function _addNewCustomerFormFields($fieldset)
 {
     $fieldset->removeField('created_in');
     // Prepare send welcome email checkbox
     $fieldset->addField('sendemail', 'checkbox', array('label' => __('Send Welcome Email'), 'name' => 'sendemail', 'id' => 'sendemail'));
     $renderer = $this->getLayout()->createBlock('Magento\\Customer\\Block\\Adminhtml\\Edit\\Renderer\\Attribute\\Sendemail');
     $renderer->setForm($fieldset->getForm());
     $fieldset->getForm()->getElement('sendemail')->setRenderer($renderer);
     if (!$this->_storeManager->isSingleStoreMode()) {
         $fieldset->addField('sendemail_store_id', 'select', array('label' => __('Send From'), 'name' => 'sendemail_store_id', 'values' => $this->_systemStore->getStoreValuesForForm()));
     }
     return array('sendemail' => '1');
 }