getConnection(); $stmt = $pdo->prepare("SELECT * FROM excel_templates WHERE id = ?"); $stmt->execute([$id]); $template = $stmt->fetch(PDO::FETCH_ASSOC); if (!$template) { header("Location: templates_dashboard.php?status=error&message=" . urlencode("Template not found")); exit; } // Retrieve all routines $stmt = $pdo->prepare("SELECT * FROM routine"); $stmt->execute(); $routines = $stmt->fetchAll(PDO::FETCH_ASSOC); $buttonBgPalette = [ '#0d6efd' => 'Blue', '#6610f2' => 'Indigo', '#6f42c1' => 'Purple', '#d63384' => 'Pink', '#dc3545' => 'Red', '#fd7e14' => 'Orange', '#ffc107' => 'Yellow', '#198754' => 'Green', '#20c997' => 'Teal', '#0dcaf0' => 'Cyan', '#212529' => 'Dark', '#6c757d' => 'Gray', '#495057' => 'Slate', '#795548' => 'Brown', '#2f5d50' => 'Sage Green', ]; $buttonTextPalette = [ '#ffffff' => 'White', '#6c757d' => 'Gray', '#000000' => 'Black', ]; $currentButtonBgColor = strtolower($template['button_bg_color'] ?? '#007bff'); $currentButtonTextColor = strtolower($template['button_text_color'] ?? '#ffffff'); if (!array_key_exists($currentButtonBgColor, array_change_key_case($buttonBgPalette, CASE_LOWER))) { $currentButtonBgColor = '#0d6efd'; } if (!array_key_exists($currentButtonTextColor, array_change_key_case($buttonTextPalette, CASE_LOWER))) { $currentButtonTextColor = '#ffffff'; } ?> Edit Template <?= htmlspecialchars($titlewebsite, ENT_QUOTES, 'UTF-8'); ?>
Update Template

Edit the following form in order to update the selected import template

Mandatory Fields

  • Template Name
  • Source Type
  • Schema and Client
  • Row Header and Column Header only for XLS templates
Edit Template:
Choose the source used by this template
$colorLabel): ?>
$colorLabel): ?>

Cancel