CRM_Admin_Form_Preferences - Fix loading of settings
[civicrm-core.git] / CRM / Admin / Form / PreferencesDate.php
index f3f56eb0ee905deb602bcec449f7fa5a63c68cdb..97d6455b862ab50e9707631cc5d1597c246455e7 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
  */
 
 /**
- * This class generates form components for Location Type
- *
+ * This class generates form components for Location Type.
  */
 class CRM_Admin_Form_PreferencesDate extends CRM_Admin_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
 
@@ -109,9 +104,6 @@ class CRM_Admin_Form_PreferencesDate extends CRM_Admin_Form {
 
   /**
    * Process the form submission.
-   *
-   *
-   * @return void
    */
   public function postProcess() {
     if (!($this->_action & CRM_Core_Action::UPDATE)) {
@@ -133,6 +125,9 @@ class CRM_Admin_Form_PreferencesDate extends CRM_Admin_Form {
 
     $dao->save();
 
+    // Update dynamic js to reflect new date settings
+    CRM_Core_Resources::singleton()->resetCacheCode();
+
     CRM_Core_Session::setStatus(ts("The date type '%1' has been saved.",
       array(1 => $params['name'])
     ), ts('Saved'), 'success');