Add ability to edit exercise name from new dropdown, still WIP as I need to handle exercise selection and make it a component
This commit is contained in:
16
templates/partials/exercise/edit_exercise_name.html
Normal file
16
templates/partials/exercise/edit_exercise_name.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<li class="py-2 px-4 flex items-center justify-between">
|
||||
<!-- Input Field -->
|
||||
<input type="text" name="name" value="{{ exercise.name }}"
|
||||
class="w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-2 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
|
||||
_="on click from me call event.stopPropagation()">
|
||||
<!-- Save Icon -->
|
||||
<button hx-post="{{ url_for('edit_exercise_name', exercise_id=exercise.exercise_id) }}" hx-target="closest li"
|
||||
hx-swap="outerHTML" hx-include="closest li" class="text-gray-500 hover:text-gray-700 ml-2"
|
||||
_="on click from me call event.stopPropagation()">
|
||||
<!-- Tick icon SVG -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"
|
||||
stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
Reference in New Issue
Block a user