| This file is a part of CiviCRM.                                    |
|                                                                    |
| CiviCRM is free software; you can copy, modify, and distribute it  |
| under the terms of the GNU Affero General Public License           |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
|                                                                    |
| CiviCRM is distributed in the hope that it will be useful, but     |
| WITHOUT ANY WARRANTY; without even the implied warranty of         |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
| See the GNU Affero General Public License for more details.        |
|                                                                    |
| You should have received a copy of the GNU Affero General Public   |
| License and the CiviCRM Licensing Exception along                  |
| with this program; if not, contact CiviCRM LLC                     |
| at info[AT]civicrm[DOT]org. If you have questions about the        |
| GNU Affero General Public License or the licensing of CiviCRM,     |
| see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+--------------------------------------------------------------------+
*/
/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2015
 * $Id$
 *
 */
/*
 * Settings metadata file
 */
return array('monetaryThousandSeparator' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'monetaryThousandSeparator', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'html_attributes' => array('size' => 2), 'default' => ',', 'add' => '4.3', 'title' => 'Thousands Separator', 'is_domain' => 1, 'is_contact' => 0, 'description' => NULL, 'help_text' => NULL), 'monetaryDecimalPoint' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'monetaryDecimalPoint', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'html_attributes' => array('size' => 2), 'default' => '.', 'add' => '4.3', 'title' => 'Decimal Delimiter', 'is_domain' => 1, 'is_contact' => 0, 'description' => NULL, 'help_text' => NULL), 'moneyformat' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'moneyformat', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'default' => '%c %a', 'add' => '4.3', 'title' => 'Monetary Amount Display', 'is_domain' => 1, 'is_contact' => 0, 'description' => NULL, 'help_text' => NULL), 'moneyvalueformat' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'moneyvalueformat', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'default' => '%!i', 'add' => '4.3', 'title' => 'Monetary Amount Display', 'is_domain' => 1, 'is_contact' => 0, 'description' => NULL, 'help_text' => NULL), 'defaultCurrency' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'defaultCurrency', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'html_attributes' => array('size' => 2), 'default' => 'USD', 'add' => '4.3', 'title' => 'Default Currency', 'is_domain' => 1, 'is_contact' => 0, 'description' => 'Default currency assigned to contributions and other monetary transactions.', 'help_text' => NULL), 'defaultContactCountry' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'defaultContactCountry', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'html_attributes' => array('size' => 4), 'default' => '1228', 'add' => '4.4', 'title' => 'Default Country', 'is_domain' => 1, 'is_contact' => 0, 'description' => 'This value is selected by default when adding a new contact address.', 'help_text' => NULL), 'countryLimit' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'countryLimit', 'prefetch' => 1, 'config_only' => 1, 'type' => 'Array', 'quick_form_type' => 'Element', 'html_type' => 'advmultiselect', 'html_attributes' => array('size' => 5, 'style' => 'width:150px', 'class' => 'advmultiselect'), 'default' => 'null', 'add' => '4.3', 'title' => 'Available Countries', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => NULL), 'provinceLimit' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'provinceLimit', 'prefetch' => 1, 'config_only' => 1, 'type' => 'Array', 'quick_form_type' => 'Element', 'html_type' => 'advmultiselect', 'html_attributes' => array('size' => 5, 'style' => 'width:150px', 'class' => 'advmultiselect'), 'default' => 'null', 'add' => '4.3', 'title' => 'Available States and Provinces', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => NULL), 'inheritLocale' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'inheritLocale', 'prefetch' => 1, 'config_only' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => '0', 'add' => '4.3', 'title' => 'Inherit CMS Language', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => NULL), 'dateformatDatetime' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatDatetime', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'default' => '%B %E%f, %Y %l:%M %P', 'add' => '4.3', 'title' => 'Complete Date and Time', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => NULL), 'dateformatFull' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatFull', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'default' => '%B %E%f, %Y', 'add' => '4.3', 'title' => 'Complete Date', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => NULL), 'dateformatPartial' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatPartial', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'default' => '%B %Y', 'add' => '4.3', 'title' => 'Month and Year', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => NULL), 'lcMessages' => array('group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'lcMessages', 'prefetch' => 1, 'config_only' => 1, 'type' => 'String', 'default' => 'en_US', 'add' => '4.3', 'title' => 'Default Language', 'is_domain' => 1, 'is_contact' => 0, '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));
<?php

require_once '../../civicrm.config.php';
require_once 'CRM/Core/Config.php';
require_once 'CRM/Core/I18n.php';
require_once 'CRM/Utils/Date.php';
// assign the weekday and month names
$DN = CRM_Utils_Date::getFullWeekdayNames();
$SDN = CRM_Utils_Date::getAbbrWeekdayNames();
$MN = CRM_Utils_Date::getFullMonthNames();
$SMN = CRM_Utils_Date::getAbbrMonthNames();
// assign the strings hash
$TT['INFO'] = ts('About the calendar');
$TT['ABOUT'] = "DHTML Date/Time Selector\n(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" . ts('For latest version visit: %1', array(1 => 'http://www.dynarch.com/projects/calendar/')) . "\n" . ts('Distributed under GNU LGPL. See %1 for details.', array(1 => 'http://gnu.org/licenses/lgpl.html')) . "\n\n" . ts('Date selection:') . "\n" . ts('- use the \\xab, \\xbb buttons to select year,') . "\n" . ts('- use the \\u2039, \\u203a buttons to select month,') . "\n" . ts('- hold mouse button on any of the above buttons for faster selection.');
$TT['ABOUT_TIME'] = "\n\n" . ts('Time selection:') . "\n" . ts('- click on any of the time parts to increase it') . "\n" . ts('- or Shift-click to decrease it') . "\n" . ts('- or click and drag for faster selection.');
$holdForMenu = ts('hold for menu');
$TT['PREV_YEAR'] = ts('Prev. year') . " ({$holdForMenu})";
$TT['PREV_MONTH'] = ts('Prev. month') . " ({$holdForMenu})";
$TT['GO_TODAY'] = ts('Go Today');
$TT['NEXT_MONTH'] = ts('Next month') . " ({$holdForMenu})";
$TT['NEXT_YEAR'] = ts('Next year') . " ({$holdForMenu})";
$TT['SEL_DATE'] = ts('Select date');
$TT['DRAG_TO_MOVE'] = ts('Drag to move');
$TT['PART_TODAY'] = ' (' . ts('today') . ')';
$TT['DAY_FIRST'] = ts('Display %s first');
$TT['WEEKEND'] = '0,6';
$TT['CLOSE'] = ts('Close');
$TT['TODAY'] = ts('Today');
$TT['TIME_PART'] = ts('(Shift-)Click or drag to change value');
$TT['DEF_DATE_FORMAT'] = '%Y-%m-%d';
$TT['TT_DATE_FORMAT'] = '%a, %b %e';
Example #3
0
 /**
  * Class constructor
  * 
  * @access   public
  * @param    string  Element's name
  * @param    mixed   Label(s) for an element
  * @param    array   Options to control the element's display
  * @param    mixed   Either a typical HTML attribute string or an associative array
  */
 function HTML_QuickForm_date($elementName = null, $elementLabel = null, $options = array(), $attributes = null)
 {
     $this->_locale = array('weekdays_short' => CRM_Utils_Date::getAbbrWeekdayNames(), 'weekdays_long' => CRM_Utils_Date::getFullWeekdayNames(), 'months_short' => CRM_Utils_Date::getAbbrMonthNames(), 'months_long' => CRM_Utils_Date::getFullMonthNames());
     $this->HTML_QuickForm_element($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_appendName = true;
     $this->_type = 'date';
     // set the options, do not bother setting bogus ones
     if (is_array($options)) {
         foreach ($options as $name => $value) {
             if (isset($this->_options[$name])) {
                 if (is_array($value)) {
                     $this->_options[$name] = @array_merge($this->_options[$name], $value);
                 } else {
                     $this->_options[$name] = $value;
                 }
             }
         }
     }
 }