{% load widget_tweaks %}

<form enctype="multipart/form-data" method="post" action="">
  {% csrf_token %}

  <div class="modal-header">
    <h3 class="modal-title">Update Satellite</h3>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>

  <div class="modal-body">
    <div class="{% if form.non_field_errors %}invalid{% endif %} mb-2">
      {% for error in form.non_field_errors %}
        {{ error }}
      {% endfor %}
    </div>

    {% for field in form %}
      <div class="input-group my-1">
          <label class="input-group-prepend input-group-text" for="{{ field.id_for_label }}">{{ field.label }}</label>
          {% render_field field class="form-control" placeholder=field.label %}
          <div class="{% if field.errors %} invalid{% endif %}">
              {% for error in field.errors %}
              <p class="help-block">{{ error }}</p>
              {% endfor %}
          </div>
      </div>
      {% endfor %}
  </div>

  <div class="modal-footer">
    <button type="button" class="submit-btn btn btn-satnogs-primary">Update</button>
  </div>

</form>
