From d13ce073102bc92ca08807c0a491b94da511784a Mon Sep 17 00:00:00 2001 From: James <james2.burt@live.uwe.ac.uk> Date: Sun, 30 Mar 2025 20:08:21 +0100 Subject: [PATCH] frontend changes --- .../templates/modelForms/deleteRecord.html | 102 ++---------------- 1 file changed, 9 insertions(+), 93 deletions(-) diff --git a/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html b/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html index 63ef563..9dcaffb 100644 --- a/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html +++ b/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html @@ -1,102 +1,18 @@ <!DOCTYPE html> -<html lang="en"> +<html> <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Delete Record</title> - <style> - /* General Styles */ - body { - font-family: Arial, sans-serif; - background-color: #f4f4f4; - color: #333; - margin: 0; - padding: 0; - line-height: 1.5; - } - .container { - max-width: 600px; - margin: 50px auto; - background: #ffffff; - padding: 20px; - border-radius: 8px; - box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); - text-align: center; - } - - h1 { - color: #dc3545; - font-size: 24px; - margin-bottom: 20px; - } - - p { - font-size: 16px; - margin-bottom: 20px; - } - - /* Warning Box Styles */ - .warning-box { - border: 2px solid #dc3545; - background-color: #f8d7da; - color: #721c24; - padding: 20px; - border-radius: 8px; - margin-bottom: 20px; - } - - /* Button Styles */ - .btn { - display: inline-block; - font-weight: bold; - text-decoration: none; - border-radius: 5px; - padding: 10px 16px; - color: #fff; - background-color: #007bff; - border: none; - text-align: center; - cursor: pointer; - font-size: 16px; - margin: 10px 5px; - } - - .btn:hover { - background-color: #0056b3; - } - - .btn-danger { - background-color: #dc3545; - } - - .btn-danger:hover { - background-color: #b21f2d; - } - - .btn-secondary { - background-color: #6c757d; - } - - .btn-secondary:hover { - background-color: #5a6268; - } - </style> </head> <body> - <div class="container"> - <h1>Delete Confirmation</h1> - <div class="warning-box"> - <p>Are you sure you want to delete this record? This action cannot be undone.</p> - </div> + <p> Are you sure you want to delete this record? </p> + +<form action="{% url 'deleteRecord' record.id %}" method="POST"> + {% csrf_token %} + <p><a href="{% url 'interactionView' %}">Go Back</a></p> + <input type="submit" name="confirm"> + +</form> - <!-- Form to handle deletion --> - <form method="post"> - {% csrf_token %} - <button type="submit" class="btn btn-danger">Yes, Delete</button> - <a href="{% url 'back_to_dashboard' %}" class="btn btn-secondary">Cancel</a> - </form> - </div> </body> </html> \ No newline at end of file -- GitLab