forked from dankocherga/MTool
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
487 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
/** | ||
* #{module_owner} extension for Magento | ||
* | ||
* Long description of this file (if any...) | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
#{license} | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade | ||
* the #{company_name} #{module_name} module to newer versions in the future. | ||
* If you wish to customize the #{company_name} #{module_name} module for your needs | ||
* please refer to http://www.magentocommerce.com for more information. | ||
* | ||
* @category #{company_name} | ||
* @package #{company_name}_#{module_name} | ||
* @copyright Copyright (C) #{year} #{copyright_company} | ||
* @license #{license_short} | ||
*/ | ||
|
||
/** | ||
* Short description of the class | ||
* | ||
* Long description of the class (if any...) | ||
* | ||
* @category #{company_name} | ||
* @package #{company_name}_#{module_name} | ||
* @subpackage Block | ||
* @author #{author} | ||
*/ | ||
class #{class_name} extends Mage_Adminhtml_Block_Widget_Form | ||
{ | ||
/** | ||
* Prepare the form | ||
* | ||
* @return Mage_Adminhtml_Block_Widget_Form|void | ||
*/ | ||
protected function _prepareForm() | ||
{ | ||
//add form | ||
$form = new Varien_Data_Form(array( | ||
'id' => 'edit_form', | ||
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id', null))), | ||
'method' => 'post' | ||
)); | ||
$form->setUseContainer(true); | ||
$this->setForm($form); | ||
//add fieldset | ||
$fieldSet = $form->addFieldset( | ||
'main_field_set', | ||
array('legend' => $this->__('Main Content')) | ||
); | ||
$data = Mage::registry('current_#{model_ns}_#{model_path}'); | ||
if ($data) { | ||
$form->setValues($data->getData()); | ||
} | ||
|
||
parent::_prepareForm(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
/** | ||
* #{module_owner} extension for Magento | ||
* | ||
* Long description of this file (if any...) | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
#{license} | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade | ||
* the #{company_name} #{module_name} module to newer versions in the future. | ||
* If you wish to customize the #{company_name} #{module_name} module for your needs | ||
* please refer to http://www.magentocommerce.com for more information. | ||
* | ||
* @category #{company_name} | ||
* @package #{company_name}_#{module_name} | ||
* @copyright Copyright (C) #{year} #{copyright_company} | ||
* @license #{license_short} | ||
*/ | ||
|
||
/** | ||
* Short description of the class | ||
* | ||
* Long description of the class (if any...) | ||
* | ||
* @category #{company_name} | ||
* @package #{company_name}_#{module_name} | ||
* @subpackage Block | ||
* @author #{author} | ||
*/ | ||
class #{class_name} extends Mage_Adminhtml_Block_Widget_Form_Container | ||
{ | ||
/** | ||
* Init grid container | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
$this->_objectId = 'id'; | ||
$this->_controller = '#{block_path}'; | ||
$this->_blockGroup = '#{block_ns}'; | ||
} | ||
|
||
/** | ||
* Get container header text | ||
* | ||
* @return string | ||
*/ | ||
public function getHeaderText() | ||
{ | ||
$data = Mage::registry('current_#{model_ns}_#{model_path}'); | ||
if ($data) { | ||
return $this->__('Edit Item #%d', $this->escapeHtml($data->getId())); | ||
} else { | ||
return $this->__('New Item'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.