chore: add_del_cmd_form ctrl_enter submit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-04 16:17:16 +08:00
parent 999453e0bf
commit a999479831
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
3 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ if ($cur_tab == 'profile') {
echo HTML::tag_end('tr'); echo HTML::tag_end('tr');
}, },
[ [
'page_len' => 50, 'echo_full' => true,
'div_classes' => ['table-responsive'], 'div_classes' => ['table-responsive'],
'table_classes' => ['table', 'align-middle'], 'table_classes' => ['table', 'align-middle'],
'print_after_table' => function () use ($n_problems) { 'print_after_table' => function () use ($n_problems) {

View File

@ -52,7 +52,6 @@ $managers_form = newAddDelCmdForm(
'help' => '命令格式:命令一行一个,<code>+mike</code> 表示把 <code>mike</code> 加入管理者,<code>-mike</code> 表示把 <code>mike</code> 从管理者中移除。', 'help' => '命令格式:命令一行一个,<code>+mike</code> 表示把 <code>mike</code> 加入管理者,<code>-mike</code> 表示把 <code>mike</code> 从管理者中移除。',
] ]
); );
$managers_form->runAtServer(); $managers_form->runAtServer();
if (isSuperUser(Auth::user())) { if (isSuperUser(Auth::user())) {

View File

@ -3,6 +3,7 @@ define('SCRIPT_REFRESH_AS_GET', '<script>;window.location = window.location.orig
function newAddDelCmdForm($form_name, $validate, $handle, $final = null, $cfg = []) { function newAddDelCmdForm($form_name, $validate, $handle, $final = null, $cfg = []) {
$form = new UOJForm($form_name); $form = new UOJForm($form_name);
$form->config['ctrl_enter_submit'] = true;
$form->addTextArea("{$form_name}_cmds", [ $form->addTextArea("{$form_name}_cmds", [
'label' => '命令', 'label' => '命令',
'input_class' => 'form-control font-monospace', 'input_class' => 'form-control font-monospace',