From: Coleman Watts Date: Fri, 19 Jun 2015 03:12:19 +0000 (-0400) Subject: CRM-16401 - Allow admin to set which day is the first day of the week X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6d9ac92c5af39600f88e8a1b1569bf9dbc62f4ea;p=civicrm-core.git CRM-16401 - Allow admin to set which day is the first day of the week --- diff --git a/CRM/Admin/Form/Setting/Date.php b/CRM/Admin/Form/Setting/Date.php index 470cfbaa6a..b01810861a 100644 --- a/CRM/Admin/Form/Setting/Date.php +++ b/CRM/Admin/Form/Setting/Date.php @@ -39,6 +39,10 @@ */ class CRM_Admin_Form_Setting_Date extends CRM_Admin_Form_Setting { + public $_settings = array( + 'weekBegins' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, + ); + /** * Build the form object. * diff --git a/settings/Localization.setting.php b/settings/Localization.setting.php index fb502a7939..a8fc48d7b6 100644 --- a/settings/Localization.setting.php +++ b/settings/Localization.setting.php @@ -297,4 +297,20 @@ return array( 'description' => '', 'help_text' => NULL, ), + 'weekBegins' => array( + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'weekBegins', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'select', + 'option_values' => CRM_Utils_Date::getFullWeekdayNames(), + 'default' => '0', + 'add' => '4.7', + 'title' => 'Week begins on', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => "", + 'help_text' => NULL, + ), ); diff --git a/templates/CRM/Admin/Form/Setting/Date.tpl b/templates/CRM/Admin/Form/Setting/Date.tpl index 71b550c1bb..a30bc408d7 100644 --- a/templates/CRM/Admin/Form/Setting/Date.tpl +++ b/templates/CRM/Admin/Form/Setting/Date.tpl @@ -65,8 +65,12 @@ -
{ts}Fiscal Year{/ts} +
{ts}Calendar{/ts} + + + +
{$form.weekBegins.label}{$form.weekBegins.html}
{$form.fiscalYearStart.label} {$form.fiscalYearStart.html}