00001 <?php
00002
00017
00018
00019 import('form.Form');
00020
00021 class PayPalSettingsForm extends Form {
00023 var $schedConfId;
00024
00026 var $plugin;
00027
00029 var $errors;
00030
00035 function PayPalSettingsForm(&$plugin, $conferenceId, $schedConfId) {
00036 parent::Form($plugin->getTemplatePath() . 'settingsForm.tpl');
00037
00038 $this->addCheck(new FormValidatorPost($this));
00039
00040 $this->conferenceId = $conferenceId;
00041 $this->schedConfId = $schedConfId;
00042 $this->plugin =& $plugin;
00043
00044 }
00045
00046
00047
00051 function initData( ) {
00052 $schedConfId = $this->schedConfId;
00053 $conferenceId = $this->conferenceId;
00054 $plugin =& $this->plugin;
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 $this->_data = array(
00065 'enabled' => $plugin->getSetting($conferenceId, $schedConfId, 'enabled'),
00066 'paypalurl' => $plugin->getSetting($conferenceId, $schedConfId, 'paypalurl'),
00067 'selleraccount' => $plugin->getSetting($conferenceId, $schedConfId, 'selleraccount'),
00068 );
00069
00070 }
00071
00075 function readInputData() {
00076 $this->readUserVars(array('enabled',
00077 'paypalurl',
00078 'selleraccount'
00079 ));
00080 }
00081
00085 function save() {
00086 $plugin =& $this->plugin;
00087 $conferenceId = $this->conferenceId;
00088 $schedConfId = $this->schedConfId;
00089
00090 $paypalSettings = array();
00091 $plugin->updateSetting($conferenceId, $schedConfId, 'enabled', $this->getData('enabled'));
00092 $plugin->updateSetting($conferenceId, $schedConfId, 'paypalurl', $this->getData('paypalurl'));
00093 $plugin->updateSetting($conferenceId, $schedConfId, 'selleraccount',$this->getData('selleraccount'));
00094 }
00095 }
00096
00097 ?>