Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
fee14197 | 4 | | CiviCRM version 5 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
8c9251b3 | 6 | | Copyright CiviCRM LLC (c) 2004-2018 | |
6a488035 TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
11 | | under the terms of the GNU Affero General Public License | | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
13 | | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
17 | | See the GNU Affero General Public License for more details. | | |
18 | | | | |
19 | | You should have received a copy of the GNU Affero General Public | | |
20 | | License and the CiviCRM Licensing Exception along | | |
21 | | with this program; if not, contact CiviCRM LLC | | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
25 | +--------------------------------------------------------------------+ | |
d25dd0ee | 26 | */ |
6a488035 TO |
27 | |
28 | /** | |
29 | * | |
30 | * @package CRM | |
8c9251b3 | 31 | * @copyright CiviCRM LLC (c) 2004-2018 |
6a488035 TO |
32 | * $Id: Display.php 36505 2011-10-03 14:19:56Z lobo $ |
33 | * | |
34 | */ | |
35 | ||
36 | /** | |
37 | * This class generates form components for the display preferences | |
38 | * | |
39 | */ | |
40 | class CRM_Admin_Form_Preferences_Event extends CRM_Admin_Form_Preferences { | |
00be9182 | 41 | public function preProcess() { |
6a488035 TO |
42 | CRM_Utils_System::setTitle(ts('CiviEvent Component Settings')); |
43 | // pass "wiki" as 6th param to docURL2 if you are linking to a page in wiki.civicrm.org | |
44 | $docLink = CRM_Utils_System::docURL2("CiviEvent Cart Checkout", NULL, NULL, NULL, NULL, "wiki"); | |
b8ce3328 | 45 | // build an array containing all selectable option values for show_events |
46 | $optionValues = array(); | |
02fc859b | 47 | for ($i = 10; $i <= 100; $i += 10) { |
b8ce3328 | 48 | $optionValues[$i] = $i; |
49 | } | |
6a488035 | 50 | $this->_varNames = array( |
9d72cede | 51 | CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME => array( |
6a488035 TO |
52 | 'enable_cart' => array( |
53 | 'html_type' => 'checkbox', | |
54 | 'title' => ts('Use Shopping Cart Style Event Registration'), | |
55 | 'weight' => 1, | |
56 | 'description' => ts('This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a "cart" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it. %1', | |
353ffa53 | 57 | array(1 => $docLink)), |
6a488035 | 58 | ), |
b8ce3328 | 59 | 'show_events' => array( |
60 | 'html_type' => 'select', | |
61 | 'title' => ts('Dashboard entries'), | |
62 | 'weight' => 2, | |
63 | 'description' => ts('Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.'), | |
21dfd5f5 TO |
64 | 'option_values' => array('' => ts('- select -')) + $optionValues + array(-1 => ts('show all')), |
65 | ), | |
6a488035 TO |
66 | ), |
67 | ); | |
68 | ||
69 | parent::preProcess(); | |
70 | } | |
96025800 | 71 | |
6a488035 | 72 | } |