<%= tmpl( 'tpl_settings_tab', { data : { activeTab : 'premium' } } ) %>

<div class="row">
    <div class="col-md-12">
        <h3>Premium Paket</h3>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        Bearbeiten
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <h4>Gebuchtes Paket</h4>
                <h3>
                    <label class="label label-premium"><%= TB.Premium.getName( data.premium_log.package_id ) %> <i class="glyphicon glyphicon-star"></i></label> <% if ( data.premium_log.status !== 'CANCELLED' ) { %><small><button data-id="btn-cancel-subscription" data-id="data.premium_log.id" class="btn-link">Premium stornieren</button></small><% }  %>
                </h3>
                <h4>Team</h4>
                <h3>
                    <%= data.team.display_name %>
                </h3>
                <h4>Rechnungsempfänger</h4>
                <form role="form" method="post" id="form_billing_address">
                    <input type="hidden" name="id" value="<%= data.team.id %>" />
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="company_name">Firma (optional)</label>
                                <input type="text"
                                       id="company_name"
                                       name="company_name"
                                       placeholder="Firmenname (ggf. Sponsor)"
                                       value="<%= data.premium_log.billing_company_name %>"
                                       class="form-control"
                                />
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="tax_id">Steuernummer (optional)</label>
                                <input type="text"
                                       id="tax_id"
                                       name="tax_id"
                                       placeholder="Steuernummer oder -ID"
                                       value="<%= data.premium_log.billing_company_tax_id %>"
                                       class="form-control"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="first_name">Vorname</label>
                                <input type="text"
                                       id="first_name"
                                       name="first_name"
                                       placeholder="Vorname"
                                       value="<%= data.premium_log.billing_first_name %>"
                                       class="form-control"
                                       data-validate="required"
                                       data-validate-errormsg="Bitte den Vornamen angeben."
                                />
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="last_name">Nachname</label>
                                <input type="text"
                                       id="last_name"
                                       name="last_name"
                                       placeholder="Nachname"
                                       value="<%= data.premium_log.billing_last_name %>"
                                       class="form-control"
                                       data-validate="required"
                                       data-validate-errormsg="Bitte den Nachnamen angeben."
                                />
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="street">Straße</label>
                                <input type="text"
                                       name="street"
                                       id="street"
                                       placeholder="Straße und Hausnummer"
                                       value="<%= data.premium_log.billing_street %>"
                                       class="form-control"
                                       data-validate="required"
                                       data-validate-errormsg="Bitte Straße und Hausnummer angeben."
                                />
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group">
                                <label for="zip_code">PLZ</label>
                                <input type="text"
                                       name="zip_code"
                                       id="zip_code"
                                       placeholder="PLZ"
                                       value="<%= data.premium_log.billing_zip %>"
                                       class="form-control"
                                       data-validate="required"
                                       data-validate-errormsg="Bitte Postleitzahl angeben."
                                />
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="form-group">
                                <label for="city">Ort</label>
                                <input type="text"
                                       name="city"
                                       id="city"
                                       placeholder="Ort"
                                       class="form-control"
                                       value="<%= data.premium_log.billing_city %>"
                                       data-validate="required"
                                       data-validate-errormsg="Bitte den Ort angeben."
                                />
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="email">Email</label>
                                <input type="text"
                                       id="email"
                                       name="email"
                                       value="<%= data.premium_log.billing_email %>"
                                       placeholder="Email vom Rechnungsempfänger"
                                       class="form-control"
                                       data-validate="email"
                                       data-validate-errormsg="Bitte korrekte Email Adresse eingeben."
                                />
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6 col-sm-12">
        <a href="<%= TB.Controller.getUrl( 'Settings', 'premium' ) %>"
           class="btn btn-primary btn-block">
            Zurück
        </a>
    </div>
    <div class="col-md-6 col-sm-12">
        <button data-id="btn-update-subscription"
            class="btn btn-primary btn-block">
            Speichern
        </button>
    </div>
</div>