File size: 5,258 Bytes
0a40ab8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
{% extends "base.html" %}
{% block title %}Run Impact Analysis - PoliSage{% endblock %}
{% block content %}
<div class="container mt-4">
<h2>Run New Impact Analysis</h2>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<form method="POST" action="{{ url_for("analysis.run_analysis") }}">
<div class="mb-3">
<label for="document_type" class="form-label">Document Type <span class="text-danger">*</span></label>
<select class="form-select" id="document_type" name="document_type" required onchange="updateDocumentList()">
<option value="" disabled {% if not document_type %}selected{% endif %}>Select Type...</option>
<option value="Legislation" {% if document_type == "Legislation" %}selected{% endif %}>Legislation</option>
<option value="Draft" {% if document_type == "Draft" %}selected{% endif %}>Draft</option>
<option value="Amendment" {% if document_type == "Amendment" %}selected{% endif %}>Amendment</option>
</select>
</div>
<div class="mb-3">
<label for="document_id" class="form-label">Document <span class="text-danger">*</span></label>
<select class="form-select" id="document_id" name="document_id" required>
<option value="" disabled selected>Select Document Type First...</option>
<!-- Options will be populated by JavaScript -->
</select>
<div class="form-text">Choose the specific document to analyze.</div>
</div>
<div class="mb-3">
<label for="analysis_type" class="form-label">Analysis Type <span class="text-danger">*</span></label>
<select class="form-select" id="analysis_type" name="analysis_type" required>
<option value="" disabled {% if not analysis_type %}selected{% endif %}>Select Analysis Type...</option>
<option value="Societal" {% if analysis_type == "Societal" %}selected{% endif %}>Societal Impact</option>
<option value="Economic" {% if analysis_type == "Economic" %}selected{% endif %}>Economic Impact</option>
<option value="Environmental" {% if analysis_type == "Environmental" %}selected{% endif %}>Environmental Impact</option>
<option value="Overall" {% if analysis_type == "Overall" %}selected{% endif %}>Overall Impact</option>
</select>
<div class="form-text">Select the dimension of impact to analyze.</div>
</div>
<button type="submit" class="btn btn-primary">Run Analysis</button>
<a href="{{ url_for("analysis.list_analyses") }}" class="btn btn-secondary">Cancel</a>
</form>
</div>
{% endblock %}
{% block scripts_extra %}
<script>
</script>
{% endblock %}
|