{% extends 'rewards/base.html' %}

{% load crispy_forms_tags %}

{% block content %}
    <h2 class="pinboard-new-goal">New goal</h2>
    {% crispy form %}

    <h2 class="pinboard-manage-goals">Manage your goals</h2>

    <div class="manage-goals">
    {% for obj in object_list %}
        <div class="goal-item">
            <h3>{{ obj.name }}</h3>
            <span class="goal-target">{{ obj.target }}</span>
            <form action="{% url reward_delete_goal obj.pk %}" method="post" class="add-goal-form">
            {% crispy delete_form %}
            </form>
        </div>
    {% endfor %}
    </div>

    <h2 class="pinboard-my-achievements">Manage your achievements</h2>

    <div class="manage-goals">
    {% for obj in achievement_list %}
        <div class="goal-item">
            <h3>{{ obj.name }}</h3>
            <span class="goal-target">{{ obj.target }}</span>
            <form action="{% url reward_delete_goal obj.pk %}" method="post" class="add-goal-form">
            {% crispy delete_form %}
            </form>
        </div>
    {% endfor %}
    </div>
{% endblock %}
