{% extends "layout.html" %}

{% block content %}
<div class="admin-container">
    <h1>System Settings</h1>
    
    <form method="POST" action="{{ url_for('admin_settings') }}">
        <div class="settings-card">
            <h2>Registration Settings</h2>
            
            <div class="form-group">
                <label class="checkbox-container">
                    <input type="checkbox" name="registration_enabled" 
                           {% if settings.registration_enabled %}checked{% endif %}>
                    <span class="checkmark"></span>
                    Enable User Registration
                </label>
                <p class="setting-description">
                    When enabled, new users can register accounts. When disabled, only administrators can create new accounts.
                </p>
            </div>
            
            <div class="form-group">
                <label class="checkbox-container">
                    <input type="checkbox" name="email_verification_required" 
                           {% if settings.email_verification_required %}checked{% endif %}>
                    <span class="checkmark"></span>
                    Require Email Verification
                </label>
                <p class="setting-description">
                    When enabled, new users must verify their email address before accessing the application. When disabled, new users can log in immediately after registration.
                </p>
            </div>
        </div>
        
        <div class="form-actions">
            <button type="submit" class="btn btn-primary">Save Settings</button>
        </div>
    </form>
</div>
{% endblock %}