| 1 | <?php |
|---|
| 2 | class Config_ClickandPledge extends Wpjb_Form_Abstract_Payment |
|---|
| 3 | { |
|---|
| 4 | public function init() |
|---|
| 5 | { |
|---|
| 6 | parent::init(); |
|---|
| 7 | |
|---|
| 8 | parent::init(); |
|---|
| 9 | |
|---|
| 10 | wp_register_script( 'clickandpledge-admin-script', plugins_url( '/clickandpledge-admin.js', __FILE__ ) ); |
|---|
| 11 | wp_enqueue_script( 'clickandpledge-admin-script' ); |
|---|
| 12 | $this->addGroup("clickandpledge", __("Click & Pledge", "wpjobboard")); |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | //USD Account |
|---|
| 16 | $this->_env = array( |
|---|
| 17 | 'USD' => __("", "wpjobboard"), |
|---|
| 18 | ); |
|---|
| 19 | $e = $this->create("wpjobboard_clickandpledge_usdaccount", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 20 | $e->setValue($this->conf("wpjobboard_clickandpledge_usdaccount")); |
|---|
| 21 | $e->setLabel(__("USD Account", "wpjobboard")); |
|---|
| 22 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 23 | foreach($this->_env as $k => $v) { |
|---|
| 24 | $e->addOption($k, $k, $v); |
|---|
| 25 | } |
|---|
| 26 | $this->addElement($e, "clickandpledge"); |
|---|
| 27 | |
|---|
| 28 | $e = $this->create("wpjobboard_clickandpledge_USD_AccountID"); |
|---|
| 29 | $e->setValue($this->conf("wpjobboard_clickandpledge_USD_AccountID")); |
|---|
| 30 | $e->setLabel(__(" C&P Account ID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 31 | $e->setHint(__('Get your "Account ID" from Click & Pledge. [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 32 | $this->addElement($e, "clickandpledge"); |
|---|
| 33 | |
|---|
| 34 | $e = $this->create("wpjobboard_clickandpledge_USD_AccountGuid"); |
|---|
| 35 | $e->setValue($this->conf("wpjobboard_clickandpledge_USD_AccountGuid")); |
|---|
| 36 | $e->setLabel(__(" C&P API Account GUID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 37 | $e->setHint(__('Get your "API Account GUID" from Click & Pledge [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 38 | $this->addElement($e, "clickandpledge"); |
|---|
| 39 | |
|---|
| 40 | $this->_env = array( |
|---|
| 41 | 'test' => __("Test Mode", "wpjobboard"), |
|---|
| 42 | 'live' => __("Live Mode", "wpjobboard") |
|---|
| 43 | ); |
|---|
| 44 | $e = $this->create("wpjobboard_clickandpledge_USD_OrderMode", Daq_Form_Element::TYPE_SELECT); |
|---|
| 45 | $e->setValue($this->conf("wpjobboard_clickandpledge_USD_OrderMode")); |
|---|
| 46 | $e->setLabel(__(" API Mode", "wpjobboard")); |
|---|
| 47 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 48 | foreach($this->_env as $k => $v) { |
|---|
| 49 | $e->addOption($k, $k, $v); |
|---|
| 50 | } |
|---|
| 51 | $this->addElement($e, "clickandpledge"); |
|---|
| 52 | //USD END |
|---|
| 53 | |
|---|
| 54 | //EUR Account |
|---|
| 55 | $this->_env = array( |
|---|
| 56 | 'EUR' => __("", "wpjobboard"), |
|---|
| 57 | ); |
|---|
| 58 | $e = $this->create("wpjobboard_clickandpledge_euraccount", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 59 | $e->setValue($this->conf("wpjobboard_clickandpledge_euraccount")); |
|---|
| 60 | $e->setLabel(__("EUR Account", "wpjobboard")); |
|---|
| 61 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 62 | foreach($this->_env as $k => $v) { |
|---|
| 63 | $e->addOption($k, $k, $v); |
|---|
| 64 | } |
|---|
| 65 | $this->addElement($e, "clickandpledge"); |
|---|
| 66 | |
|---|
| 67 | $e = $this->create("wpjobboard_clickandpledge_EUR_AccountID"); |
|---|
| 68 | $e->setValue($this->conf("wpjobboard_clickandpledge_EUR_AccountID")); |
|---|
| 69 | $e->setLabel(__(" C&P Account ID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 70 | $e->setHint(__('Get your "Account ID" from Click & Pledge. [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 71 | $this->addElement($e, "clickandpledge"); |
|---|
| 72 | |
|---|
| 73 | $e = $this->create("wpjobboard_clickandpledge_EUR_AccountGuid"); |
|---|
| 74 | $e->setValue($this->conf("wpjobboard_clickandpledge_EUR_AccountGuid")); |
|---|
| 75 | $e->setLabel(__(" C&P API Account GUID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 76 | $e->setHint(__('Get your "API Account GUID" from Click & Pledge [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 77 | $this->addElement($e, "clickandpledge"); |
|---|
| 78 | |
|---|
| 79 | $this->_env = array( |
|---|
| 80 | 'test' => __("Test Mode", "wpjobboard"), |
|---|
| 81 | 'live' => __("Live Mode", "wpjobboard") |
|---|
| 82 | ); |
|---|
| 83 | $e = $this->create("wpjobboard_clickandpledge_EUR_OrderMode", Daq_Form_Element::TYPE_SELECT); |
|---|
| 84 | $e->setValue($this->conf("wpjobboard_clickandpledge_EUR_OrderMode")); |
|---|
| 85 | $e->setLabel(__(" API Mode", "wpjobboard")); |
|---|
| 86 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 87 | foreach($this->_env as $k => $v) { |
|---|
| 88 | $e->addOption($k, $k, $v); |
|---|
| 89 | } |
|---|
| 90 | $this->addElement($e, "clickandpledge"); |
|---|
| 91 | //EUR END |
|---|
| 92 | |
|---|
| 93 | //CAD Account |
|---|
| 94 | $this->_env = array( |
|---|
| 95 | 'CAD' => __("", "wpjobboard"), |
|---|
| 96 | ); |
|---|
| 97 | $e = $this->create("wpjobboard_clickandpledge_cadaccount", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 98 | $e->setValue($this->conf("wpjobboard_clickandpledge_cadaccount")); |
|---|
| 99 | $e->setLabel(__("CAD Account", "wpjobboard")); |
|---|
| 100 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 101 | foreach($this->_env as $k => $v) { |
|---|
| 102 | $e->addOption($k, $k, $v); |
|---|
| 103 | } |
|---|
| 104 | $this->addElement($e, "clickandpledge"); |
|---|
| 105 | |
|---|
| 106 | $e = $this->create("wpjobboard_clickandpledge_CAD_AccountID"); |
|---|
| 107 | $e->setValue($this->conf("wpjobboard_clickandpledge_CAD_AccountID")); |
|---|
| 108 | $e->setLabel(__(" C&P Account ID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 109 | $e->setHint(__('Get your "Account ID" from Click & Pledge. [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 110 | $this->addElement($e, "clickandpledge"); |
|---|
| 111 | |
|---|
| 112 | $e = $this->create("wpjobboard_clickandpledge_CAD_AccountGuid"); |
|---|
| 113 | $e->setValue($this->conf("wpjobboard_clickandpledge_CAD_AccountGuid")); |
|---|
| 114 | $e->setLabel(__(" C&P API Account GUID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 115 | $e->setHint(__('Get your "API Account GUID" from Click & Pledge [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 116 | $this->addElement($e, "clickandpledge"); |
|---|
| 117 | |
|---|
| 118 | $this->_env = array( |
|---|
| 119 | 'test' => __("Test Mode", "wpjobboard"), |
|---|
| 120 | 'live' => __("Live Mode", "wpjobboard") |
|---|
| 121 | ); |
|---|
| 122 | $e = $this->create("wpjobboard_clickandpledge_CAD_OrderMode", Daq_Form_Element::TYPE_SELECT); |
|---|
| 123 | $e->setValue($this->conf("wpjobboard_clickandpledge_CAD_OrderMode")); |
|---|
| 124 | $e->setLabel(__(" API Mode", "wpjobboard")); |
|---|
| 125 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 126 | foreach($this->_env as $k => $v) { |
|---|
| 127 | $e->addOption($k, $k, $v); |
|---|
| 128 | } |
|---|
| 129 | $this->addElement($e, "clickandpledge"); |
|---|
| 130 | //CAD END |
|---|
| 131 | |
|---|
| 132 | //GBP Account |
|---|
| 133 | $this->_env = array( |
|---|
| 134 | 'GBP' => __("", "wpjobboard"), |
|---|
| 135 | ); |
|---|
| 136 | $e = $this->create("wpjobboard_clickandpledge_gbpaccount", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 137 | $e->setValue($this->conf("wpjobboard_clickandpledge_gbpaccount")); |
|---|
| 138 | $e->setLabel(__("GBP Account", "wpjobboard")); |
|---|
| 139 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 140 | foreach($this->_env as $k => $v) { |
|---|
| 141 | $e->addOption($k, $k, $v); |
|---|
| 142 | } |
|---|
| 143 | $this->addElement($e, "clickandpledge"); |
|---|
| 144 | |
|---|
| 145 | $e = $this->create("wpjobboard_clickandpledge_GBP_AccountID"); |
|---|
| 146 | $e->setValue($this->conf("wpjobboard_clickandpledge_GBP_AccountID")); |
|---|
| 147 | $e->setLabel(__(" C&P Account ID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 148 | $e->setHint(__('Get your "Account ID" from Click & Pledge. [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 149 | $this->addElement($e, "clickandpledge"); |
|---|
| 150 | |
|---|
| 151 | $e = $this->create("wpjobboard_clickandpledge_GBP_AccountGuid"); |
|---|
| 152 | $e->setValue($this->conf("wpjobboard_clickandpledge_GBP_AccountGuid")); |
|---|
| 153 | $e->setLabel(__(" C&P API Account GUID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 154 | $e->setHint(__('Get your "API Account GUID" from Click & Pledge [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 155 | $this->addElement($e, "clickandpledge"); |
|---|
| 156 | |
|---|
| 157 | $this->_env = array( |
|---|
| 158 | 'test' => __("Test Mode", "wpjobboard"), |
|---|
| 159 | 'live' => __("Live Mode", "wpjobboard") |
|---|
| 160 | ); |
|---|
| 161 | $e = $this->create("wpjobboard_clickandpledge_GBP_OrderMode", Daq_Form_Element::TYPE_SELECT); |
|---|
| 162 | $e->setValue($this->conf("wpjobboard_clickandpledge_GBP_OrderMode")); |
|---|
| 163 | $e->setLabel(__(" API Mode", "wpjobboard")); |
|---|
| 164 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 165 | foreach($this->_env as $k => $v) { |
|---|
| 166 | $e->addOption($k, $k, $v); |
|---|
| 167 | } |
|---|
| 168 | $this->addElement($e, "clickandpledge"); |
|---|
| 169 | //GBP END |
|---|
| 170 | |
|---|
| 171 | //HKD Account |
|---|
| 172 | $this->_env = array( |
|---|
| 173 | 'HKD' => __("", "wpjobboard"), |
|---|
| 174 | ); |
|---|
| 175 | $e = $this->create("wpjobboard_clickandpledge_hkdaccount", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 176 | $e->setValue($this->conf("wpjobboard_clickandpledge_hkdaccount")); |
|---|
| 177 | $e->setLabel(__("HKD Account", "wpjobboard")); |
|---|
| 178 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 179 | foreach($this->_env as $k => $v) { |
|---|
| 180 | $e->addOption($k, $k, $v); |
|---|
| 181 | } |
|---|
| 182 | $this->addElement($e, "clickandpledge"); |
|---|
| 183 | |
|---|
| 184 | $e = $this->create("wpjobboard_clickandpledge_HKD_AccountID"); |
|---|
| 185 | $e->setValue($this->conf("wpjobboard_clickandpledge_HKD_AccountID")); |
|---|
| 186 | $e->setLabel(__(" C&P Account ID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 187 | $e->setHint(__('Get your "Account ID" from Click & Pledge. [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 188 | $this->addElement($e, "clickandpledge"); |
|---|
| 189 | |
|---|
| 190 | $e = $this->create("wpjobboard_clickandpledge_HKD_AccountGuid"); |
|---|
| 191 | $e->setValue($this->conf("wpjobboard_clickandpledge_HKD_AccountGuid")); |
|---|
| 192 | $e->setLabel(__(" C&P API Account GUID<span style='color: #ff0000;'>*</span>", "wpjobboard")); |
|---|
| 193 | $e->setHint(__('Get your "API Account GUID" from Click & Pledge [Portal > Account Info > API Information].', "wpjobboard")); |
|---|
| 194 | $this->addElement($e, "clickandpledge"); |
|---|
| 195 | |
|---|
| 196 | $this->_env = array( |
|---|
| 197 | 'test' => __("Test Mode", "wpjobboard"), |
|---|
| 198 | 'live' => __("Live Mode", "wpjobboard") |
|---|
| 199 | ); |
|---|
| 200 | $e = $this->create("wpjobboard_clickandpledge_HKD_OrderMode", Daq_Form_Element::TYPE_SELECT); |
|---|
| 201 | $e->setValue($this->conf("wpjobboard_clickandpledge_HKD_OrderMode")); |
|---|
| 202 | $e->setLabel(__(" API Mode", "wpjobboard")); |
|---|
| 203 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 204 | foreach($this->_env as $k => $v) { |
|---|
| 205 | $e->addOption($k, $k, $v); |
|---|
| 206 | } |
|---|
| 207 | $this->addElement($e, "clickandpledge"); |
|---|
| 208 | //HKD END |
|---|
| 209 | |
|---|
| 210 | $this->_env = array( |
|---|
| 211 | 'CreditCard' => __("Credit Card", "wpjobboard"), |
|---|
| 212 | 'eCheck' => __("eCheck", "wpjobboard"), |
|---|
| 213 | 'Invoice' => __("Invoice", "wpjobboard"), |
|---|
| 214 | 'PurchaseOrder' => __("Purchase Order", "wpjobboard"), |
|---|
| 215 | ); |
|---|
| 216 | $e = $this->create("wpjobboard_clickandpledge_Paymentmethods", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 217 | $e->setValue($this->conf("wpjobboard_clickandpledge_Paymentmethods")); |
|---|
| 218 | $e->setLabel(__("Payment Methods", "wpjobboard")); |
|---|
| 219 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 220 | foreach($this->_env as $k => $v) { |
|---|
| 221 | $e->addOption($k, $k, $v); |
|---|
| 222 | } |
|---|
| 223 | $this->addElement($e, "clickandpledge"); |
|---|
| 224 | |
|---|
| 225 | $this->_env = array( |
|---|
| 226 | 'CreditCard' => __("Credit Card", "wpjobboard"), |
|---|
| 227 | 'eCheck' => __("eCheck", "wpjobboard"), |
|---|
| 228 | 'Invoice' => __("Invoice", "wpjobboard"), |
|---|
| 229 | 'PurchaseOrder' => __("Purchase Order", "wpjobboard"), |
|---|
| 230 | ); |
|---|
| 231 | $e = $this->create("wpjobboard_clickandpledge_DefaultpaymentMethod", Daq_Form_Element::TYPE_SELECT); |
|---|
| 232 | $e->setValue($this->conf("wpjobboard_clickandpledge_DefaultpaymentMethod")); |
|---|
| 233 | $e->setLabel(__("Default Payment Method", "wpjobboard")); |
|---|
| 234 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 235 | foreach($this->_env as $k => $v) { |
|---|
| 236 | $e->addOption($k, $k, $v); |
|---|
| 237 | } |
|---|
| 238 | $this->addElement($e, "clickandpledge"); |
|---|
| 239 | |
|---|
| 240 | |
|---|
| 241 | //Receipt Settings |
|---|
| 242 | $this->addGroup("clickandpledge_receiptsettings", __("Receipt Settings", "wpjobboard")); |
|---|
| 243 | $this->_env = array( |
|---|
| 244 | 'yes' => __("", "wpjobboard"), |
|---|
| 245 | ); |
|---|
| 246 | $e = $this->create("wpjobboard_clickandpledge_emailcustomer", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 247 | $e->setValue($this->conf("wpjobboard_clickandpledge_emailcustomer")); |
|---|
| 248 | $e->setLabel(__("Send Receipt to Patron", "wpjobboard")); |
|---|
| 249 | $e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 250 | foreach($this->_env as $k => $v) { |
|---|
| 251 | $e->addOption($k, $k, $v); |
|---|
| 252 | } |
|---|
| 253 | $this->addElement($e, "clickandpledge_receiptsettings"); |
|---|
| 254 | |
|---|
| 255 | $e = $this->create("wpjobboard_clickandpledge_OrganizationInformation", Daq_Form_Element::TYPE_TEXTAREA); |
|---|
| 256 | $e->setValue($this->conf("wpjobboard_clickandpledge_OrganizationInformation")); |
|---|
| 257 | $e->setLabel(__("Receipt Header", "wpjobboard")); |
|---|
| 258 | $e->setHint(__('Maximum: 1500 characters, the following HTML tags are allowed: |
|---|
| 259 | <P></P><BR /><OL></OL><LI></LI><UL></UL>. You have <span id="OrganizationInformation_countdown">1500</span> characters left.', "wpjobboard")); |
|---|
| 260 | $this->addElement($e, "clickandpledge_receiptsettings"); |
|---|
| 261 | |
|---|
| 262 | $e = $this->create("wpjobboard_clickandpledge_TermsCondition", Daq_Form_Element::TYPE_TEXTAREA); |
|---|
| 263 | $e->setValue($this->conf("wpjobboard_clickandpledge_TermsCondition")); |
|---|
| 264 | $e->setLabel(__("Terms & Conditions", "wpjobboard")); |
|---|
| 265 | $e->setHint(__('To be added at the bottom of the receipt. Typically the text provides proof that the patron has read & agreed to the terms & conditions. The following HTML tags are allowed:<P></P><BR /><OL></OL><LI></LI><UL></UL>. <br>Maximum: 1500 characters, You have <span id="TermsCondition_countdown">1500</span> characters left.', "wpjobboard")); |
|---|
| 266 | $this->addElement($e, "clickandpledge_receiptsettings"); |
|---|
| 267 | |
|---|
| 268 | |
|---|
| 269 | //Recurring Settings |
|---|
| 270 | $this->addGroup("clickandpledge_recurringsettings", __("Recurring Settings", "wpjobboard")); |
|---|
| 271 | $e = $this->create("wpjobboard_clickandpledge_isRecurring", Daq_Form_Element::TYPE_SELECT); |
|---|
| 272 | $e->addOption("0", "0", __("Disable", "wpjobboard")); |
|---|
| 273 | $e->addOption(1, 1, __("Enable", "wpjobboard")); |
|---|
| 274 | $e->setValue($this->conf("wpjobboard_clickandpledge_isRecurring")); |
|---|
| 275 | $e->setLabel(__("Recurring Transaction", "wpjobboard")); |
|---|
| 276 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 277 | |
|---|
| 278 | $e = $this->create("wpjobboard_clickandpledge_RecurringLabel"); |
|---|
| 279 | $e->setValue($this->conf("wpjobboard_clickandpledge_RecurringLabel")); |
|---|
| 280 | $e->setLabel(__("Label", "wpjobboard")); |
|---|
| 281 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 282 | |
|---|
| 283 | $this->_env = array( |
|---|
| 284 | 'Week' => __("Week", "wpjobboard"), |
|---|
| 285 | '2 Weeks' => __("2 Weeks", "wpjobboard"), |
|---|
| 286 | 'Month' => __("Month", "wpjobboard"), |
|---|
| 287 | '2 Months' => __("2 Months", "wpjobboard"), |
|---|
| 288 | 'Quarter' => __("Quarter", "wpjobboard"), |
|---|
| 289 | '6 Months' => __("6 Months", "wpjobboard"), |
|---|
| 290 | 'Year' => __("Year", "wpjobboard"), |
|---|
| 291 | ); |
|---|
| 292 | $e = $this->create("wpjobboard_clickandpledge_Periodicity", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 293 | $e->setValue($this->conf("wpjobboard_clickandpledge_Periodicity")); |
|---|
| 294 | $e->setLabel(__("Periods", "wpjobboard")); |
|---|
| 295 | $e->setHint(__('Supported recurring periods. If nothing selected all periods will display in front end.', "wpjobboard")); |
|---|
| 296 | //$e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 297 | foreach($this->_env as $k => $v) { |
|---|
| 298 | $e->addOption($k, $k, $v); |
|---|
| 299 | } |
|---|
| 300 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 301 | |
|---|
| 302 | $this->_env = array( |
|---|
| 303 | 'Subscription' => __("Subscription (example: Pay $10 every month for 20 times)", "wpjobboard"), |
|---|
| 304 | ); |
|---|
| 305 | $e = $this->create("wpjobboard_clickandpledge_RecurringMethod_Subscription", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 306 | $e->setValue($this->conf("wpjobboard_clickandpledge_RecurringMethod_Subscription")); |
|---|
| 307 | $e->setLabel(__("Recurring Method", "wpjobboard")); |
|---|
| 308 | //$e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 309 | foreach($this->_env as $k => $v) { |
|---|
| 310 | $e->addOption($k, $k, $v); |
|---|
| 311 | } |
|---|
| 312 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 313 | |
|---|
| 314 | $e = $this->create("wpjobboard_clickandpledge_maxrecurrings_Subscription"); |
|---|
| 315 | $e->setValue($this->conf("wpjobboard_clickandpledge_maxrecurrings_Subscription")); |
|---|
| 316 | $e->setLabel(__("Subscription Max. Recurrings Allowed", "wpjobboard")); |
|---|
| 317 | $e->setHint(__('Maximum number of payments allowed , range is 2-999.', "wpjobboard")); |
|---|
| 318 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 319 | |
|---|
| 320 | $this->_env = array( |
|---|
| 321 | 'Installment' => __("Installment (example: Split $1000 into 10 payments of $100 each)", "wpjobboard"), |
|---|
| 322 | ); |
|---|
| 323 | $e = $this->create("wpjobboard_clickandpledge_RecurringMethod_Installment", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 324 | $e->setValue($this->conf("wpjobboard_clickandpledge_RecurringMethod_Installment")); |
|---|
| 325 | $e->setLabel(__("", "wpjobboard")); |
|---|
| 326 | //$e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 327 | foreach($this->_env as $k => $v) { |
|---|
| 328 | $e->addOption($k, $k, $v); |
|---|
| 329 | } |
|---|
| 330 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 331 | |
|---|
| 332 | $e = $this->create("wpjobboard_clickandpledge_maxrecurrings_Installment"); |
|---|
| 333 | $e->setValue($this->conf("wpjobboard_clickandpledge_maxrecurrings_Installment")); |
|---|
| 334 | $e->setLabel(__("Installment Max. Recurrings Allowed", "wpjobboard")); |
|---|
| 335 | $e->setHint(__('Maximum number of payments allowed , range is 2-998.', "wpjobboard")); |
|---|
| 336 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 337 | |
|---|
| 338 | $this->_env = array( |
|---|
| 339 | 'on' => __("", "wpjobboard"), |
|---|
| 340 | ); |
|---|
| 341 | $e = $this->create("wpjobboard_clickandpledge_indefinite", Daq_Form_Element::TYPE_CHECKBOX); |
|---|
| 342 | $e->setValue($this->conf("wpjobboard_clickandpledge_indefinite")); |
|---|
| 343 | $e->setLabel(__("Enable Indefinite Recurring", "wpjobboard")); |
|---|
| 344 | //$e->addValidator(new Daq_Validate_InArray(array_keys($this->_env))); |
|---|
| 345 | foreach($this->_env as $k => $v) { |
|---|
| 346 | $e->addOption($k, $k, $v); |
|---|
| 347 | } |
|---|
| 348 | $this->addElement($e, "clickandpledge_recurringsettings"); |
|---|
| 349 | |
|---|
| 350 | } |
|---|
| 351 | } |
|---|
| 352 | |
|---|
| 353 | ?> |
|---|