{% extends "base.html" %}

{% block title %}Site Added - Form Relay{% endblock %}

{% block content %}
<h1 style="margin-bottom:20px;">Site Added</h1>

<div class="card">
    <h3 style="margin-bottom:12px;">{{ site.name }}</h3>
    
    <div style="margin:16px 0;">
        <p><strong>Token:</strong> <span class="token" style="font-size:1.2em;padding:8px 12px;display:inline-block;margin:8px 0;">{{ site.token }}</span></p>
        <p style="color:#666;margin-top:8px;">This is the token your client site will use to POST form submissions.</p>
    </div>

    <div style="margin:16px 0;">
        <p><strong>Owner Email:</strong> {{ site.owner_email }}</p>
        <p><strong>From Email:</strong> {{ site.smtp_from or '(default)' }}</p>
    </div>

    <div style="margin:24px 0;padding:16px;background:#f8f8f8;border-radius:8px;">
        <h4 style="margin-bottom:8px;">Integration URL</h4>
        <p style="font-family:monospace;word-break:break-all;">
            {{ request.host_url }}api/submit?token={{ site.token }}
        </p>
        <p style="color:#666;margin-top:8px;">POST form data to this URL from your client site.</p>
    </div>

    <a href="/sites" class="btn">Back to Sites</a>
</div>
{% endblock %}