Remove update button on edit start workout date form
This commit is contained in:
@@ -6,28 +6,26 @@
|
|||||||
Edit
|
Edit
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="relative">
|
<div class="flex">
|
||||||
<div class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
|
<div class="relative">
|
||||||
<svg aria-hidden="true" class="w-5 h-5 text-gray-500 dark:text-gray-400" fill="currentColor" viewBox="0 0 20 20"
|
<div class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
<svg aria-hidden="true" class="w-5 h-5 text-gray-500 dark:text-gray-400" fill="currentColor"
|
||||||
<path fill-rule="evenodd"
|
viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||||
d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"
|
<path fill-rule="evenodd"
|
||||||
clip-rule="evenodd"></path>
|
d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"
|
||||||
</svg>
|
clip-rule="evenodd"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<input type="date"
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 w-full"
|
||||||
|
name="start-date" value="{{ start_date }}"
|
||||||
|
hx-put="{{ url_for('update_workout_start_date', person_id=person_id, workout_id=workout_id) }}">
|
||||||
</div>
|
</div>
|
||||||
<input type="date"
|
|
||||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 w-full"
|
|
||||||
name="start-date" value="{{ start_date }}">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="text-sm font-medium text-cyan-600 hover:bg-gray-100 rounded-lg inline-flex items-center p-2 cursor-pointer"
|
<a hx-get="{{ url_for('get_workout_start_date', person_id=person_id, workout_id=workout_id) }}"
|
||||||
hx-put="{{ url_for('update_workout_start_date', person_id=person_id, workout_id=workout_id) }}"
|
hx-target="#edit-start-date"
|
||||||
hx-include="[name='start-date']">
|
class="text-sm font-medium text-cyan-600 hover:bg-gray-100 rounded-lg inline-flex items-center p-2 cursor-pointer">
|
||||||
Update
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
<a hx-get="{{ url_for('get_workout_start_date', person_id=person_id, workout_id=workout_id) }}"
|
</div>
|
||||||
hx-target="#edit-start-date"
|
|
||||||
class="text-sm font-medium text-cyan-600 hover:bg-gray-100 rounded-lg inline-flex items-center p-2 cursor-pointer">
|
|
||||||
Cancel
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Reference in New Issue
Block a user