feat(admin): add a cancel button next to the ticket process submit
Collapses the inline process form by linking back to the current list URL without the action/id params (filters preserved).
This commit is contained in:
1 parent
c4531b9757
commit
fe6b4da455
2 files changed
+7
-1
No files matched your search
@@ -487,7 +487,11 @@ trait UsersMenusTickets {
|
|||||||
wp_nonce_field('aksrt_users_process_appeal_' . $uid);
|
wp_nonce_field('aksrt_users_process_appeal_' . $uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<tr><th></th><td><p><button type="submit" class="button button-primary process-submit">' . esc_html__('确认提交', 'aksrt') . '</button></p></td></tr>';
|
echo '<tr><th></th><td><p>';
|
||||||
|
echo '<button type="submit" class="button button-primary process-submit">' . esc_html__('确认提交', 'aksrt') . '</button> ';
|
||||||
|
// 取消:回到未展开状态(去掉 action/id 参数的当前列表,保留筛选)。
|
||||||
|
echo '<a class="button" href="' . esc_url(remove_query_arg(['action', 'id'])) . '">' . esc_html__('取消', 'aksrt') . '</a>';
|
||||||
|
echo '</p></td></tr>';
|
||||||
echo '</tbody></table></form>';
|
echo '</tbody></table></form>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,6 +184,8 @@ test('native ban page mirrors the reference theme layout', () => {
|
|||||||
// 表单裸嵌 tbody 被 foster-parent 后多余行信息错位到“确认提交”下方。
|
// 表单裸嵌 tbody 被 foster-parent 后多余行信息错位到“确认提交”下方。
|
||||||
assert.match(tickets, /<tr><td colspan="6">';\s*\$this->render_ticket_process_form/)
|
assert.match(tickets, /<tr><td colspan="6">';\s*\$this->render_ticket_process_form/)
|
||||||
assert.match(tickets, /if \(\$is_processing\) \{[\s\S]*?render_ticket_process_form\(\$row, \$action_url\)[\s\S]*?\} else \{\s*\$this->render_ticket_row/)
|
assert.match(tickets, /if \(\$is_processing\) \{[\s\S]*?render_ticket_process_form\(\$row, \$action_url\)[\s\S]*?\} else \{\s*\$this->render_ticket_row/)
|
||||||
|
// 展开的处理表单提供“取消”按钮(确认提交右侧),可收起回到列表。
|
||||||
|
assert.match(tickets, /process-submit.*?<\/button> <a class="button" href="' \. esc_url\(remove_query_arg\(\['action', 'id'\]\)\) . '">.*?取消/)
|
||||||
|
|
||||||
// 分页对齐参考主题 zibpay_admin_pagenavi(每页 20 条)
|
// 分页对齐参考主题 zibpay_admin_pagenavi(每页 20 条)
|
||||||
assert.match(tickets, /TICKETS_PER_PAGE = 20/)
|
assert.match(tickets, /TICKETS_PER_PAGE = 20/)
|
||||||
|
|||||||
Reference in new issue
Block a user