1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
26:
27:
28: 29: 30: 31: 32: 33: 34:
35: class Mage_Adminhtml_Block_System_Currency extends Mage_Adminhtml_Block_Template
36: {
37:
38: protected function _construct()
39: {
40: $this->setTemplate('system/currency/rates.phtml');
41: }
42:
43: protected function _prepareLayout()
44: {
45: $this->setChild('save_button',
46: $this->getLayout()->createBlock('adminhtml/widget_button')
47: ->setData(array(
48: 'label' => Mage::helper('adminhtml')->__('Save Currency Rates'),
49: 'onclick' => 'currencyForm.submit();',
50: 'class' => 'save'
51: )));
52:
53: $this->setChild('reset_button',
54: $this->getLayout()->createBlock('adminhtml/widget_button')
55: ->setData(array(
56: 'label' => Mage::helper('adminhtml')->__('Reset'),
57: 'onclick' => 'document.location.reload()',
58: 'class' => 'reset'
59: )));
60:
61: $this->setChild('import_button',
62: $this->getLayout()->createBlock('adminhtml/widget_button')
63: ->setData(array(
64: 'label' => Mage::helper('adminhtml')->__('Import'),
65: 'class' => 'add',
66: 'type' => 'submit',
67: )));
68:
69: $this->setChild('rates_matrix',
70: $this->getLayout()->createBlock('adminhtml/system_currency_rate_matrix')
71: );
72:
73: $this->setChild('import_services',
74: $this->getLayout()->createBlock('adminhtml/system_currency_rate_services')
75: );
76:
77: return parent::_prepareLayout();
78: }
79:
80: protected function ()
81: {
82: return Mage::helper('adminhtml')->__('Manage Currency Rates');
83: }
84:
85: protected function getSaveButtonHtml()
86: {
87: return $this->getChildHtml('save_button');
88: }
89:
90: protected function getResetButtonHtml()
91: {
92: return $this->getChildHtml('reset_button');
93: }
94:
95: protected function getImportButtonHtml()
96: {
97: return $this->getChildHtml('import_button');
98: }
99:
100: protected function getServicesHtml()
101: {
102: return $this->getChildHtml('import_services');
103: }
104:
105: protected function getRatesMatrixHtml()
106: {
107: return $this->getChildHtml('rates_matrix');
108: }
109:
110: protected function getImportFormAction()
111: {
112: return $this->getUrl('*/*/fetchRates');
113: }
114:
115: }
116: