feat(tickets): make ticket title/content/reply length limits configurable
Add ticket_title_max / ticket_content_max / ticket_reply_max to the users/ticket schema (PHP + SPA) with clamped TicketSettings readers. All write paths (front REST, admin REST, note REST, native admin page) and front-end maxlength/counters now read the configured limits. Remove the hardcoded TICKET_CONTENT_MAX constant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6681b0c306
commit
63ab8b8fc9
13 files changed
+71
-28
No files matched your search
@@ -33,6 +33,9 @@ class SchemaUsersTicket {
|
||||
['key' => 'ticket_attachment_max', 'label' => '单个工单图片上限', 'type' => 'number', 'default' => 5, 'min' => 1, 'max' => 9, 'help' => '工单内容与每条回复各自可上传的图片数量上限'],
|
||||
['key' => 'ticket_order_link_s', 'label' => '允许关联订单', 'type' => 'switch', 'default' => true, 'help' => '开启后新建工单时可选择关联本人一个已支付订单;关闭后工单与订单完全解耦'],
|
||||
['key' => 'ticket_urge_interval', 'label' => '催单冷却(分钟)', 'type' => 'number', 'default' => 15, 'min' => 1, 'max' => 1440, 'help' => '同一工单两次催单之间的最小间隔'],
|
||||
['key' => 'ticket_title_max', 'label' => '标题字数上限', 'type' => 'number', 'default' => 200, 'min' => 10, 'max' => 200, 'help' => '工单标题最多可输入的字数(前台提交与后台代客提交共用)'],
|
||||
['key' => 'ticket_content_max', 'label' => '问题描述字数上限', 'type' => 'number', 'default' => 5000, 'min' => 100, 'max' => 16000, 'help' => '新建工单时问题描述最多可输入的字数(前台提交与后台代客提交共用)'],
|
||||
['key' => 'ticket_reply_max', 'label' => '回复字数上限', 'type' => 'number', 'default' => 3000, 'min' => 100, 'max' => 16000, 'help' => '用户与客服每条回复(含后台内部备注)最多可输入的字数'],
|
||||
]],
|
||||
],
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user