-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
120 changed files
with
10,594 additions
and
9,096 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
/** | ||
* Class for a group of elements used to input dates (and times). | ||
* | ||
* | ||
* PHP versions 4 and 5 | ||
* | ||
* LICENSE: This source file is subject to version 3.01 of the PHP license | ||
|
@@ -32,10 +32,10 @@ | |
|
||
/** | ||
* Class for a group of elements used to input dates (and times). | ||
* | ||
* | ||
* Inspired by original 'date' element but reimplemented as a subclass | ||
* of HTML_QuickForm_group | ||
* | ||
* | ||
* @category HTML | ||
* @package HTML_QuickForm | ||
* @author Alexey Borzov <[email protected]> | ||
|
@@ -48,7 +48,7 @@ class HTML_QuickForm_date extends HTML_QuickForm_group | |
|
||
/** | ||
* Various options to control the element's display. | ||
* | ||
* | ||
* @access private | ||
* @var array | ||
*/ | ||
|
@@ -72,10 +72,10 @@ class HTML_QuickForm_date extends HTML_QuickForm_group | |
|
||
/** | ||
* Options in different languages | ||
* | ||
* | ||
* Note to potential translators: to avoid encoding problems please send | ||
* your translations with "weird" letters encoded as HTML Unicode entities | ||
* | ||
* | ||
* @access private | ||
* @var array | ||
*/ | ||
|
@@ -243,12 +243,12 @@ class HTML_QuickForm_date extends HTML_QuickForm_group | |
|
||
/** | ||
* Class constructor | ||
* | ||
* | ||
* The following keys may appear in $options array: | ||
* - 'language': date language | ||
* - 'format': Format of the date, based on PHP's date() function. | ||
* The following characters are currently recognised in format string: | ||
* <pre> | ||
* <pre> | ||
* D => Short names of days | ||
* l => Long names of days | ||
* d => Day numbers | ||
|
@@ -343,7 +343,7 @@ function _createElements() | |
case 'Y': | ||
$options = $this->_createOptionList( | ||
$this->_options['minYear'], | ||
$this->_options['maxYear'], | ||
$this->_options['maxYear'], | ||
$this->_options['minYear'] > $this->_options['maxYear']? -1: 1 | ||
); | ||
break; | ||
|
@@ -353,7 +353,7 @@ function _createElements() | |
$this->_options['maxYear'], | ||
$this->_options['minYear'] > $this->_options['maxYear']? -1: 1 | ||
); | ||
array_walk($options, create_function('&$v,$k','$v = substr($v,-2);')); | ||
array_walk($options, create_function('&$v,$k','$v = substr($v,-2);')); | ||
break; | ||
case 'h': | ||
$options = $this->_createOptionList(1, 12); | ||
|
@@ -388,7 +388,7 @@ function _createElements() | |
$separator .= (' ' == $sign? ' ': $sign); | ||
$loadSelect = false; | ||
} | ||
|
||
if ($loadSelect) { | ||
if (0 < count($this->_elements)) { | ||
$this->_separator[] = $separator; | ||
|
@@ -397,7 +397,7 @@ function _createElements() | |
} | ||
$separator = ''; | ||
// Should we add an empty option to the top of the select? | ||
if (!is_array($this->_options['addEmptyOption']) && $this->_options['addEmptyOption'] || | ||
if (!is_array($this->_options['addEmptyOption']) && $this->_options['addEmptyOption'] || | ||
is_array($this->_options['addEmptyOption']) && !empty($this->_options['addEmptyOption'][$sign])) { | ||
|
||
// Using '+' array operator to preserve the keys | ||
|
@@ -407,7 +407,7 @@ function _createElements() | |
$options = array($this->_options['emptyOptionValue'] => $this->_options['emptyOptionText']) + $options; | ||
} | ||
} | ||
$this->_elements[] =& new HTML_QuickForm_select($sign, null, $options, $this->getAttributes()); | ||
$this->_elements[] = new HTML_QuickForm_select($sign, null, $options, $this->getAttributes()); | ||
} | ||
} | ||
} | ||
|
@@ -478,7 +478,7 @@ function setValue($value) | |
function toHtml() | ||
{ | ||
include_once('HTML/QuickForm/Renderer/Default.php'); | ||
$renderer =& new HTML_QuickForm_Renderer_Default(); | ||
$renderer = new HTML_QuickForm_Renderer_Default(); | ||
$renderer->setElementTemplate('{element}'); | ||
parent::accept($renderer); | ||
return $this->_wrap[0] . $renderer->toHtml() . $this->_wrap[1]; | ||
|
@@ -508,4 +508,4 @@ function onQuickFormEvent($event, $arg, &$caller) | |
|
||
// }}} | ||
} | ||
?> | ||
?> |
Oops, something went wrong.