Fix profile link to mark angels as arrived
This commit is contained in:
parent
94fea1edad
commit
b6eda8dbfc
|
@ -204,6 +204,7 @@ function form_info($label, $text = '')
|
||||||
* @param string $label
|
* @param string $label
|
||||||
* @param string $class
|
* @param string $class
|
||||||
* @param bool $wrapForm
|
* @param bool $wrapForm
|
||||||
|
* @param string $buttonType
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary')
|
function form_submit($name, $label, $class = '', $wrapForm = true, $buttonType = 'primary')
|
||||||
|
@ -402,11 +403,12 @@ function form_element($label, $input, $for = '')
|
||||||
*
|
*
|
||||||
* @param string[] $elements
|
* @param string[] $elements
|
||||||
* @param string $action
|
* @param string $action
|
||||||
|
* @param bool $inline
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function form($elements, $action = '')
|
function form($elements, $action = '', $inline = false)
|
||||||
{
|
{
|
||||||
return '<form action="' . $action . '" enctype="multipart/form-data" method="post">'
|
return '<form action="' . $action . '" enctype="multipart/form-data" method="post"' . ($inline ? ' style="float:left"' : '') . '>'
|
||||||
. form_csrf()
|
. form_csrf()
|
||||||
. join($elements)
|
. join($elements)
|
||||||
. '</form>';
|
. '</form>';
|
||||||
|
|
|
@ -617,10 +617,12 @@ function User_view(
|
||||||
user_driver_license_edit_link($user_source),
|
user_driver_license_edit_link($user_source),
|
||||||
glyph('road') . __('driving license')
|
glyph('road') . __('driving license')
|
||||||
) : '',
|
) : '',
|
||||||
($admin_user_privilege && !$user_source->state->arrived) ? button(
|
($admin_user_privilege && !$user_source->state->arrived) ?
|
||||||
page_link_to('admin_arrive', ['arrived' => $user_source->id]),
|
form([
|
||||||
__('arrived')
|
form_hidden('action', 'arrived'),
|
||||||
) : '',
|
form_hidden('user', $user_source->id),
|
||||||
|
form_submit('submit', __('arrived'), '', false, 'default')
|
||||||
|
], page_link_to('admin_arrive'), true) : '',
|
||||||
$admin_user_privilege ? button(
|
$admin_user_privilege ? button(
|
||||||
page_link_to(
|
page_link_to(
|
||||||
'users',
|
'users',
|
||||||
|
|
Loading…
Reference in New Issue