From 4a243b63f7019a1e56ecf03b138cd7fc396236c2 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 29 Jan 2015 20:09:48 -0800 Subject: cleanup event form and various required indicators on inputs --- include/datetime.php | 3 ++- mod/events.php | 7 ++++--- view/css/mod_events.css | 20 ++++++++++++++++---- view/theme/redbasic/css/style.css | 2 ++ view/tpl/event_form.tpl | 5 ++++- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/include/datetime.php b/include/datetime.php index 346d03bd4..a387d84c4 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -174,7 +174,7 @@ function timesel($format, $h, $m, $id='timepicker') { * @param $maxfrom * 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 = '') { +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 = ''; @@ -209,6 +209,7 @@ function datetimesel($format, $min, $max, $default, $id = 'datetimepicker', $pic $readable_format = str_replace('i','MM',$readable_format); $o .= "
"; + $o .= (($required) ? '*' : ''); $o .= '
'; $o .= ""; return $o; diff --git a/mod/events.php b/mod/events.php index 322106d3f..99e965e90 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, diff --git a/view/css/mod_events.css b/view/css/mod_events.css index 0aef13aa6..8f4a69b4f 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -2,8 +2,14 @@ width: 400px; } -#event-summary { - width: 400px; +#event-summary-text, #event-start-text, #event-finish-text { + width: 200px; + float: left; +} + +#event-summary, #start_text, #finish_text { + width: 300px; + float: left; } .event-cats { @@ -12,6 +18,12 @@ } .required { - color: #ff0000; - font-size: 1.2rem; + float: left; +} + +#event-datetime-break { + clear: both; +} +#event-nofinish-break { + margin-bottom: 10px; } \ No newline at end of file diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index c95909085..73b13c1bf 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1177,6 +1177,8 @@ nav .acpopup { .required { color: #FF0000; + font-size: 200%; + margin-left: 5px; } #event-start-text, #event-finish-text { diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index a4717415e..dbad6579e 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -14,9 +14,12 @@
{{$t_text}}
- +{{$required}} + +
{{$s_text}}
+ {{$s_dsel}}

-- cgit v1.2.3