From 242dad037f6834268fba37b14a81aaef0ba488e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 12 Jun 2019 04:35:49 +0200 Subject: [PATCH] MDL-65901 forum: Style advanced search form properly. --- lib/templates/select_time.mustache | 2 +- mod/forum/classes/output/big_search_form.php | 24 ++++++------ mod/forum/templates/big_search_form.mustache | 40 +++++++++++--------- 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/lib/templates/select_time.mustache b/lib/templates/select_time.mustache index f2c9029613ed1..df48117bd2cd3 100644 --- a/lib/templates/select_time.mustache +++ b/lib/templates/select_time.mustache @@ -31,7 +31,7 @@ } }} - {{#options}} {{/options}} diff --git a/mod/forum/classes/output/big_search_form.php b/mod/forum/classes/output/big_search_form.php index b4ae556b0651c..919e46a180058 100644 --- a/mod/forum/classes/output/big_search_form.php +++ b/mod/forum/classes/output/big_search_form.php @@ -214,17 +214,19 @@ public function export_for_template(renderer_base $output) { $dateto = time() + HOURSECS; } - $data->datefromfields = html_writer::select_time('days', 'fromday', $datefrom) - . html_writer::select_time('months', 'frommonth', $datefrom) - . html_writer::select_time('years', 'fromyear', $datefrom) - . html_writer::select_time('hours', 'fromhour', $datefrom) - . html_writer::select_time('minutes', 'fromminute', $datefrom); - - $data->datetofields = html_writer::select_time('days', 'today', $dateto) - . html_writer::select_time('months', 'tomonth', $dateto) - . html_writer::select_time('years', 'toyear', $dateto) - . html_writer::select_time('hours', 'tohour', $dateto) - . html_writer::select_time('minutes', 'tominute', $dateto); + $data->datefromfields = html_writer::div(html_writer::select_time('days', 'fromday', $datefrom), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('months', 'frommonth', $datefrom), + 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('years', 'fromyear', $datefrom), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('hours', 'fromhour', $datefrom), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('minutes', 'fromminute', $datefrom), + 'form-group fitem ml-2'); + + $data->datetofields = html_writer::div(html_writer::select_time('days', 'today', $dateto), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('months', 'tomonth', $dateto), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('years', 'toyear', $dateto), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('hours', 'tohour', $dateto), 'form-group fitem ml-2') + . html_writer::div(html_writer::select_time('minutes', 'tominute', $dateto), 'form-group fitem ml-2'); if ($this->forumid && !empty($this->forumoptions)) { foreach ($this->forumoptions as $index => $option) { diff --git a/mod/forum/templates/big_search_form.mustache b/mod/forum/templates/big_search_form.mustache index 5c05e5c7edc7a..4ac32ec27992d 100644 --- a/mod/forum/templates/big_search_form.mustache +++ b/mod/forum/templates/big_search_form.mustache @@ -51,10 +51,10 @@ {{#str}}searchforumintro, forum{{/str}}
-
+ - @@ -63,7 +63,7 @@ - - {{#showfullwords}} - {{/showfullwords}} - - - - -