aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/datetime.php3
-rwxr-xr-xmod/events.php7
-rw-r--r--view/css/mod_events.css20
-rw-r--r--view/theme/redbasic/css/style.css2
-rwxr-xr-xview/tpl/event_form.tpl5
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 .= "<div class='date'><input type='text' placeholder='$readable_format' name='$id' id='$id' $input_text />";
+ $o .= (($required) ? '<span class="required" title="' . t('Required') . '" >*</span>' : '');
$o .= '</div>';
$o .= "<script type='text/javascript'>\$(function () {var picker = \$('#$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs}); $extra_js})</script>";
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:') . ' <span class="required" title="' . t('Required') . '">*</span>',
+ '$s_text' => t('Event Starts:'),
'$stext' => $stext,
'$ftext' => $ftext,
+ '$required' => '<span class="required" title="' . t('Required') . '">*</span>',
'$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:') . ' <span class="required" title="' . t('Required') . '">*</span>',
+ '$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 @@
<input type="hidden" name="mid" value="{{$mid}}" />
<div id="event-summary-text">{{$t_text}}</div>
-<input type="text" id="event-summary" name="summary" value="{{$t_orig}}" />
+<input type="text" id="event-summary" name="summary" value="{{$t_orig}}" />{{$required}}
+
+<div class="clear"></div>
<div id="event-start-text">{{$s_text}}</div>
+
{{$s_dsel}}
<div class="clear"></div><br />