fix(admin): render the ticket process form as a dedicated view
action=process used to append the process form into the tickets table as a bare <form><table> inside <tbody> — invalid HTML that browsers reflow, leaving the ticket list stacked below the submit button. Render the process form as its own view (early return, list and pagenavi skipped, with a lookup fallback beyond the current page slice) and keep the list view free of form injection.
This commit is contained in:
@@ -179,6 +179,10 @@ test('native ban page mirrors the reference theme layout', () => {
|
||||
assert.match(tickets, /name="action" value="' \. esc_attr\(\$kind === 'report' \? 'aksrt_users_update_report' : 'aksrt_users_process_appeal'\)/)
|
||||
assert.match(usersMenus, /admin_post_aksrt_users_update_report/)
|
||||
assert.match(usersMenus, /admin_post_aksrt_users_process_appeal/)
|
||||
// 独立处理视图:action=process 时只渲染目标工单的处理表单(提前 return),
|
||||
// 列表循环不得再注入表单——无效 <tr> 嵌套曾把工单列表挤到“确认提交”下方。
|
||||
assert.match(tickets, /if \(\$process_action === 'process'\) \{[\s\S]*?render_ticket_process_form\(\$processing, \$action_url\)[\s\S]*?return;/)
|
||||
assert.doesNotMatch(tickets, /foreach \(\$tickets as \$row\) \{\s*\$this->render_ticket_row[\s\S]{0,400}?render_ticket_process_form/)
|
||||
|
||||
// 分页对齐参考主题 zibpay_admin_pagenavi(每页 20 条)
|
||||
assert.match(tickets, /TICKETS_PER_PAGE = 20/)
|
||||
|
||||
Reference in New Issue
Block a user