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

{% block base %}
<style>
    {# TODO: Remove inline styling. #}
    .container.narrow {
      max-width: 950px;
    }
</style>

<div class="container">
    <div class="col-1-1">
        <h1>Hello {{user.email}}</h1>

        <p><a href="/logout">logout</a></p>
    </div>

    <hr />

    <div class="col-1-1">
        <h2>Your Forms</h2>

        <table>
            <thead>
                <tr>
                    <th>Origin</th>
                    <th>Status</th>
                    <th>Email</th>
                    <th>Submissions</th>
                </tr>
            </thead>
            <tbody>
            {% for form in user.forms.all() %}
              <tr>
                <td>{{ form.host }}</td>
                <td>{{ form.status }}</td>
                <td>{{ form.email }}</td>
                <td>{{ form.counter }}</td>
              </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

    <hr />

    <div class="col-1-1">
        <h2>New Form</h2>
        <form method="POST" action="">
            <label>
                Send email to:
                <input type="email" name="email" placeholder="johnny@example.com" />
            </label>
            <input type="submit" value="Create" />
        </form>
    </div>
</div>




{% endblock %}

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

{% block base %}
<style>
    {# TODO: Remove inline styling. #}
    .container.narrow {
      max-width: 950px;
    }
</style>

<div class="container">
    <div class="col-1-1">
        <h1>Hello {{user.email}}</h1>

        <p><a href="/logout">logout</a></p>
    </div>

    <hr />

    <div class="col-1-1">
        <h2>Your Forms</h2>

        <table>
            <thead>
                <tr>
                    <th>Origin</th>
                    <th>Status</th>
                    <th>Email</th>
                    <th>Submissions</th>
                </tr>
            </thead>
            <tbody>
            {% for form in user.forms.all() %}
              <tr>
                <td>{{ form.host }}</td>
                <td>{{ form.status }}</td>
                <td>{{ form.email }}</td>
                <td>{{ form.counter }}</td>
              </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

    <hr />

    {% if user.upgraded %}
        <div class="col-1-1">
            <h2>New Form</h2>
            <form method="POST" action="{{ url_for('forms-api') }}">
                <label>
                    Send email to:
                    <input type="email" name="email" placeholder="johnny@example.com" />
                </label>
                <input type="submit" value="Create" />
            </form>
        </div>
    {% else %}
      Please upgrade your account in order to create new forms.
    {% endif %}
</div>




{% endblock %}

Verify if user upgraded, display message otherwise
Verify if user upgraded, display message otherwise
