74 lines
2.8 KiB
HTML
74 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}New Ticket{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<h1>Create New Ticket</h1>
|
|
</div>
|
|
|
|
<div class="form-container">
|
|
{% if error %}
|
|
<div class="alert alert-error">{{ error }}</div>
|
|
{% endif %}
|
|
|
|
<form method="post" class="ticket-form">
|
|
<div class="form-group">
|
|
<label for="title">Title <span class="required">*</span></label>
|
|
<input type="text" id="title" name="title" class="input"
|
|
value="{{ ticket.title if ticket else '' }}" required autofocus
|
|
placeholder="Brief summary of the issue">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="description">Description</label>
|
|
<textarea id="description" name="description" class="input" rows="6"
|
|
placeholder="Detailed description of the issue...">{{ ticket.description if ticket else '' }}</textarea>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="priority">Priority</label>
|
|
<select id="priority" name="priority" class="input">
|
|
{% for val, label in priorities %}
|
|
<option value="{{ val }}" {% if ticket and ticket.priority.value == val %}selected{% endif %}>
|
|
{{ label }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="status">Status</label>
|
|
<select id="status" name="status" class="input">
|
|
{% for val, label in statuses %}
|
|
<option value="{{ val }}" {% if ticket and ticket.status.value == val %}selected{% elif val == 'open' %}selected{% endif %}>
|
|
{{ label }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="assignee">Assignee</label>
|
|
<input type="text" id="assignee" name="assignee" class="input"
|
|
value="{{ ticket.assignee if ticket else '' }}"
|
|
placeholder="Who is responsible?">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="project">Project / Tool</label>
|
|
<input type="text" id="project" name="project" class="input"
|
|
value="{{ ticket.project if ticket else '' }}"
|
|
placeholder="e.g. CLI, Web, API">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<a href="{{ url_for('index') }}" class="btn btn-ghost">Cancel</a>
|
|
<button type="submit" class="btn btn-primary">Create Ticket</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|
|
|