diff options
author | friendica <info@friendica.com> | 2015-01-29 20:09:48 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-29 20:09:48 -0800 |
commit | 4a243b63f7019a1e56ecf03b138cd7fc396236c2 (patch) | |
tree | a313e774b33a0310df56c246654266e75dda4d81 /include | |
parent | 912be23e1627211fb417c4b7bced414cbbe38ef0 (diff) | |
download | volse-hubzilla-4a243b63f7019a1e56ecf03b138cd7fc396236c2.tar.gz volse-hubzilla-4a243b63f7019a1e56ecf03b138cd7fc396236c2.tar.bz2 volse-hubzilla-4a243b63f7019a1e56ecf03b138cd7fc396236c2.zip |
cleanup event form and various required indicators on inputs
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; |