示例#1
0
 /**
  * Internal constructor
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'rate_id';
     $this->_blockGroup = 'enterprise_reward';
     $this->_controller = 'adminhtml_reward_rate';
 }
示例#2
0
 /**
  * Initialize form
  * Add standard buttons
  * Add "Save and Continue" button
  */
 protected function _construct()
 {
     $this->_objectId = 'id';
     $this->_controller = 'promo_quote';
     parent::_construct();
     $this->_addButton('save_and_continue_edit', array('class' => 'save', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Save and Continue Edit'), 'data_attribute' => array('mage-init' => array('button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form')))), 10);
 }
示例#3
0
 protected function _construct()
 {
     $this->_objectId = 'invoice_id';
     $this->_controller = 'sales_order_invoice';
     $this->_mode = 'view';
     $this->_session = Mage::getSingleton('Mage_Backend_Model_Auth_Session');
     parent::_construct();
     $this->_removeButton('save');
     $this->_removeButton('reset');
     $this->_removeButton('delete');
     if (!$this->getInvoice()) {
         return;
     }
     if ($this->_isAllowedAction('Mage_Sales::cancel') && $this->getInvoice()->canCancel()) {
         $this->_addButton('cancel', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
     }
     if ($this->_isAllowedAction('Mage_Sales::emails')) {
         $this->addButton('send_notification', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Send Email'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('Mage_Sales_Helper_Data')->__('Are you sure you want to send Invoice email to customer?') . '\', \'' . $this->getEmailUrl() . '\')'));
     }
     $orderPayment = $this->getInvoice()->getOrder()->getPayment();
     if ($this->_isAllowedAction('Mage_Sales::creditmemo') && $this->getInvoice()->getOrder()->canCreditmemo()) {
         if ($orderPayment->canRefundPartialPerInvoice() && $this->getInvoice()->canRefund() && $orderPayment->getAmountPaid() > $orderPayment->getAmountRefunded() || $orderPayment->canRefund() && !$this->getInvoice()->getIsUsedForRefund()) {
             $this->_addButton('capture', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Credit Memo'), 'class' => 'go', 'onclick' => 'setLocation(\'' . $this->getCreditMemoUrl() . '\')'));
         }
     }
     if ($this->_isAllowedAction('Mage_Sales::capture') && $this->getInvoice()->canCapture()) {
         $this->_addButton('capture', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Capture'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getCaptureUrl() . '\')'));
     }
     if ($this->getInvoice()->canVoid()) {
         $this->_addButton('void', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
     }
     if ($this->getInvoice()->getId()) {
         $this->_addButton('print', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
     }
 }
示例#4
0
 /**
  * Init container
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_headerText = $this->__('Magento <--> X.commerce');
     $this->_controller = 'adminhtml_attribute';
     $this->_blockGroup = 'xcom_mapping';
 }
示例#5
0
 /**
  * Internal constructor
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'job_code';
     $this->_blockGroup = 'aoe_scheduler';
     $this->_controller = 'adminhtml_job';
 }
示例#6
0
 /**
  * Internal constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'import_id';
     $this->_blockGroup = 'mageworx';
     $this->_controller = 'downloads_import';
 }
示例#7
0
 protected function _construct()
 {
     $this->_objectId = 'order_id';
     $this->_controller = 'sales_order';
     $this->_mode = 'create';
     parent::_construct();
     $this->setId('sales_order_create');
     $customerId = $this->_getSession()->getCustomerId();
     $storeId = $this->_getSession()->getStoreId();
     $this->_updateButton('save', 'label', Mage::helper('Mage_Sales_Helper_Data')->__('Submit Order'));
     $this->_updateButton('save', 'onclick', "order.submit()");
     $this->_updateButton('save', 'id', 'submit_order_top_button');
     if (is_null($customerId) || !$storeId) {
         $this->_updateButton('save', 'style', 'display:none');
     }
     $this->_updateButton('back', 'id', 'back_order_top_button');
     $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getBackUrl() . '\')');
     $this->_updateButton('reset', 'id', 'reset_order_top_button');
     if (is_null($customerId)) {
         $this->_updateButton('reset', 'style', 'display:none');
     } else {
         $this->_updateButton('back', 'style', 'display:none');
     }
     $confirm = Mage::helper('Mage_Sales_Helper_Data')->__('Are you sure you want to cancel this order?');
     $this->_updateButton('reset', 'label', Mage::helper('Mage_Sales_Helper_Data')->__('Cancel'));
     $this->_updateButton('reset', 'class', 'cancel');
     $this->_updateButton('reset', 'onclick', 'deleteConfirm(\'' . $confirm . '\', \'' . $this->getCancelUrl() . '\')');
 }
示例#8
0
 /**
  * Init container
  */
 protected function _construct()
 {
     $this->_objectId = 'sitemap_id';
     $this->_controller = 'sitemap';
     parent::_construct();
     $this->_addButton('generate', array('label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save & Generate'), 'data_attribute' => array('mage-init' => array('button' => array('event' => 'save', 'target' => '#edit_form', 'eventData' => array('action' => array('args' => array('generate' => '1')))))), 'class' => 'add'));
 }
示例#9
0
 /**
  * Block construction
  * Initialize titles, buttons
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_controller = '';
     $this->_headerText = Mage::helper('Mage_Paypal_Helper_Data')->__('View Transaction Details');
     $this->_removeButton('reset')->_removeButton('delete')->_removeButton('save');
 }
示例#10
0
 protected function _construct()
 {
     $this->_objectId = 'entity_id';
     $this->_controller = 'catalog_category';
     $this->_mode = 'edit';
     parent::_construct();
 }
 /**
  * {@inheritdoc}
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'import_id';
     $this->_blockGroup = 'nicovogelaar_nedisimport';
     $this->_controller = 'adminhtml_import';
 }
示例#12
0
文件: Edit.php 项目: okite11/frames21
 /**
  * Internal constructor
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'instance_id';
     $this->_blockGroup = 'widget';
     $this->_controller = 'adminhtml_widget_instance';
 }
示例#13
0
 /**
  * Add & remove control buttons
  *
  */
 protected function _construct()
 {
     $this->_objectId = 'creditmemo_id';
     $this->_controller = 'sales_order_creditmemo';
     $this->_mode = 'view';
     parent::_construct();
     $this->_removeButton('save');
     $this->_removeButton('reset');
     $this->_removeButton('delete');
     if (!$this->getCreditmemo()) {
         return;
     }
     if ($this->getCreditmemo()->canCancel()) {
         $this->_addButton('cancel', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
     }
     if ($this->_isAllowedAction('Mage_Sales::emails')) {
         $this->addButton('send_notification', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Send Email'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('Mage_Sales_Helper_Data')->__('Are you sure you want to send Creditmemo email to customer?') . '\', \'' . $this->getEmailUrl() . '\')'));
     }
     if ($this->getCreditmemo()->canRefund()) {
         $this->_addButton('refund', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Refund'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getRefundUrl() . '\')'));
     }
     if ($this->getCreditmemo()->canVoid()) {
         $this->_addButton('void', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
     }
     if ($this->getCreditmemo()->getId()) {
         $this->_addButton('print', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
     }
 }
示例#14
0
文件: Edit.php 项目: okite11/frames21
 /**
  * Internal constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'export_id';
     $this->_blockGroup = 'importexport';
     $this->_controller = 'adminhtml_export';
 }
示例#15
0
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'page';
     $this->_blockGroup = 'mzeis_documentation';
     $this->_controller = 'adminhtml_page';
 }
示例#16
0
 public function _construct()
 {
     parent::_construct();
     $this->_blockGroup = Forkel_OpenGraph_Helper_Data::MODULE_KEY;
     $this->_controller = 'adminhtml_entity';
     $this->_updateButton('save', 'label', $this->hlpr()->__('Save'));
 }
示例#17
0
 protected function _construct()
 {
     $this->_controller = 'sales_order';
     $this->_mode = 'address';
     parent::_construct();
     $this->_updateButton('save', 'label', Mage::helper('Mage_Sales_Helper_Data')->__('Save Order Address'));
     $this->_removeButton('delete');
 }
示例#18
0
 protected function _construct()
 {
     parent::_construct();
     $this->_controller = 'system_account';
     $this->_updateButton('save', 'label', Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Account'));
     $this->_removeButton('delete');
     $this->_removeButton('back');
 }
示例#19
0
 /**
  * Internal constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->removeButton('back')->removeButton('reset')->_updateButton('save', 'label', $this->__('Check Data'))->_updateButton('save', 'id', 'upload_button')->_updateButton('save', 'onclick', 'varienImport.postToFrame();')->_updateButton('save', 'data_attribute', '');
     $this->_objectId = 'import_id';
     $this->_blockGroup = 'Mage_ImportExport';
     $this->_controller = 'adminhtml_import';
 }
示例#20
0
 protected function _construct()
 {
     $this->_controller = 'sales_order_status';
     $this->_mode = 'assign';
     parent::_construct();
     $this->_updateButton('save', 'label', Mage::helper('Mage_Sales_Helper_Data')->__('Save Status Assignment'));
     $this->_removeButton('delete');
 }
示例#21
0
 protected function _construct()
 {
     $this->_objectId = 'id';
     $this->_controller = 'catalog_search';
     parent::_construct();
     $this->_updateButton('save', 'label', Mage::helper('Mage_Catalog_Helper_Data')->__('Save Search'));
     $this->_updateButton('delete', 'label', Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Search'));
 }
示例#22
0
 /**
  * Init class
  *
  */
 protected function _construct()
 {
     $this->_objectId = 'id';
     $this->_controller = 'checkout_agreement';
     parent::_construct();
     $this->_updateButton('save', 'label', Mage::helper('Mage_Checkout_Helper_Data')->__('Save Condition'));
     $this->_updateButton('delete', 'label', Mage::helper('Mage_Checkout_Helper_Data')->__('Delete Condition'));
 }
示例#23
0
 protected function _construct()
 {
     $this->_objectId = 'order_id';
     $this->_controller = 'sales_order_invoice';
     $this->_mode = 'create';
     parent::_construct();
     $this->_removeButton('save');
     $this->_removeButton('delete');
 }
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'queue_id';
     $this->_blockGroup = 'gorilla_queue';
     $this->_controller = 'adminhtml_queue';
     $this->_mode = 'edit';
     $this->_headerText = $this->helper('ecodes')->__('Edit Queue Item');
 }
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'ecodes';
     $this->_controller = 'adminhtml_downloadable';
     $this->_mode = 'edit';
     $this->_headerText = $this->helper('ecodes')->__('Edit eCode Serial Item');
 }
示例#26
0
 public function _construct()
 {
     parent::_construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'msp_cashondelivery';
     $this->_controller = 'admin_rule';
     $this->_updateButton('save', 'label', Mage::helper('msp_cashondelivery')->__('Save Rule'));
     $this->_updateButton('delete', 'label', Mage::helper('msp_cashondelivery')->__('Delete Rule'));
 }
示例#27
0
 /**
  * Init class
  *
  */
 protected function _construct()
 {
     $this->_objectId = 'rule';
     $this->_controller = 'tax_rule';
     parent::_construct();
     $this->_updateButton('save', 'label', Mage::helper('Mage_Tax_Helper_Data')->__('Save Rule'));
     $this->_updateButton('delete', 'label', Mage::helper('Mage_Tax_Helper_Data')->__('Delete Rule'));
     $this->_addButton('save_and_continue', array('label' => Mage::helper('Mage_Tax_Helper_Data')->__('Save and Continue Edit'), 'class' => 'save', 'data_attribute' => array('mage-init' => array('button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form')))), 10);
 }
示例#28
0
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'id';
     $this->_controller = 'poll';
     $this->_updateButton('save', 'label', Mage::helper('Mage_Poll_Helper_Data')->__('Save Poll'));
     $this->_updateButton('delete', 'label', Mage::helper('Mage_Poll_Helper_Data')->__('Delete Poll'));
     $this->setValidationUrl($this->getUrl('*/*/validate', array('id' => $this->getRequest()->getParam($this->_objectId))));
 }
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'ecodes';
     $this->_controller = 'adminhtml_downloadable';
     $this->_mode = 'uploadcsv';
     $this->_headerText = $this->helper('ecodes')->__('Upload New eCodes Serials CSV File');
 }
示例#30
0
 /**
  * construct
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'sphinx';
     $this->_controller = 'adminhtml_form';
     $this->_mode = 'edit';
     $this->_updateButton('save', 'label', Mage::helper('sphinx')->__('Save'));
 }