From 47292c612c5a2a6d3819ca3c415fa2d99ab2ee7f Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 26 Mar 2015 18:03:39 -0700 Subject: provide ways to over-ride the datetime pickers --- include/conversation.php | 2 ++ include/datetime.php | 2 ++ mod/events.php | 4 +++- version.inc | 2 +- view/tpl/event_form.tpl | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 8a834f339..4018ced28 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1158,6 +1158,8 @@ function status_editor($a, $x, $popup = false) { $preview = ''; $defexpire = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_expire')) && (! $webpage)) ? $z : ''); + if($defexpire) + $defexpire = datetime_convert('UTC',date_default_timezone_get(),$defexpire,'Y-m-d H:i'); $cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher'); if(! $cipher) diff --git a/include/datetime.php b/include/datetime.php index a387d84c4..5cab5889d 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -175,6 +175,8 @@ function timesel($format, $h, $m, $id='timepicker') { * set maximum date from picker with id $maxfrom (none by default) */ function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '',$required = false) { + + // Once browser support is better this could probably be replaced with native HTML5 date picker $o = ''; diff --git a/mod/events.php b/mod/events.php index 010f1f7c4..289ddfb15 100755 --- a/mod/events.php +++ b/mod/events.php @@ -548,12 +548,14 @@ function events_content(&$a) { if(! x($orig_event)) $sh_checked = ''; else - $sh_checked = (($orig_event['allow_cid'] === '<' . $channel['channel_hash'] . '>' && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' ); + $sh_checked = ((($orig_event['allow_cid'] === '<' . $channel['channel_hash'] . '>' || (! $orig_event['allow_cid'])) && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' ); if($orig_event['event_xchan']) $sh_checked .= ' disabled="disabled" '; + + $sdt = ((x($orig_event)) ? $orig_event['start'] : 'now'); $fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now'); diff --git a/version.inc b/version.inc index 790427996..fea8356b7 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-03-25.982 +2015-03-26.983 diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index f8afa2e36..7ec32d2c9 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -27,7 +27,7 @@
-
+
@@ -157,7 +157,7 @@
-
+
-- cgit v1.2.3