87 lines
4.2 KiB
HTML
87 lines
4.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<h1 class="page-title">{{ page_title }}</h1>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<form method="post" action="{{ '/decisions/' ~ item.id ~ '/edit' if item else '/decisions/create' }}">
|
|
<div class="form-grid">
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Title *</label>
|
|
<input type="text" name="title" class="form-input" required
|
|
value="{{ item.title if item else '' }}" placeholder="Summary of the decision...">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Status</label>
|
|
<select name="status" class="form-select">
|
|
<option value="proposed" {{ 'selected' if (item and item.status == 'proposed') or not item }}>Proposed</option>
|
|
<option value="accepted" {{ 'selected' if item and item.status == 'accepted' }}>Accepted</option>
|
|
<option value="rejected" {{ 'selected' if item and item.status == 'rejected' }}>Rejected</option>
|
|
<option value="superseded" {{ 'selected' if item and item.status == 'superseded' }}>Superseded</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Impact</label>
|
|
<select name="impact" class="form-select">
|
|
<option value="low" {{ 'selected' if item and item.impact == 'low' }}>Low</option>
|
|
<option value="medium" {{ 'selected' if (item and item.impact == 'medium') or not item }}>Medium</option>
|
|
<option value="high" {{ 'selected' if item and item.impact == 'high' }}>High</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Decision Date</label>
|
|
<input type="date" name="decided_at" class="form-input"
|
|
value="{{ item.decided_at if item and item.decided_at else '' }}">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Meeting</label>
|
|
<select name="meeting_id" class="form-select">
|
|
<option value="">None</option>
|
|
{% for m in meetings %}
|
|
<option value="{{ m.id }}"
|
|
{{ 'selected' if (item and item.meeting_id and item.meeting_id|string == m.id|string) or (not item and prefill_meeting_id == m.id|string) }}>
|
|
{{ m.title }} ({{ m.meeting_date }})
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
{% if item and other_decisions is defined %}
|
|
<div class="form-group">
|
|
<label class="form-label">Superseded By</label>
|
|
<select name="superseded_by_id" class="form-select">
|
|
<option value="">None</option>
|
|
{% for d in other_decisions %}
|
|
<option value="{{ d.id }}" {{ 'selected' if item.superseded_by_id and item.superseded_by_id|string == d.id|string }}>
|
|
{{ d.title }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Rationale</label>
|
|
<textarea name="rationale" class="form-textarea" rows="6" placeholder="Why was this decided? What alternatives were considered?">{{ item.rationale if item and item.rationale else '' }}</textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Tags</label>
|
|
<input type="text" name="tags" class="form-input" placeholder="tag1, tag2, ..."
|
|
value="{{ item.tags|join(', ') if item and item.tags else '' }}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">{{ 'Save Changes' if item else 'Record Decision' }}</button>
|
|
<a href="{{ '/decisions/' ~ item.id if item else '/decisions' }}" class="btn btn-secondary">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|