From 7e53c458901e3c0c801deb626ef8ce44484a38c6 Mon Sep 17 00:00:00 2001 From: MichiK <6341204+der-michik@users.noreply.github.com> Date: Thu, 6 Dec 2018 23:05:40 +0100 Subject: [PATCH] Change the color of "reset" in admin_arrive --- includes/pages/admin_arrive.php | 5 ++++- includes/sys_form.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index 0714d980..bd51c11c 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -100,7 +100,10 @@ function admin_arrive() $usr['actions'] = form([ form_hidden('action', $usr->state->arrived ? 'reset' : 'arrived'), form_hidden('user', $usr->id), - form_submit('submit', $usr->state->arrived ? __('reset') : __('arrived'), 'btn-xs'), + form_submit( + 'submit', $usr->state->arrived ? __('reset') : __('arrived'), 'btn-xs', true, + $usr->state->arrived ? 'danger' : 'primary' + ), ]); if ($usr->state->arrival_date) { diff --git a/includes/sys_form.php b/includes/sys_form.php index 3c31f43e..43db3455 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -208,9 +208,9 @@ function form_info($label, $text = '') * @param bool $wrapForm * @return string */ -function form_submit($name, $label, $class = '', $wrapForm = true) +function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary') { - $button = '';