当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Widget_Form_Container::__construct方法代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Form_Container::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Form_Container::__construct方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Form_Container::__construct怎么用?PHP Mage_Adminhtml_Block_Widget_Form_Container::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Adminhtml_Block_Widget_Form_Container的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Widget_Form_Container::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->_blockGroup = 'turnkeye_adminform';
     $this->_controller = 'adminhtml_form';
     $this->_headerText = Mage::helper('turnkeye_adminform')->__('Edit Form');
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:10,代码来源:Edit.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('listingsAddStepOne');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml_listings';
     $this->_mode = 'edit';
     //------------------------------
     // Set header text
     //------------------------------
     $this->_headerText = Mage::helper('M2ePro')->__('Add Listing [Settings]');
     //------------------------------
     // Set buttons actions
     //------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     $this->_addButton('back', array('label' => Mage::helper('M2ePro')->__('Back'), 'onclick' => 'ListingEditHandlersObj.back_click(\'' . $this->getUrl('*/*/index') . '\')', 'class' => 'back'));
     $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'ListingEditHandlersObj.reset_click()', 'class' => 'reset'));
     $this->_addButton('save_and_next', array('label' => Mage::helper('M2ePro')->__('Next'), 'onclick' => 'ListingEditHandlersObj.save_click(\'' . $this->getUrl('*/*/add', array('step' => '1')) . '\')', 'class' => 'next'));
     //------------------------------
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:27,代码来源:AddStepOne.php

示例3: __construct

 /**
  * Setting app action buttons for application
  */
 public function __construct()
 {
     $this->_objectId = 'application_id';
     $this->_controller = 'adminhtml_mobile';
     $this->_blockGroup = 'xmlconnect';
     parent::__construct();
     if ((bool) (!Mage::getSingleton('adminhtml/session')->getNewApplication())) {
         $app = Mage::helper('xmlconnect')->getApplication();
         $this->_updateButton('save', 'label', $this->__('Save'));
         $this->_updateButton('save', 'onclick', 'if (editForm.submit()) {disableElements(\'save\')}');
         $this->_addButton('save_and_continue', array('label' => $this->__('Save and Continue Edit'), 'onclick' => 'saveAndContinueEdit()', 'class' => 'save'), -5);
         if ($app->getId()) {
             $this->_addButton('submit_application_button', array('label' => $this->__('Save and Submit App'), 'onclick' => 'saveAndSubmitApp()', 'class' => 'save'), -10);
         }
         $this->_formScripts[] = 'function saveAndContinueEdit() {' . 'if (editForm.submit($(\'edit_form\').action + \'back/edit/\')) {disableElements(\'save\')};}';
         if ($app->getId()) {
             $this->_formScripts[] = 'function saveAndSubmitApp() {' . 'if (editForm.submit($(\'edit_form\').action + \'submitapp/' . $app->getId() . '\')) {' . 'disableElements(\'save\')};}';
         }
     } else {
         $this->removeButton('save');
         $this->removeButton('delete');
     }
     if (isset($app) && $app->getIsSubmitted()) {
         $this->removeButton('delete');
     }
     $this->removeButton('reset');
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:30,代码来源:Edit.php

示例4: __construct

 public function __construct()
 {
     $this->_objectId = 'invoice_id';
     $this->_controller = 'sales_order_invoice';
     $this->_mode = 'view';
     $this->_session = Mage::getSingleton('admin/session');
     parent::__construct();
     $this->_removeButton('save');
     $this->_removeButton('reset');
     $this->_removeButton('delete');
     if ($this->_isAllowedAction('cancel') && $this->getInvoice()->canCancel()) {
         $this->_addButton('cancel', array('label' => Mage::helper('sales')->__('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
     }
     if ($this->_isAllowedAction('emails')) {
         $this->addButton('send_notification', array('label' => Mage::helper('sales')->__('Send Email'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__('Are you sure you want to send Invoice email to customer?') . '\', \'' . $this->getEmailUrl() . '\')'));
     }
     $orderPayment = $this->getInvoice()->getOrder()->getPayment();
     if ($this->_isAllowedAction('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('sales')->__('Credit Memo'), 'class' => 'go', 'onclick' => 'setLocation(\'' . $this->getCreditMemoUrl() . '\')'));
         }
     }
     if ($this->_isAllowedAction('capture') && $this->getInvoice()->canCapture()) {
         $this->_addButton('capture', array('label' => Mage::helper('sales')->__('Capture'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getCaptureUrl() . '\')'));
     }
     if ($this->getInvoice()->canVoid()) {
         $this->_addButton('void', array('label' => Mage::helper('sales')->__('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
     }
     if ($this->getInvoice()->getId()) {
         $this->_addButton('print', array('label' => Mage::helper('sales')->__('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
     }
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:32,代码来源:View.php

示例5: __construct

 /**
  * Init class
  *
  */
 public function __construct()
 {
     switch (Mage::registry('store_type')) {
         case 'website':
             $this->_objectId = 'website_id';
             $saveLabel = Mage::helper('core')->__('Save Website');
             $deleteLabel = Mage::helper('core')->__('Delete Website');
             $deleteUrl = $this->getUrl('*/*/deleteWebsite', array('item_id' => Mage::registry('store_data')->getId()));
             break;
         case 'group':
             $this->_objectId = 'group_id';
             $saveLabel = Mage::helper('core')->__('Save Store');
             $deleteLabel = Mage::helper('core')->__('Delete Store');
             $deleteUrl = $this->getUrl('*/*/deleteGroup', array('item_id' => Mage::registry('store_data')->getId()));
             break;
         case 'store':
             $this->_objectId = 'store_id';
             $saveLabel = Mage::helper('core')->__('Save Store View');
             $deleteLabel = Mage::helper('core')->__('Delete Store View');
             $deleteUrl = $this->getUrl('*/*/deleteStore', array('item_id' => Mage::registry('store_data')->getId()));
             break;
     }
     $this->_controller = 'system_store';
     parent::__construct();
     $this->_updateButton('save', 'label', $saveLabel);
     $this->_updateButton('delete', 'label', $deleteLabel);
     $this->_updateButton('delete', 'onclick', 'setLocation(\'' . $deleteUrl . '\');');
     if (!Mage::registry('store_data')->isCanDelete()) {
         $this->_removeButton('delete');
     }
     if (Mage::registry('store_data')->isReadOnly()) {
         $this->_removeButton('save')->_removeButton('reset');
     }
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:38,代码来源:Edit.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'inventorybarcode';
     $this->_controller = 'adminhtml_barcode';
     //        $this->_updateButton('save', 'label', Mage::helper('inventorybarcode')->__('Save Item'));
     $this->_removeButton('delete');
     /* Add by Kai - print barcode */
     if ($this->getRequest()->getParam('print') == 'true') {
         $this->_removeButton('save');
         $this->_removeButton('reset');
         $this->_addButton('printbarcode1', array('label' => Mage::helper('adminhtml')->__('PRINT'), 'onclick' => 'printbarcode1()', 'class' => 'printbarcode1'), -100);
     } else {
         /* End add by Kai - print barcode */
         if ($this->getRequest()->getParam('id')) {
             $this->_removeButton('save');
             $this->_removeButton('reset');
             $this->_addButton('print_barcode', array('label' => Mage::helper('inventorybarcode')->__('Print Barcodes'), 'onclick' => 'createBarcode()', 'class' => 'add'), 0);
             if (Mage::registry('barcode_data')->getBarcodeStatus() == 1) {
                 $this->_addButton('disable_barcode', array('label' => Mage::helper('inventorybarcode')->__('Disable'), 'onclick' => 'disableBarcode()', 'class' => 'disable'), 0);
             } else {
                 $this->_addButton('disable_barcode', array('label' => Mage::helper('inventorybarcode')->__('Enable'), 'onclick' => 'enableBarcode()', 'class' => 'disable'), 0);
             }
         } else {
             $this->_updateButton('save', 'label', Mage::helper('inventorybarcode')->__('Save Barcode'));
         }
     }
     $classBarcode = Mage::helper('inventorybarcode')->getValidateBarcode();
     $this->_formScripts[] = "\r\n            function createBarcode(){\r\n                var url = '" . $this->getUrl('adminhtml/inb_printbarcode/selecttemplate', array('barcode' => $this->getRequest()->getParam('id'))) . "';\r\n                window.open(url,'_blank', 'scrollbars=yes, resizable=yes, width=750, height=500, left=80, menubar=yes');                \r\n            }\r\n            \r\n            function toggleEditor() {\r\n                if (tinyMCE.getInstanceById('inventorybarcode_content') == null)\r\n                    tinyMCE.execCommand('mceAddControl', false, 'inventorybarcode_content');\r\n                else\r\n                    tinyMCE.execCommand('mceRemoveControl', false, 'inventorybarcode_content');\r\n            }\r\n            \r\n            function printbarcode1()\r\n            {   \r\n                var productInput = \$\$('input[name=\"purchase_products\"]');\r\n                if(productInput[0].value == ''){\r\n                    alert('" . $this->__('Please choose barcodes before printing.') . "');\r\n                    return false;\r\n                }\r\n                \r\n                \$('edit_form').target='_blank';\r\n                editForm.submit('" . $this->getUrl('*/*/massprint') . "');\r\n            }\r\n\r\n\r\n            function saveAndContinueEdit(){\r\n                editForm.submit(\$('edit_form').action+'back/edit/');\r\n            }\r\n            \r\n            function disableBarcode(){\r\n                editForm.submit(\$('edit_form').action+'barcode_status/2/');\r\n            }\r\n            \r\n            function enableBarcode(){\r\n                editForm.submit(\$('edit_form').action+'barcode_status/1/');\r\n            }\r\n            \r\n            function setBarcodeAuto (element, id){\r\n                if(element.checked){\r\n                    \$(id).value = '';\r\n                    \$(id).readOnly = true;\r\n                    \$(id).removeClassName('" . $classBarcode . "')                    \r\n                }else{\r\n                    \$(id).readOnly = false;\r\n                    \$(id).addClassName('" . $classBarcode . "')                    \r\n                }\r\n            }\r\n            \r\n             function fileSelected() {\r\n                var file = document.getElementById('fileToUpload').files[0];\r\n                if (file) {\r\n                    var fileSize = 0;\r\n                    if (file.size > 1024 * 1024)\r\n                        fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';\r\n                    else\r\n                        fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';\r\n                    document.getElementById('fileName').innerHTML = 'Name: ' + file.name;\r\n                    document.getElementById('fileSize').innerHTML = 'Size: ' + fileSize;\r\n                    document.getElementById('fileType').innerHTML = 'Type: ' + file.type;\r\n                }\r\n            }\r\n\t\t\t\r\n            function uploadFile() {\r\n                if(!\$('fileToUpload') || !\$('fileToUpload').value){\r\n                    alert('Please choose CSV file to import!');return false;\r\n                }\r\n                if(\$('loading-mask')){\r\n                    \$('loading-mask').style.display = 'block';\r\n                    \$('loading-mask').style.height = '900px';                    \r\n                    \$('loading-mask').style.width = '1500px';                    \r\n                    \$('loading-mask').style.top = '0';                    \r\n                    \$('loading-mask').style.left = '-2';                    \r\n                }\r\n                var fd = new FormData();\r\n                fd.append('fileToUpload', document.getElementById('fileToUpload').files[0]);\r\n                fd.append('form_key', document.getElementById('form_key').value);\r\n                var xhr = new XMLHttpRequest();\r\n                xhr.upload.addEventListener('progress', uploadProgress, false);\r\n                xhr.addEventListener('load', uploadComplete, false);\r\n                xhr.addEventListener('error', uploadFailed, false);\r\n                xhr.addEventListener('abort', uploadCanceled, false);\r\n                xhr.open('POST', '" . $this->getUrl('adminhtml/inb_barcode/getImportCsv') . "');\r\n                xhr.send(fd);\r\n           }\r\n\r\n           function uploadProgress(evt) {\r\n                if (evt.lengthComputable) {\r\n                    var percentComplete = Math.round(evt.loaded * 100 / evt.total);\r\n                    //document.getElementById('progressNumber').innerHTML = percentComplete.toString() + '%';\r\n                   // document.getElementById('prog').value = percentComplete;\r\n                }\r\n                else {\r\n                   // document.getElementById('progressNumber').innerHTML = 'unable to compute';\r\n                }\r\n           }\r\n          \r\n           function uploadComplete(evt) {\r\n                var import_data = '" . Mage::getModel('admin/session')->getData('null_barcode_product_import') . "';    \r\n                    \r\n                if(import_data == '1'){\r\n                     alert('No product was added');\r\n                }\r\n                \r\n                \$('barcode_tabs_products_section').addClassName('notloaded');\r\n                barcode_tabsJsTabs.showTabContent(\$('barcode_tabs_products_section'));\r\n                //varienGlobalEvents.attachEventHandler('showTab',function(){ sendstockproductGridJsObject.doFilter(); });\r\n           }\r\n\r\n           function uploadFailed(evt) {\r\n                alert('There was an error attempting to upload the file.');\r\n           }\r\n\r\n           function uploadCanceled(evt) {\r\n                alert('The upload has been canceled by the user or the browser dropped the connection.');\r\n           }   \r\n        ";
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:31,代码来源:Edit.php

示例7: __construct

    public function __construct()
    {
        parent::__construct();
                 
        $this->_objectId = 'id';
        $this->_blockGroup = 'produp1';
        $this->_controller = 'adminhtml_produp1';
        
        $this->_updateButton('save', 'label', Mage::helper('produp1')->__('Save Item'));
        $this->_updateButton('delete', 'label', Mage::helper('produp1')->__('Delete Item'));
		
        $this->_addButton('saveandcontinue', array(
            'label'     => Mage::helper('adminhtml')->__('Save And Continue Edit'),
            'onclick'   => 'saveAndContinueEdit()',
            'class'     => 'save',
        ), -100);

        $this->_formScripts[] = "
            function toggleEditor() {
                if (tinyMCE.getInstanceById('produp1_content') == null) {
                    tinyMCE.execCommand('mceAddControl', false, 'produp1_content');
                } else {
                    tinyMCE.execCommand('mceRemoveControl', false, 'produp1_content');
                }
            }

            function saveAndContinueEdit(){
                editForm.submit($('edit_form').action+'back/edit/');
            }
        ";
    }
开发者ID:ravi2jdesign,项目名称:magentoOLD,代码行数:31,代码来源:Edit.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('license');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml';
     $this->_mode = 'license';
     //------------------------------
     // Set header text
     //------------------------------
     $this->_headerText = Mage::helper('M2ePro')->__('License');
     //------------------------------
     // Set buttons actions
     //------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     if (Mage::getModel('M2ePro/Wizard')->isActive() && Mage::getModel('M2ePro/Wizard')->getStatus() == Ess_M2ePro_Model_Wizard::STATUS_LICENSE) {
         $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'CommonHandlersObj.reset_click()', 'class' => 'reset'));
         $this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Complete This Step'), 'onclick' => 'LicenseHandlersObj.completeStep();', 'class' => 'close'));
     } else {
         $this->_addButton('goto_about', array('label' => Mage::helper('M2ePro')->__('About'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_about/index') . '\')', 'class' => 'button_link'));
         $this->_addButton('goto_support', array('label' => Mage::helper('M2ePro')->__('Support'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_support/index') . '\')', 'class' => 'button_link'));
         $docsLink = Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/documentation/', 'baseurl');
         $this->_addButton('goto_docs', array('label' => Mage::helper('M2ePro')->__('Documentation'), 'onclick' => 'window.open(\'' . $docsLink . '\', \'M2ePro Documentation \' + \'' . $docsLink . '\'); return false;', 'class' => 'button_link'));
         $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'LicenseHandlersObj.reset_click()', 'class' => 'reset'));
     }
     //------------------------------
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:34,代码来源:License.php

示例9: __construct

 /**
  * Block construction
  * Initialize titles, buttons
  */
 public function __construct()
 {
     parent::__construct();
     $this->_controller = '';
     $this->_headerText = Mage::helper('paypal')->__('View Transaction Details');
     $this->_removeButton('reset')->_removeButton('delete')->_removeButton('save');
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:11,代码来源:Details.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('synchronization');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml';
     $this->_mode = 'synchronization';
     //------------------------------
     // Set header text
     //------------------------------
     $this->_headerText = Mage::helper('M2ePro')->__('Synchronization');
     //------------------------------
     // Set buttons actions
     //------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     if (!(Mage::getModel('M2ePro/Wizard')->isActive() && Mage::getModel('M2ePro/Wizard')->getStatus() == Ess_M2ePro_Model_Wizard::STATUS_SYNCHRONIZATION)) {
         $this->_addButton('goto_accounts', array('label' => Mage::helper('M2ePro')->__('Accounts'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_accounts/index') . '\')', 'class' => 'button_link'));
         $this->_addButton('view_log', array('label' => Mage::helper('M2ePro')->__('View Log'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_logs/synchronizations', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_synchronization/index'))) . '\')', 'class' => 'button_link'));
         $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'SynchronizationHandlersObj.reset_click()', 'class' => 'reset'));
         $this->_addButton('run_all_enabled_now', array('label' => Mage::helper('M2ePro')->__('Run Enabled Now'), 'onclick' => 'SynchronizationHandlersObj.saveSettings(\'runAllEnabledNow\');', 'class' => 'save'));
     }
     $this->_addButton('save', array('label' => Mage::helper('M2ePro')->__('Save Settings'), 'onclick' => 'SynchronizationHandlersObj.saveSettings()', 'class' => 'save'));
     if (Mage::getModel('M2ePro/Wizard')->isActive() && Mage::getModel('M2ePro/Wizard')->getStatus() == Ess_M2ePro_Model_Wizard::STATUS_SYNCHRONIZATION) {
         $this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Complete This Step'), 'onclick' => 'SynchronizationHandlersObj.completeStep();', 'class' => 'close'));
     }
     //------------------------------
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:34,代码来源:Synchronization.php

示例11: __construct

 public function __construct()
 {
     $this->_objectId = 'id';
     $this->_blockGroup = 'marcascategoria';
     $this->_controller = 'config';
     parent::__construct();
 }
开发者ID:xiaoguizhidao,项目名称:emporiodopara,代码行数:7,代码来源:Config.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('ebayConfigurationGeneral');
     $this->_blockGroup = 'M2ePro';
     $this->_controller = 'adminhtml_ebay_configuration';
     $this->_mode = 'general';
     // ---------------------------------------
     // Set header text
     // ---------------------------------------
     $this->_headerText = '';
     // ---------------------------------------
     // Set buttons actions
     // ---------------------------------------
     $this->removeButton('back');
     $this->removeButton('reset');
     $this->removeButton('delete');
     $this->removeButton('add');
     $this->removeButton('save');
     $this->removeButton('edit');
     $this->_addButton('save', array('label' => Mage::helper('M2ePro')->__('Save'), 'onclick' => 'editForm.submit();', 'class' => 'save'));
     // ---------------------------------------
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:25,代码来源:General.php

示例13: __construct

 public function __construct()
 {
     $this->_objectId = 'invoice_id';
     $this->_controller = 'sales_order_invoice';
     $this->_mode = 'view';
     parent::__construct();
     $this->_removeButton('save');
     $this->_removeButton('reset');
     $this->_removeButton('delete');
     if ($this->getInvoice()->canCancel()) {
         $this->_addButton('cancel', array('label' => AO::helper('sales')->__('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
     }
     if ($this->getInvoice()->getOrder()->canCreditmemo() && !$this->getInvoice()->getIsUsedForRefund()) {
         $this->_addButton('capture', array('label' => AO::helper('sales')->__('Credit Memo'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getCreditMemoUrl() . '\')'));
     }
     if (AO::getSingleton('admin/session')->isAllowed('sales/order/actions/capture') && $this->getInvoice()->canCapture()) {
         $this->_addButton('capture', array('label' => AO::helper('sales')->__('Capture'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getCaptureUrl() . '\')'));
     }
     if ($this->getInvoice()->canVoid()) {
         $this->_addButton('void', array('label' => AO::helper('sales')->__('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
     }
     if ($this->getInvoice()->getId()) {
         $this->_addButton('print', array('label' => AO::helper('sales')->__('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
     }
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:25,代码来源:Sales_Order_Invoice_View.php

示例14: __construct

 public function __construct()
 {
     $this->_blockGroup = Forkel_Bars_Helper_Data::MODULE_KEY;
     $this->_controller = 'adminhtml_server';
     parent::__construct();
     $this->_updateButton('save', 'label', $this->__('Save Record'));
 }
开发者ID:tobias-forkel,项目名称:Forkel_Bars,代码行数:7,代码来源:Edit.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_objectId = 'id';
     $this->_blockGroup = 'blog';
     $this->_controller = 'adminhtml_post';
     $id = Mage::app()->getFrontController()->getRequest()->getParam('id', 0);
     $this->setValidationUrl(Mage::helper('adminhtml')->getUrl('blog/adminhtml_post/validate', array('id' => $id)));
     //echo $this->getJsUrl('tiny_mce/tiny_mce.js');exit;
     $this->_updateButton('save', 'label', Mage::helper('blog')->__('Save Post'));
     $this->_updateButton('delete', 'label', Mage::helper('blog')->__('Delete Post'));
     //$this->getTagList();
     $this->_addButton('saveandcontinue', array('label' => Mage::helper('adminhtml')->__('Save And Continue Edit'), 'onclick' => 'saveAndContinueEdit()', 'class' => 'save'), -100);
     $tagList = $this->getTagList();
     $urlTagList = Mage::helper('adminhtml')->getUrl('blog/adminhtml_post/autotag');
     $this->_formScripts[] = "\n            function toggleEditor() {\n                if (tinyMCE.getInstanceById('post_content') == null) {\n                    tinyMCE.execCommand('mceAddControl', false, 'post_content');\n                } else {\n                    tinyMCE.execCommand('mceRemoveControl', false, 'post_content');\n                }\n            }\n\n            editForm._processValidationResult = function(transport) {\n                var response = transport.responseText.evalJSON();\n                if (response.error){\n                    if (response.attribute && \$(response.attribute)) {\n                        \$(response.attribute).setHasError(true, editForm);\n                        Validation.ajaxError(\$(response.attribute), response.message);\n                        if (!Prototype.Browser.IE){\n                            \$(response.attribute).focus();\n                        }\n                    }\n                    else if (\$('messages')) {\n                      if(!\$('advice-validate-ajax-sku'))\n                        {\n                            var div = new Element('div', { 'class': 'validation-advice', id: 'advice-validate-ajax-sku' }).update(response.message);\n                            \$('post_identifier').value = response.identifier;\n                            \$('post_identifier').up().insert(div);\n                        }\n                       \n                    }\n                }\n                else{\n                    editForm._submit();\n                }\n            };\n\n            function saveAndContinueEdit(){\n                editForm.submit(\$('edit_form').action+'back/edit/');\n            }\n            \n            new Ajax.Autocompleter(\n                    'tag',\n                    'tag-indicator',\n                    '{$urlTagList}',\n                    {\n                        paramName:'q',\n                        minChars:3,\n                        indicator:'tag_auto_indicator',\n                        updateElement:getSelectionTag,\n                        evalJSON:'force',\n                    }\n                );\n            function getSelectionTag(li)\n            {\n                var tagid = li.getAttribute('value');\n                var tagname = li.getAttribute('tag');\n                addTag(tagname,tagid);\n                //alert('abc');\n            }\n            \n            function addTag(tagname,tagid)\n            {\n                var curtags = \$('taglist').innerHTML;\n                var curtagsvalue = \$('tag-value').innerHTML;\n                var curtagsname = \$('tag-name').innerHTML;\n                if(!curtags)\n                {\n                    \$('taglist').innerHTML = curtags + '<li style=\"cursor:pointer\" id=\"0\" onclick=\"removeTag(0);\">' + tagname + '</li>';\n                    \$('tag-value').innerHTML = curtagsvalue + '<input type=\"hidden\" id=\"0value\" name=\"tags[]\" value=\"' + tagid + '\"/>';\n                    \$('tag-name').innerHTML = curtagsname + '<input type=\"hidden\" id=\"0name\" name=\"tags_name[]\" value=\"' + tagname + '\"/>';\n                }\n                    \n                else\n                {\n                    var list = \$('taglist').getElementsByTagName('li');\n                    var i;\n                    for(i=0;i<list.length;i++)\n                    {\n                        if(list[i].innerHTML == tagname)\n                            return;\n                    }\n                    \$('taglist').innerHTML = curtags + '<li style=\"cursor:pointer\" id=\"' + i + '\" onclick=\"removeTag(' + i + ');\">' + tagname + '</li>';\n                    \$('tag-value').innerHTML = curtagsvalue + '<input id=\"' + i + 'value\" type=\"hidden\" name=\"tags[]\" value=\"' + tagid + '\"/>';\n                    \$('tag-name').innerHTML = curtagsname + '<input id=\"' + i + 'name\" type=\"hidden\" name=\"tags_name[]\" value=\"' + tagname + '\"/>';\n                }\n                \$('tag').setValue('');\n            }\n            \n            function removeTag(id)\n            {\n                //alert(\$(id));\n                var tag = document.getElementById(id);\n                var tagValue = document.getElementById(id + 'value');\n                var tagName = document.getElementById(id + 'name');\n                tag.parentNode.removeChild(tag);\n                tagValue.parentNode.removeChild(tagValue);\n                tagName.parentNode.removeChild(tagName);\n                //alert('abc');\n                \n            }\n\n            function updateTag()\n            {\n                var new_tag = \$('tag').value;\n                if(new_tag == '')\n                    alert('not value');\n                else\n                    addTag(new_tag,0);\n            }\n     \n        ";
     /*             window.addEvent('domready', function() {
     
                       new Autocompleter.Request.JSON('tag', '$urlTagList', {
                           'postVar': 'tag'
                       });
                   
                   });*/
     //$this->getChildHtml('js');
 }
开发者ID:xiaoguizhidao,项目名称:mydigibits,代码行数:25,代码来源:Edit.php


注:本文中的Mage_Adminhtml_Block_Widget_Form_Container::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。