diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index a9f6cce7..5a454a87 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -228,8 +228,8 @@ function admin_active() $parameters['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('set active'), 'btn-sm', false)], - page_link_to('admin_active', $parameters) + [form_submit('submit', __('set active'), 'btn-sm', false, 'secondary')], + page_link_to('admin_active', $parameters), false, true ); } if ($usr->state->active) { @@ -241,8 +241,8 @@ function admin_active() $parametersRemove['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('remove active'), 'btn-sm', false)], - page_link_to('admin_active', $parametersRemove) + [form_submit('submit', __('remove active'), 'btn-sm', false, 'secondary')], + page_link_to('admin_active', $parametersRemove), false, true ); } if (!$usr->state->got_shirt) { @@ -254,8 +254,8 @@ function admin_active() $parametersShirt['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('got t-shirt'), 'btn-sm', false)], - page_link_to('admin_active', $parametersShirt) + [form_submit('submit', __('got t-shirt'), 'btn-sm', false, 'secondary')], + page_link_to('admin_active', $parametersShirt), false, true ); } if ($usr->state->got_shirt) { @@ -267,12 +267,12 @@ function admin_active() $parameters['show_all_shifts'] = 1; } $actions[] = form( - [form_submit('submit', __('remove t-shirt'), 'btn-sm', false)], - page_link_to('admin_active', $parameters) + [form_submit('submit', __('remove t-shirt'), 'btn-sm', false, 'secondary')], + page_link_to('admin_active', $parameters), false, true ); } - $actions[] = button(url('/admin/user/' . $usr->id . '/shirt'), __('form.edit'), 'btn-primary btn-sm'); + $actions[] = button(url('/admin/user/' . $usr->id . '/shirt'), __('form.edit'), 'btn-secondary btn-sm'); $userData['actions'] = buttons($actions); diff --git a/includes/sys_form.php b/includes/sys_form.php index 9be7173a..c89daf47 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -448,11 +448,13 @@ function form_element($label, $input, $for = '', $class = '') * @param bool $inline * @return string */ -function form($elements, $action = '', $inline = false) +function form($elements, $action = '', $inline = false, $btnGroup = false) { - return '
' - . form_csrf() + return '' . join($elements) + . form_csrf() . '
'; } diff --git a/resources/lang/en_US/default.po b/resources/lang/en_US/default.po index 16c25f19..cde9addf 100644 --- a/resources/lang/en_US/default.po +++ b/resources/lang/en_US/default.po @@ -58,7 +58,7 @@ msgid "form.save" msgstr "Save" msgid "form.edit" -msgstr "Bearbeiten" +msgstr "Edit" msgid "form.preview" msgstr "Preview" diff --git a/resources/views/admin/user/edit-shirt.twig b/resources/views/admin/user/edit-shirt.twig index e7ac5631..5e9f1b08 100644 --- a/resources/views/admin/user/edit-shirt.twig +++ b/resources/views/admin/user/edit-shirt.twig @@ -14,20 +14,18 @@ {{ csrf() }}
-
+
{{ f.select('shirt_size', config('tshirt_sizes'), __('user.shirt_size'), userdata.personalData.shirt_size) }}
-
- {% if has_permission_to('admin_arrive') %} - {{ f.switch('arrived', __('user.arrived'), userdata.state.arrived) }} - {% endif %} +
+ {{ f.switch('arrived', __('user.arrived'), userdata.state.arrived, {'disabled': not has_permission_to('admin_arrive')}) }} {% if userdata.state.force_active %} {{ f.switch('force_active', __('user.force_active'), true, {'disabled': true}) }} + {% else %} + {{ f.switch('active', __('user.active'), userdata.state.active) }} {% endif %} - {{ f.switch('active', __('user.active'), userdata.state.active) }} - {{ f.switch('got_shirt', __('user.got_shirt'), userdata.state.got_shirt) }}
diff --git a/resources/views/macros/form.twig b/resources/views/macros/form.twig index 70c966ec..981355bf 100644 --- a/resources/views/macros/form.twig +++ b/resources/views/macros/form.twig @@ -51,7 +51,7 @@ {%- endmacro %} {% macro checkbox(name, label, checked, value, disabled) %} -
+