'weekBegins' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'dateInputFormat' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'timeInputFormat' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
+ 'fiscalYearStart' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
);
/**
$this->addElement('text', 'dateformatYear', ts('Year Only'));
$this->addElement('text', 'dateformatTime', ts('Time Only'));
- $this->add('date', 'fiscalYearStart', ts('Fiscal Year Start'),
- CRM_Core_SelectValues::date(NULL, 'M d')
- );
-
parent::buildQuickForm();
}
return $element;
}
+ /**
+ * Add an element for inputting a month+day (partial date).
+ *
+ * @param string $name
+ * @param string $label
+ * @return HTML_QuickForm_Element
+ */
+ public function addMonthDay($name, $label) {
+ return $this->add('date', $name, $label,
+ CRM_Core_SelectValues::date(NULL, 'M d')
+ );
+ }
+
/**
* called before buildForm. Any pre-processing that
* needs to be done for buildForm should be done here
'title' => 'Import / Export Field Separator',
'description' => 'Global CSV separator character. Modify this setting to enable import and export of different kinds of CSV files (for example: \',\' \';\' \':\' \'|\' ).',
),
+ 'fiscalYearStart' => array(
+ 'add' => '4.7',
+ 'prefetch' => 1,
+ 'help_text' => NULL,
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'group_name' => 'Localization Preferences',
+ 'group' => 'localization',
+ 'name' => 'fiscalYearStart',
+ 'type' => 'Array',
+ 'quick_form_type' => 'MonthDay',
+ 'html_type' => 'MonthDay',
+ 'default' => ',',
+ 'title' => 'Fiscal Year Start',
+ 'description' => '',
+ ),
'lcMessages' => array(
'group_name' => 'Localization Preferences',
'group' => 'localization',