Files
lifeos-dev/templates/processes_form.html

58 lines
2.7 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="{{ '/processes/' ~ item.id ~ '/edit' if item else '/processes/create' }}">
<div class="form-grid">
<div class="form-group full-width">
<label class="form-label">Name *</label>
<input type="text" name="name" class="form-input" required
value="{{ item.name if item else '' }}">
</div>
<div class="form-group full-width">
<label class="form-label">Description</label>
<textarea name="description" class="form-textarea" rows="3">{{ item.description if item and item.description else '' }}</textarea>
</div>
<div class="form-group">
<label class="form-label">Type</label>
<select name="process_type" class="form-select">
<option value="checklist" {{ 'selected' if item and item.process_type == 'checklist' }}>Checklist</option>
<option value="workflow" {{ 'selected' if item and item.process_type == 'workflow' }}>Workflow</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Status</label>
<select name="status" class="form-select">
<option value="draft" {{ 'selected' if item and item.status == 'draft' }}>Draft</option>
<option value="active" {{ 'selected' if item and item.status == 'active' }}>Active</option>
<option value="archived" {{ 'selected' if item and item.status == 'archived' }}>Archived</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Category</label>
<input type="text" name="category" class="form-input" placeholder="e.g. Onboarding, Publishing..."
value="{{ item.category if item and item.category else '' }}">
</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 'Create Process' }}</button>
<a href="{{ '/processes/' ~ item.id if item else '/processes' }}" class="btn btn-secondary">Cancel</a>
</div>
</form>
</div>
{% endblock %}