inventory/templates/worklog.html

100 lines
No EOL
4.4 KiB
HTML

<!-- templates/worklog.html -->
{% extends "layout.html" %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<nav>
<form action="POST">
{{ breadcrumbs.breadcrumb_header(
breadcrumbs=[
{'label': 'Work Log', 'url': url_for('main.list_worklog')}
],
title=title,
save_button=True
) }}
<div class="container">
<div class="row">
<div class="col-6">
<label for="start" class="form-label">Start Timestamp</label>
<input type="date" class="form-control" name="start" placeholder="-"
value="{{ log.start_time.date().isoformat() if log.start_time }}">
</div>
<div class="col-6">
<label for="end" class="form-label">End Timestamp</label>
<input type="date" class="form-control" name="end" placeholder="-"
value="{{ log.end_time.date().isoformat() if log.end_time }}">
</div>
</div>
<div class="row">
<div class="col-4">
<label for="contact" class="form-label">
Contact
{% if log.contact_id %}
{{ links.entry_link('user', log.contact_id) }}
{% endif %}
</label>
<select class="form-select" name="contact" id="contact">
<option>-</option>
{% for contact in users %}
<option data-id="{{ contact.id }}" value="{{ contact.full_name }}"{% if contact.id == log.contact_id %} selected{% endif %}>{{ contact.full_name }}
</option>
{% endfor %}
</select>
</div>
<div class="col-4">
<label for="item" class="form-label">
Work Item
{% if log.work_item_id %}
{{ links.entry_link('inventory_item', log.work_item_id) }}
{% endif %}
</label>
<select id="item" name="item" class="form-select">
<option>-</option>
{% for item in items %}
<option data-id="{{ item.id }}" value="{{ item.identifier }}"{% if item.id == log.work_item_id %} selected{% endif %}>{{ item.identifier }}</option>
{% endfor %}
</select>
</div>
<div class="col-4">
<div class="row">
<div class="col">
<input type="checkbox" id="complete" class="form-check-input" {% if log.complete %}checked{%
endif %}>
<label for="complete" class="form-check-label">
Complete?
</label>
</div>
</div>
<div class="row">
<div class="col">
<input type="checkbox" id="followup" class="form-check-input" {% if log.followup %}checked{%
endif %}>
<label for="followup" class="form-check-label">
Follow Up?
</label>
</div>
</div>
<div class="row">
<div class="col">
<input type="checkbox" id="analysis" class="form-check-input" {% if log.analysis %}checked{%
endif %}>
<label for="analysis" class="form-check-label">
Quick Analysis?
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<label for="notes" class="form-label">Notes</label>
<textarea name="notes" id="notes" class="form-control"
rows="15">{{ log.notes if log.notes else '' }}</textarea>
</div>
</div>
</div>
</nav>
</form>
{% endblock %}