<div class="container my-auto">
    <form method='POST'  action='/edit/{{ bloc.name }}' hx-swap="outerHTML" hx-target="#{{ bloc.name }}" enctype="multipart/form-data">
      {{ form.csrf_token }}
      <div class="row">
        <div class="col-lg-10 form-group mx-auto">
          {{ form.title(value=bloc.title,
          class="form-control form-control-lg text-center text-uppercase")
          }}
          {% for error in form.title.errors %}
          <span style="color: red;">{{ error }}</span>
          {% endfor %}
          <hr>
        </div>
        <div class="col-lg-8 form-group mx-auto">
         {% set f = form.text.process_data(bloc.text) %}
         <textarea class="form-control text-center" id="text" name="text"> {{ bloc.text }} </textarea> 
          {% for error in form.text.errors %}
          <span style="color: red;">{{ error }}</span>
          {% endfor %}
          <br/>
          <div class="col-lg-4 form-group mx-auto">
            {{ form.text_button(value=bloc.text_button,
            class="form-control text-center") }}
            {% for error in form.text_button.errors %}
            <span style="color: red;">
              {{ error }}</span>
	    {% endfor %}
	    <h4> cible du bouton </h4>
	    {{ form.link(value=bloc.link, class="form-control text-center") }}
	    <br />
          </div>
          <div class="col-lg-3 form-group mx-auto">
            {{ form.image(class="form-control" ) }}
          </div>
	  {{ form.submit(class="btn") }}
	  <button class="btn btn-danger" hx-get="/view/{{ bloc.name }}" hx-swap="outerHTML" hx-target="#{{ bloc.name }}" > Annuler </button>
        
        </div>
      </div>
    </form>
  </div>

