From abcc70722c3577e63b53fcd3acf19d2916d810df Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Feb 2015 19:37:55 -0800 Subject: event form cleanup backported from trinidad - still need to style the checkboxes --- mod/events.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index 9347331d8..7143963f4 100755 --- a/mod/events.php +++ b/mod/events.php @@ -577,12 +577,13 @@ function events_content(&$a) { '$catsenabled' => $catsenabled, '$placeholdercategory' => t('Categories (comma-separated list)'), '$category' => $category, - '$s_text' => t('Event Starts:') . ' *', + '$s_text' => t('Event Starts:'), '$stext' => $stext, '$ftext' => $ftext, + '$required' => ' *', '$ModalCANCEL' => t('Cancel'), '$ModalOK' => t('OK'), - '$s_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$syear+5),DateTime::createFromFormat('Y-m-d H:i',"$syear-$smonth-$sday $shour:$sminute"),'start_text'), + '$s_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$syear+5),DateTime::createFromFormat('Y-m-d H:i',"$syear-$smonth-$sday $shour:$sminute"),'start_text',true,true,'','',true), '$n_text' => t('Finish date/time is not known or not relevant'), '$n_checked' => $n_checked, '$f_text' => t('Event Finishes:'), @@ -593,7 +594,7 @@ function events_content(&$a) { '$d_orig' => $d_orig, '$l_text' => t('Location:'), '$l_orig' => $l_orig, - '$t_text' => t('Title:') . ' *', + '$t_text' => t('Title:'), '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, -- cgit v1.2.3 From e7a68eaef002a9263d20076bcbe6b4c93378255f Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Feb 2015 21:01:02 -0800 Subject: style the checkboxes in the event form --- mod/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index 7143963f4..233447cb1 100755 --- a/mod/events.php +++ b/mod/events.php @@ -588,8 +588,8 @@ function events_content(&$a) { '$n_checked' => $n_checked, '$f_text' => t('Event Finishes:'), '$f_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$fyear+5),DateTime::createFromFormat('Y-m-d H:i',"$fyear-$fmonth-$fday $fhour:$fminute"),'finish_text',true,true,'start_text'), + '$adjust' => array('adjust', t('Adjust for viewer timezone'), $a_checked), '$a_text' => t('Adjust for viewer timezone'), - '$a_checked' => $a_checked, '$d_text' => t('Description:'), '$d_orig' => $d_orig, '$l_text' => t('Location:'), -- cgit v1.2.3 From 7893b649552f23125835cd759ba00230b02a0ab3 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 8 Feb 2015 15:14:45 -0800 Subject: make default calendar view ambivalent to the state of the ignore flag. --- mod/events.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mod/events.php') diff --git a/mod/events.php b/mod/events.php index 233447cb1..a34aa62ab 100755 --- a/mod/events.php +++ b/mod/events.php @@ -242,7 +242,7 @@ function events_content(&$a) { $mode = 'view'; $y = 0; $m = 0; - $ignored = ((x($_REQUEST,'ignored')) ? intval($_REQUEST['ignored']) : 0); + $ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : ''); if(argc() > 1) { if(argc() > 2 && argv(1) == 'event') { @@ -338,11 +338,10 @@ function events_content(&$a) { $r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan from event left join item on event_hash = resource_id - where resource_type = 'event' and event.uid = %d and event.ignore = %d + where resource_type = 'event' and event.uid = %d $ignored AND (( `adjust` = 0 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' ) OR ( `adjust` = 1 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' )) ", intval(local_channel()), - intval($ignored), dbesc($start), dbesc($finish), dbesc($adjust_start), -- cgit v1.2.3