{% extends 'base.html' %}
{% load widget_tweaks %}
{% load static %}

{% block content %}
<div class="container mt-5">
  <h2 class="mb-4">Register New Official</h2>
  <form method="post" enctype="multipart/form-data" class="card p-4 shadow-sm">
    {% csrf_token %}
    <div class="row g-3">
      {% for field in form %}
        <div class="col-md-6">
          <label class="form-label">{{ field.label }}</label>
          {% render_field field class="form-control" %}
          {% if field.errors %}
            <div class="text-danger small mt-1">{{ field.errors|striptags }}</div>
          {% endif %}
        </div>
      {% endfor %}
    </div>
    <div class="mt-4 text-end">
      <button type="submit" class="btn btn-success px-4">Submit</button>
    </div>
  </form>
</div>
{% endblock %}

