Change the color of "reset" in admin_arrive
This commit is contained in:
parent
a1c01461c6
commit
7e53c45890
|
@ -100,7 +100,10 @@ function admin_arrive()
|
||||||
$usr['actions'] = form([
|
$usr['actions'] = form([
|
||||||
form_hidden('action', $usr->state->arrived ? 'reset' : 'arrived'),
|
form_hidden('action', $usr->state->arrived ? 'reset' : 'arrived'),
|
||||||
form_hidden('user', $usr->id),
|
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) {
|
if ($usr->state->arrival_date) {
|
||||||
|
|
|
@ -208,9 +208,9 @@ function form_info($label, $text = '')
|
||||||
* @param bool $wrapForm
|
* @param bool $wrapForm
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function form_submit($name, $label, $class = '', $wrapForm = true)
|
function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary')
|
||||||
{
|
{
|
||||||
$button = '<button class="btn btn-primary' . ($class ? ' ' . $class : '') . '" type="submit" name="' . $name . '">'
|
$button = '<button class="btn btn-' . $buttonType . ($class ? ' ' . $class : '') . '" type="submit" name="' . $name . '">'
|
||||||
. $label
|
. $label
|
||||||
. '</button>';
|
. '</button>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue