Added expert review/edit document
This commit is contained in:
56
backend/core/templates/admin/core/document/change_form.html
Normal file
56
backend/core/templates/admin/core/document/change_form.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends "admin/change_form.html" %}
|
||||
{% load i18n admin_urls static admin_list %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<style>
|
||||
/* Keep page within viewport and allow horizontal scroll for wide tables */
|
||||
.change-form { max-width: 100%; overflow-x: hidden; }
|
||||
.inline-group { overflow-x: auto; }
|
||||
.inline-group table { table-layout: fixed; width: 100%; }
|
||||
.inline-group table th, .inline-group table td { white-space: nowrap; }
|
||||
/* Make textareas fill width */
|
||||
textarea { width: 100% !important; min-height: 120px; }
|
||||
/* Adjust numeric inputs smaller */
|
||||
input[type=number] { width: 90px; }
|
||||
/* Make select boxes reasonable width */
|
||||
.related-widget-wrapper select, select { min-width: 260px; }
|
||||
.inline-action { margin: 8px 0 16px; }
|
||||
/* Green Save & Send button */
|
||||
.btn-save-send { background-color: #28a745 !important; border-color: #28a745 !important; color: #fff !important; }
|
||||
.btn-save-send:hover, .btn-save-send:focus { background-color: #218838 !important; border-color: #1e7e34 !important; color: #fff !important; }
|
||||
/* Hide labels (and colons) for regen action rows */
|
||||
.form-row.field-regen_controls_action label,
|
||||
.form-row.field-regen_keyfindings_action label,
|
||||
.form-row.field-regen_recommendations_action label { display: none; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2 style="margin-top:0">Review and Edit Document</h2>
|
||||
<p>Use the Regenerate buttons inside each section to update content. When ready, Save and Send.</p>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block submit_buttons_bottom %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{{ block.super }}
|
||||
<script>
|
||||
(function() {
|
||||
function addSaveSendButton() {
|
||||
document.querySelectorAll('.submit-row').forEach(function(row){
|
||||
var saveBtn = row.querySelector('input[name="_save"]');
|
||||
if (saveBtn && !row.querySelector('button[name="_save_send"]')) {
|
||||
saveBtn.insertAdjacentHTML('afterend', '\n<button type="submit" name="_save_send" class="button btn-save-send">Save and Send</button>');
|
||||
}
|
||||
});
|
||||
}
|
||||
addSaveSendButton();
|
||||
document.addEventListener('formset:added', addSaveSendButton);
|
||||
document.addEventListener('formset:removed', addSaveSendButton);
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
19
backend/core/templates/payment_expert_analysis.html
Normal file
19
backend/core/templates/payment_expert_analysis.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<section class="py-16 bg-secondary sm:py-24 p-body-full">
|
||||
<div class="max-w-lg w-full mx-auto text-center shadow-lg border border-success rounded-xl p-8 bg-white">
|
||||
<h2 class="text-3xl font-extrabold mb-4 text-success">Thank you.</h2>
|
||||
<p class="mb-8 text-gray-700 text-lg">
|
||||
Your report is awaiting expert analysis. We’ll deliver the final document to {{ email }} once the review is complete.
|
||||
</p>
|
||||
<a href="{% url 'core:index' %}" class="bg-transparent border-2 border-accent text-accent hover:bg-accent hover:text-primary font-semibold py-3 px-8 rounded-lg text-lg transition-all duration-300 ease-in-out">
|
||||
Go back to Homepage
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block bottom %}
|
||||
<script src="/static/js/formHandling.js"></script>
|
||||
{% endblock bottom %}
|
||||
@@ -1213,6 +1213,31 @@
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Expert Analysis -->
|
||||
<div class="mb-3 question basic-section" id="q25">
|
||||
<label class="form-label mt-3">
|
||||
Do u want to perform an expert analysis of your cybersecurity posture?
|
||||
<br>
|
||||
<small class="form-text text-muted">
|
||||
This will help identify gaps and provide tailored recommendations.
|
||||
</small>
|
||||
</label>
|
||||
<hr>
|
||||
<div class="pb-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="expert_analysis" id="expert-analysis-yes" value="true">
|
||||
<label class="form-check-label" for="expert-analysis-yes">
|
||||
<i class="fa-solid fa-magnifying-glass"></i> Yes, I want an expert analysis
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="expert_analysis" id="expert-analysis-no" value="false">
|
||||
<label class="form-check-label" for="expert-analysis-no">
|
||||
<i class="fa-solid fa-circle-xmark"></i> No, I don't need an expert analysis
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end mt-4">
|
||||
<button type="button" class="btn btn-lg btn-outline-secondary me-3" id="back">Back</button>
|
||||
|
||||
Reference in New Issue
Block a user