00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class Mage_Adminhtml_Block_Extensions_File_Form extends Mage_Adminhtml_Block_Widget_Form
00035 {
00036 public function initForm()
00037 {
00038 $this->setTitle('Install Package File');
00039 $this->setTemplate('extensions/file/form.phtml');
00040
00041 return $this;
00042 }
00043
00044 public function getUploadInstallUrl()
00045 {
00046 return $this->getUrl('*/*/install', array('do'=>'run', 'file_type'=>'local'));
00047 }
00048
00049 public function getUploadButtonHtml()
00050 {
00051 $html = '';
00052
00053 $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')
00054 ->setClass('save')->setLabel($this->__('Upload and Install'))
00055 ->setOnClick("install('local')")
00056 ->toHtml();
00057
00058 return $html;
00059 }
00060
00061 public function getRemoteInstallUrl()
00062 {
00063 return $this->getUrl('*/*/install', array('do'=>'run', 'file_type'=>'remote'));
00064 }
00065
00066 public function getRemoteButtonHtml()
00067 {
00068 $html = '';
00069
00070 $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')
00071 ->setClass('save')->setLabel($this->__('Download and Install'))
00072 ->setOnClick("install('remote')")
00073 ->toHtml();
00074
00075 return $html;
00076 }
00077
00078 public function getBackButtonHtml()
00079 {
00080 $html = '';
00081
00082 $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')
00083 ->setClass('back')->setLabel($this->__('Back to local packages'))
00084 ->setOnClick("setLocation('" . $this->getUrl('*/extensions_local') . "')")
00085 ->toHtml();
00086
00087 return $html;
00088 }
00089 }