mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 14:48:41 +00:00
feat: allow admins to edit usertype
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8b2de39c5f
commit
2dd91d1853
@ -342,6 +342,17 @@ EOD);
|
||||
}
|
||||
$update_user_permissions_form->appendHTML(HTML::tag('span', [], UOJLocale::get('user::user group')));
|
||||
$update_user_permissions_form->appendHTML(HTML::tag('span', ['class' => 'd-inline-block ms-3'], $type_text));
|
||||
$update_user_permissions_form->addSelect('user_type', [
|
||||
'label' => '账号类型',
|
||||
'options' => [
|
||||
'student' => '学生',
|
||||
'teacher' => '老师',
|
||||
'system' => '系统',
|
||||
],
|
||||
'div_class' => 'my-3 row gy-2 gx-3 align-items-center',
|
||||
'label_class' => 'form-label col-auto',
|
||||
'select_class' => 'form-select w-auto col-auto',
|
||||
]);
|
||||
$update_user_permissions_form->appendHTML(HTML::tag('h3', ['class' => 'h5 mt-3'], '题目'));
|
||||
$update_user_permissions_form->addCheckbox('problems__view', [
|
||||
'checked' => $extra['permissions']['problems']['view'],
|
||||
@ -673,6 +684,7 @@ EOD);
|
||||
DB::update([
|
||||
"update user_info",
|
||||
"set", [
|
||||
"usertype" => $_POST['user_type'],
|
||||
"extra" => json_encode($extra),
|
||||
],
|
||||
"where", [
|
||||
|
@ -165,7 +165,7 @@ class UOJForm {
|
||||
'options' => [],
|
||||
'default_value' => '',
|
||||
'label' => '',
|
||||
'label_class' => 'form-check-label',
|
||||
'label_class' => 'form-label',
|
||||
'help' => '',
|
||||
'help_class' => 'form-text',
|
||||
'disabled' => false,
|
||||
|
Loading…
Reference in New Issue
Block a user