<div class="modal fade mt-4" id="myModalForm" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="myModalLabel">Add New Image for the Post</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <form method="post" action="{% url 'job_image_upload' job.slug %}" enctype="multipart/form-data" >
          {% csrf_token %}
          {{ image_upload_form.as_p}}
        
    {% if image_upload_form.instance.post_image %}
        <p>Current Image:</p>
        <img src="{{ image_upload_form.instance.post_image.url }}" alt="Post Image" style="max-width: 200px;">
    {% endif %}
         <div class="modal-footer mt-2">
            <button type="button" class="btn  btn-lg btn-secondary" data-bs-dismiss="modal">Close</button>
            <button type="submit" class="btn btn-main-action ">Save changes</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

