154 lines
7.1 KiB
HTML
154 lines
7.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="breadcrumb">
|
|
<a href="/capture">Capture</a> <span class="sep">/</span> Convert to {{ type_label }}
|
|
</div>
|
|
|
|
<div class="page-header">
|
|
<h1 class="page-title">Convert to {{ type_label }}</h1>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<!-- Original text -->
|
|
<div class="form-group mb-3">
|
|
<label class="form-label">Original Text</label>
|
|
<div style="padding:10px 12px;background:var(--surface2);border-radius:var(--radius);font-size:0.92rem;color:var(--text-secondary)">{{ item.raw_text }}</div>
|
|
</div>
|
|
|
|
<form action="/capture/{{ item.id }}/to-{{ convert_type }}" method="post">
|
|
<div class="form-grid">
|
|
|
|
{% if convert_type == 'task' %}
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Title</label>
|
|
<input type="text" name="title" class="form-input" value="{{ item.raw_text }}" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Domain *</label>
|
|
<select name="domain_id" class="form-select" required>
|
|
{% for d in sidebar.domain_tree %}
|
|
<option value="{{ d.id }}">{{ d.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Project</label>
|
|
<select name="project_id" class="form-select">
|
|
<option value="">None</option>
|
|
{% for d in sidebar.domain_tree %}
|
|
<optgroup label="{{ d.name }}">
|
|
{% for a in d.areas %}{% for p in a.projects %}
|
|
<option value="{{ p.id }}" {{ 'selected' if item.project_id and p.id|string == item.project_id|string }}>{{ p.name }}</option>
|
|
{% endfor %}{% endfor %}
|
|
{% for p in d.standalone_projects %}
|
|
<option value="{{ p.id }}" {{ 'selected' if item.project_id and p.id|string == item.project_id|string }}>{{ p.name }}</option>
|
|
{% endfor %}
|
|
</optgroup>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Priority</label>
|
|
<select name="priority" class="form-select">
|
|
<option value="1">1 - Critical</option>
|
|
<option value="2">2 - High</option>
|
|
<option value="3" selected>3 - Normal</option>
|
|
<option value="4">4 - Low</option>
|
|
</select>
|
|
</div>
|
|
|
|
{% elif convert_type == 'note' %}
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Title</label>
|
|
<input type="text" name="title" class="form-input" value="{{ item.raw_text[:100] }}" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Domain</label>
|
|
<select name="domain_id" class="form-select">
|
|
<option value="">None</option>
|
|
{% for d in sidebar.domain_tree %}
|
|
<option value="{{ d.id }}">{{ d.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Project</label>
|
|
<select name="project_id" class="form-select">
|
|
<option value="">None</option>
|
|
{% for d in sidebar.domain_tree %}
|
|
<optgroup label="{{ d.name }}">
|
|
{% for a in d.areas %}{% for p in a.projects %}
|
|
<option value="{{ p.id }}" {{ 'selected' if item.project_id and p.id|string == item.project_id|string }}>{{ p.name }}</option>
|
|
{% endfor %}{% endfor %}
|
|
{% for p in d.standalone_projects %}
|
|
<option value="{{ p.id }}" {{ 'selected' if item.project_id and p.id|string == item.project_id|string }}>{{ p.name }}</option>
|
|
{% endfor %}
|
|
</optgroup>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
{% elif convert_type == 'project' %}
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Project Name</label>
|
|
<input type="text" name="name" class="form-input" value="{{ item.raw_text }}" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Domain *</label>
|
|
<select name="domain_id" class="form-select" required>
|
|
{% for d in sidebar.domain_tree %}
|
|
<option value="{{ d.id }}">{{ d.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
{% elif convert_type == 'list_item' %}
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Content</label>
|
|
<input type="text" name="content" class="form-input" value="{{ item.raw_text }}" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Add to List *</label>
|
|
<select name="list_id" class="form-select" required>
|
|
{% for lst in all_lists %}
|
|
<option value="{{ lst.id }}" {{ 'selected' if item.list_id and lst.id|string == item.list_id|string }}>{{ lst.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
{% elif convert_type == 'contact' %}
|
|
<div class="form-group">
|
|
<label class="form-label">First Name *</label>
|
|
<input type="text" name="first_name" class="form-input" value="{{ first_name }}" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Last Name</label>
|
|
<input type="text" name="last_name" class="form-input" value="{{ last_name }}">
|
|
</div>
|
|
|
|
{% elif convert_type == 'decision' %}
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Decision Title</label>
|
|
<input type="text" name="title" class="form-input" value="{{ item.raw_text }}" required>
|
|
</div>
|
|
|
|
{% elif convert_type == 'link' %}
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Label</label>
|
|
<input type="text" name="label" class="form-input" value="{{ prefill_label }}" required>
|
|
</div>
|
|
<div class="form-group full-width">
|
|
<label class="form-label">URL</label>
|
|
<input type="url" name="url" class="form-input" value="{{ prefill_url }}" placeholder="https://" required>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">Convert to {{ type_label }}</button>
|
|
<a href="/capture" class="btn btn-secondary">Cancel</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|