2022-02-21 12:04:13 +00:00
|
|
|
{% extends "ereuse_devicehub/base_site.html" %}
|
|
|
|
{% block main %}
|
|
|
|
|
|
|
|
<div class="pagetitle">
|
|
|
|
<h1>{{ title }}</h1>
|
|
|
|
<nav>
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<!-- TODO@slamora replace with lot list URL when exists -->
|
|
|
|
<li class="breadcrumb-item"><a href="#TODO-lot-list">Lots</a></li>
|
|
|
|
<li class="breadcrumb-item">Trade Document</li>
|
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div><!-- End Page Title -->
|
|
|
|
|
|
|
|
<section class="section profile">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xl-4">
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<div class="pt-4 pb-2">
|
|
|
|
<h5 class="card-title text-center pb-0 fs-4">{{ title }}</h5>
|
|
|
|
{% if form.form_errors %}
|
|
|
|
<p class="text-danger">
|
|
|
|
{% for error in form.form_errors %}
|
|
|
|
{{ error }}<br/>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2023-03-29 11:40:27 +00:00
|
|
|
{% if form._obj %}
|
|
|
|
<form action="{{ url_for('inventory.transfer_document_edit', lot_id=form._lot.id, doc_id=form._obj.id) }}" method="post"
|
2022-02-21 12:04:13 +00:00
|
|
|
class="row g-3 needs-validation" enctype="multipart/form-data">
|
2023-03-29 11:40:27 +00:00
|
|
|
{% else %}
|
|
|
|
<form action="{{ url_for('inventory.transfer_document_add', lot_id=form._lot.id) }}" method="post"
|
|
|
|
class="row g-3 needs-validation" enctype="multipart/form-data">
|
|
|
|
{% endif %}
|
2022-02-21 12:04:13 +00:00
|
|
|
{{ form.csrf_token }}
|
|
|
|
{% for field in form %}
|
|
|
|
{% if field != form.csrf_token %}
|
2022-03-04 17:50:47 +00:00
|
|
|
<div>
|
2022-02-21 12:04:13 +00:00
|
|
|
{{ field.label(class_="form-label") }}
|
|
|
|
{{ field }}
|
|
|
|
<small class="text-muted">{{ field.description }}</small>
|
2022-02-28 12:33:03 +00:00
|
|
|
{% if field.errors %}
|
2022-02-21 12:04:13 +00:00
|
|
|
<p class="text-danger">
|
|
|
|
{% for error in field.errors %}
|
|
|
|
{{ error }}<br/>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
2022-02-28 12:33:03 +00:00
|
|
|
{% endif %}
|
2022-02-21 12:04:13 +00:00
|
|
|
</div>
|
2022-02-28 12:33:03 +00:00
|
|
|
{% endif %}
|
2022-02-21 12:04:13 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
2022-03-04 17:50:47 +00:00
|
|
|
<div>
|
2022-03-15 13:33:27 +00:00
|
|
|
<a href="{{ url_for('inventory.lotdevicelist', lot_id=form._lot.id) }}" class="btn btn-danger">Cancel</a>
|
2022-02-21 12:04:13 +00:00
|
|
|
<button class="btn btn-primary" type="submit">Save</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endblock main %}
|