diff --git a/includes/pages/admin_free.php b/includes/pages/admin_free.php index 9008debc..47deb4e6 100644 --- a/includes/pages/admin_free.php +++ b/includes/pages/admin_free.php @@ -105,9 +105,9 @@ function admin_free() form([ div('row', [ div('col-md-12 form-inline', [ - div('inline-form-spacing', [ - form_text('search', __('Search'), $search), - form_select('angeltype', __('Angeltype'), $angel_types, $angelType), + div('row', [ + form_text('search', __('Search'), $search, null, null, null, 'col'), + form_select('angeltype', __('Angeltype'), $angel_types, $angelType, '', 'col'), form_submit('submit', __('Search')) ]), ]), diff --git a/includes/sys_form.php b/includes/sys_form.php index 4290d8a3..d57e89b4 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -257,10 +257,11 @@ function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = * @param bool $disabled * @param int|null $maxlength * @param string|null $autocomplete + * @param string|null $class * * @return string */ -function form_text($name, $label, $value, $disabled = false, $maxlength = null, $autocomplete = null) +function form_text($name, $label, $value, $disabled = false, $maxlength = null, $autocomplete = null, $class = '') { $disabled = $disabled ? ' disabled="disabled"' : ''; $maxlength = $maxlength ? ' maxlength=' . (int)$maxlength : ''; @@ -270,7 +271,8 @@ function form_text($name, $label, $value, $disabled = false, $maxlength = null, $label, '', - 'form_' . $name + 'form_' . $name, + $class ); } @@ -404,14 +406,16 @@ function form_textarea($name, $label, $value, $disabled = false) * @param string[] $values * @param string $selected * @param string $selectText + * @param string $class * @return string */ -function form_select($name, $label, $values, $selected, $selectText = '') +function form_select($name, $label, $values, $selected, $selectText = '', $class = '') { return form_element( $label, html_select_key('form_' . $name, $name, $values, $selected, $selectText), - 'form_' . $name + 'form_' . $name, + $class ); } @@ -421,15 +425,21 @@ function form_select($name, $label, $values, $selected, $selectText = '') * @param string $label * @param string $input * @param string $for + * @param string $class * @return string */ -function form_element($label, $input, $for = '') +function form_element($label, $input, $for = '', $class = '') { + $class = $class ? ' ' . $class : ''; + if (empty($label)) { - return '