Fix template priority field name and improve admin form styling
Template fixes: - Fixed column name mismatch: use 'default_priority' instead of 'priority' - Updated manage_templates.php API INSERT and UPDATE queries - Updated TemplatesView.php to use correct field name in PHP and JS CSS improvements for .setting-row: - Better flexbox layout with flex-wrap for responsiveness - Proper styling for inputs, selects, and textareas in setting rows - Labels now align to top (better for textareas) - Added focus states with amber glow effect - Improved checkbox styling within setting rows - Better mobile responsive behavior (stacked layout) - Updated cache version to 20260126a Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ try {
|
||||
$data = json_decode(file_get_contents('php://input'), true);
|
||||
|
||||
$stmt = $conn->prepare("INSERT INTO ticket_templates
|
||||
(template_name, title_template, description_template, category, type, priority, is_active)
|
||||
(template_name, title_template, description_template, category, type, default_priority, is_active)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)");
|
||||
$stmt->bind_param('sssssii',
|
||||
$data['template_name'],
|
||||
@@ -89,7 +89,7 @@ try {
|
||||
$data['description_template'],
|
||||
$data['category'],
|
||||
$data['type'],
|
||||
$data['priority'] ?? 4,
|
||||
$data['default_priority'] ?? 4,
|
||||
$data['is_active'] ?? 1
|
||||
);
|
||||
|
||||
@@ -111,7 +111,7 @@ try {
|
||||
|
||||
$stmt = $conn->prepare("UPDATE ticket_templates SET
|
||||
template_name = ?, title_template = ?, description_template = ?,
|
||||
category = ?, type = ?, priority = ?, is_active = ?
|
||||
category = ?, type = ?, default_priority = ?, is_active = ?
|
||||
WHERE template_id = ?");
|
||||
$stmt->bind_param('sssssiii',
|
||||
$data['template_name'],
|
||||
@@ -119,7 +119,7 @@ try {
|
||||
$data['description_template'],
|
||||
$data['category'],
|
||||
$data['type'],
|
||||
$data['priority'] ?? 4,
|
||||
$data['default_priority'] ?? 4,
|
||||
$data['is_active'] ?? 1,
|
||||
$id
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user