aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/date.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-07-02 09:21:30 -0400
committerCash Costello <cash.costello@gmail.com>2011-07-02 09:21:30 -0400
commitf5f3f205e97c2a3219897dd14de7d57659ce1181 (patch)
treee89da8c8aa003826b1815cabaf01d1fbcfbb351f /views/default/input/date.php
parent9e9b28479b6ecfd8685b2bba7f9ae5856ece9b2e (diff)
downloadelgg-f5f3f205e97c2a3219897dd14de7d57659ce1181.tar.gz
elgg-f5f3f205e97c2a3219897dd14de7d57659ce1181.tar.bz2
Fixes #3624 input views use class extending rather than overriding
Diffstat (limited to 'views/default/input/date.php')
-rw-r--r--views/default/input/date.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/views/default/input/date.php b/views/default/input/date.php
index afc40e899..e21a5f8f5 100644
--- a/views/default/input/date.php
+++ b/views/default/input/date.php
@@ -7,18 +7,23 @@
* @subpackage Core
*
* @uses $vars['value'] The current value, if any (as a unix timestamp)
- *
+ * @uses $vars['class'] Additional CSS class
*/
+//@todo popup_calendar deprecated in 1.8. Remove in 2.0
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-date popup_calendar {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-date popup_calendar";
+}
+
$defaults = array(
'value' => '',
- 'class' => '',
+ 'disabled' => false,
);
$vars = array_merge($defaults, $vars);
-//@todo popup_calendar deprecated in 1.8. Remove in 2.0
-$vars['class'] = trim("elgg-input-date popup_calendar {$vars['class']}");
if ($vars['value'] > 86400) {
$vars['value'] = date('n/d/Y', $vars['value']);