42 lines
1.9 KiB
HTML
42 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
Edit court: {{ item.id }}
|
|
{% endblock title %}
|
|
|
|
{% block page_title %}
|
|
Edit court: {{ item.id }}
|
|
{% endblock page_title %}
|
|
|
|
{% block content %}
|
|
<div class="mb-10">
|
|
<form action="/courts/{{ item.id }}" method="post" class="flex-1 lg:max-w-2xl">
|
|
<div class="space-y-2">
|
|
<label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for=":r2l:-form-item">name</label>
|
|
<input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm md:text-sm" id="name" name="name" type="text" value="{{item.name}}" />
|
|
</div>
|
|
<div class="space-y-2">
|
|
<label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for=":r2l:-form-item">surface</label>
|
|
<input class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm md:text-sm" id="surface" name="surface" type="text" value="{{item.surface}}" />
|
|
</div>
|
|
<div class="space-y-2">
|
|
<label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for=":r2l:-form-item">indoor</label>
|
|
<input class="flex rounded-md border border-input bg-transparent text-base shadow-sm md:text-sm" id="indoor" name="indoor" type="checkbox" value="true" {% if item.indoor %}checked{%endif %} />
|
|
</div>
|
|
<div>
|
|
<div class="mt-5">
|
|
<button class=" text-xs py-3 px-6 rounded-lg bg-gray-900 text-white" type="submit">Submit</button>
|
|
<button class="text-xs py-3 px-6 rounded-lg bg-red-600 text-white"
|
|
onclick="confirmDelete(event, '/courts/{{ item.id }}', '/courts' )">Delete</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div id="success-message" class="mt-4"></div>
|
|
<br />
|
|
<a href="/courts">Back to court</a>
|
|
</div>
|
|
{% endblock content %}
|
|
|
|
{% block js %}
|
|
|
|
{% endblock js %} |