46 lines
2.0 KiB
HTML
46 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">編輯記錄</h5>
|
|
<form method="POST" class="mt-3">
|
|
<div class="mb-3">
|
|
<label for="date" class="form-label">日期</label>
|
|
<input type="date"
|
|
class="form-control"
|
|
id="date"
|
|
name="date"
|
|
value="{{ record.date.strftime('%Y-%m-%d') }}"
|
|
required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="start_time" class="form-label">開始時間</label>
|
|
<input type="time"
|
|
class="form-control"
|
|
id="start_time"
|
|
name="start_time"
|
|
value="{{ record.start_time.strftime('%H:%M') }}"
|
|
required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="end_time" class="form-label">結束時間</label>
|
|
<input type="time"
|
|
class="form-control"
|
|
id="end_time"
|
|
name="end_time"
|
|
value="{{ record.end_time.strftime('%H:%M') }}"
|
|
required>
|
|
</div>
|
|
<div class="d-flex justify-content-between">
|
|
<a href="{{ url_for('index') }}" class="btn btn-secondary">取消</a>
|
|
<button type="submit" class="btn btn-primary">更新記錄</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|