diff options
author | friendica <info@friendica.com> | 2015-02-05 19:37:55 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-05 19:37:55 -0800 |
commit | abcc70722c3577e63b53fcd3acf19d2916d810df (patch) | |
tree | aaed8f7025fa9591080045c313085de17761636b /include | |
parent | b948fbaeda84f4358722222b4a2d5555ef10b82e (diff) | |
download | volse-hubzilla-abcc70722c3577e63b53fcd3acf19d2916d810df.tar.gz volse-hubzilla-abcc70722c3577e63b53fcd3acf19d2916d810df.tar.bz2 volse-hubzilla-abcc70722c3577e63b53fcd3acf19d2916d810df.zip |
event form cleanup backported from trinidad - still need to style the checkboxes
Diffstat (limited to 'include')
-rw-r--r-- | include/datetime.php | 3 |
1 files changed, 2 insertions, 1 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; |