{% extends "modal_base.html" %}

{% block form_attributes %}
hx-patch="/content/{{text_content.id}}"
hx-target="#text_content_cards"
hx-swap="outerHTML"
{% endblock %}

{% block modal_content %}
<h3 class="text-lg font-bold ">Edit Content</h3>
<div class="form-control">
  <label class="floating-label">
    <span class="label-text">Instructions</span>
    <input type="text" name="name" value="{{ text_content.instructions}}" class="w-full input input-bordered">
  </label>
</div>

<div class="form-control ">
  <label class="floating-label">
    <span class="label-text">Category</span>
    <input type="text" name="name" value="{{ text_content.category}}" class="w-full input input-bordered">
  </label>
</div>

<input type="text" name="id" value="{{ text_content.id }}" class="hidden">

<div class="form-control">
  <label class="floating-label">
    <span class="label-text">Text</span>
    <textarea name="description" class="textarea textarea-bordered h-32 w-full">{{ text_content.text}}</textarea>
  </label>
</div>
{% endblock %}

{% block primary_actions %}
<button type="submit" class="btn btn-primary">
  Save Changes
</button>
{% endblock %}