{% extends "base.html.twig" %}
{% block actionheader %}
{% endblock %}
{% block javascripts %}
    {{ parent() }}

    <script src=" {{ asset("js/invoice-payments.js") }}" defer></script>
{% endblock %}

{% block searchform %}

{% endblock %}

{% block body %}
    <div id="invoices-latest-invoices">
        {{ form_start(form, {'action': path('admin_parametros_index')}) }}

        <div class="row">
            <div class="col-md-12">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">Logo Portada</h3>
                    </div>
                    <div class="box-body">
                        {{ form_label(form.logoportada) }}
                        {% if rutalogo is defined and rutalogo %}
                            <img src="{{ rutalogo }}" alt="Logo"
                                 title="logoportada"
                                 height="100">
                        {% endif %}
                        {{ form_widget(form.logoportada) }}
                    </div>

                </div>

                <div class="box box-warning">
                    <div class="box-header with-border">
                        <h3 class="box-title">Servidor SMTP envio contraseñas</h3>
                    </div>
                    <div class="box-body">
                        <table id="invoice-like-items" class="table table-condensed align-middle">
                            <thead>
                            <tr>
                                <th class="col-md-1 cell-align-left">Nombre</th>
                                <th class="col-md-1 cell-align-left">Valor</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for item in form.parametros %}
                                {% if item.name.vars.value == 'smtpserver'
                                    or item.name.vars.value == 'password_smtp'
                                    or item.name.vars.value == 'port_smtp'
                                    or item.name.vars.value == 'cuenta_correo'
                                    or item.name.vars.value == 'tls' %}
                                    <tr>
                                        <td width="5%">{{ form_widget(item.name) }}</td>
                                        <td class="cell-align-left">{{ form_widget(item.value) }}</td>
                                    </tr>
                                {% endif %}
                            {% endfor %}

                            {# TODO: Action buttons: add/remove items, taxes, sort... #}
                            </tbody>
                        </table>
                    </div>

                </div>

                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Adicionales</h3>
                    </div>
                    <div class="box-body">
                        <table id="invoice-like-items" class="table table-condensed align-middle">
                            <thead>
                            <tr>
                                <th class="col-md-1 cell-align-left">Nombre</th>
                                <th class="col-md-1 cell-align-left">Valor</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for item in form.parametros %}
                                {% if item.name.vars.value == 'whatsapp'
                                    or item.name.vars.value == 'contacto_email'
                                    or item.name.vars.value == 'pagina_web'
                                    or item.name.vars.value == 'codauxoperadora'
                                    or item.name.vars.value == 'codauxsocio' %}
                                    <tr>
                                        <td width="5%">{{ form_widget(item.name) }}</td>
                                        <td class="cell-align-left">{{ form_widget(item.value) }}</td>
                                    </tr>
                                {% endif %}
                            {% endfor %}

                            {# TODO: Action buttons: add/remove items, taxes, sort... #}
                            </tbody>
                        </table>
                    </div>

                </div>

                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">Datos Cuenta Transferencia</h3>
                    </div>
                    <div class="box-body">
                        {{ form_widget(form.detcuentatransfer , {'id' : 'editor1', 'name':'editor1'}) }}
                    </div>
                </div>
                <div class="form-actions col-md-12">
                    <button type="submit" class="btn btn-primary">
                        <span class="fa fa-save"></span>&nbsp;
                        Guardar
                    </button>
                </div>

            </div>

            {{ form_end(form) }}
        </div>
    </div>
{% endblock %}
