以下のコードをMage_Adminhtml_Block_Customer_Edit_Tab_Account
クラスから削除
アンダーinitForm()
メソッド
if ($customer->getId()) {
if (!$customer->isReadonly()) {
// Add password management fieldset
$newFieldset = $form->addFieldset(
'password_fieldset',
array('legend' => Mage::helper('customer')->__('Password Management'))
);
// New customer password
$field = $newFieldset->addField('new_password', 'text',
array(
'label' => Mage::helper('customer')->__('New Password'),
'name' => 'new_password',
'class' => 'validate-new-password'
)
);
$field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
// Prepare customer confirmation control (only for existing customers)
$confirmationKey = $customer->getConfirmation();
if ($confirmationKey || $customer->isConfirmationRequired()) {
$confirmationAttribute = $customer->getAttribute('confirmation');
if (!$confirmationKey) {
$confirmationKey = $customer->getRandomConfirmationKey();
}
$element = $fieldset->addField('confirmation', 'select', array(
'name' => 'confirmation',
'label' => Mage::helper('customer')->__($confirmationAttribute->getFrontendLabel()),
))->setEntityAttribute($confirmationAttribute)
->setValues(array('' => 'Confirmed', $confirmationKey => 'Not confirmed'));
// Prepare send welcome email checkbox if customer is not confirmed
// no need to add it, if website ID is empty
if ($customer->getConfirmation() && $customer->getWebsiteId()) {
$fieldset->addField('sendemail', 'checkbox', array(
'name' => 'sendemail',
'label' => Mage::helper('customer')->__('Send Welcome Email after Confirmation')
));
$customer->setData('sendemail', '1');
}
}
}
} else {
$newFieldset = $form->addFieldset(
'password_fieldset',
array('legend'=>Mage::helper('customer')->__('Password Management'))
);
$field = $newFieldset->addField('password', 'text',
array(
'label' => Mage::helper('customer')->__('Password'),
'class' => 'input-text required-entry validate-password',
'name' => 'password',
'required' => true
)
);
$field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
// Prepare send welcome email checkbox
$fieldset->addField('sendemail', 'checkbox', array(
'label' => Mage::helper('customer')->__('Send Welcome Email'),
'name' => 'sendemail',
'id' => 'sendemail',
));
$customer->setData('sendemail', '1');
if (!Mage::app()->isSingleStoreMode()) {
$fieldset->addField('sendemail_store_id', 'select', array(
'label' => $this->helper('customer')->__('Send From'),
'name' => 'sendemail_store_id',
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
));
}
}