{% extends 'VGMWOBundle::layout.html.twig' %}
{% block jumbotron_content %}
    <div class="jumbotron" style="padding-top: 10px; padding-bottom: 5px;"  id="jumbotron">
        <div class="container-fluid">
            <div class="col-md-12 text-center" style="padding-left: 0px;">
                <H3 style="margin: 0px;"><strong>Update clients</strong></H3>
            </div>
        </div>
    </div>
{% endblock %}
{% block content %}
    <div class="container" style="min-height: 500px;">
        <div class="row">
            <div class="col-md-12 text-right">
                <div class="col-ms-2 pull-right">
                    <a href="{{ path('vgm_client') }}">
                        <span class="glyphicon glyphicon-list"></span>
                        Main list
                    </a>
                </div>
            </div>
            {% form_theme edit_form _self %}
            <form id="edit_form" action="{{ path('vgm_client_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}>
                <div class="form-group container-fluid">
                    <div class="row">
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px;">{{ form_label(edit_form.name) }}: </label>
                            {{ form_errors(edit_form.name) }}
                            {{ form_widget(edit_form.name, { 'attr': {
                            'id': 'name_imput',
                            'accesskey' : 'n',
                            'tabindex' : 1,
                            'class': 'form-control for-desktop',
                            'type': 'text',
                            'placeholder': 'Client Name'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px;">{{ form_label(edit_form.email) }}: </label>
                            {{ form_errors(edit_form.email) }}
                            {{ form_widget(edit_form.email, { 'attr': {
                            'accesskey' : 'e',
                            'tabindex' : 2,
                            'class': 'form-control for-desktop',
                            'type': 'email',
                            'placeholder': 'e-mail'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.bill_info) }}: </label>
                            {{ form_errors(edit_form.bill_info) }}
                            {{ form_widget(edit_form.bill_info, { 'attr': {
                            'accesskey' : 'b',
                            'tabindex' : 3,
                            'class': 'form-control',
                            'placeholder': 'Bill To Info'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.ship_info) }}: </label>
                            {{ form_errors(edit_form.ship_info) }}
                            {{ form_widget(edit_form.ship_info, { 'attr': {
                            'accesskey' : 's',
                            'tabindex' : 4,
                            'class': 'form-control',
                            'placeholder': 'Ship To Info'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.phone1) }}: </label>
                            {{ form_errors(edit_form.phone1) }}
                            {{ form_widget(edit_form.phone1, { 'attr': {
                            'accesskey' : 'p',
                            'tabindex' : 5,
                            'class': 'form-control for-desktop',
                            'type': 'text',
                            'placeholder': 'Main Phone Number'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.phone2) }}: </label>
                            {{ form_errors(edit_form.phone2) }}
                            {{ form_widget(edit_form.phone2, { 'attr': {
                            'accesskey' : 'n',
                            'tabindex' : 6,
                            'class': 'form-control for-desktop',
                            'placeholder': 'Aux Phone Number'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.adrees) }}: </label>
                            {{ form_errors(edit_form.adrees) }}
                            {{ form_widget(edit_form.adrees, { 'attr': {
                            'accesskey' : 'a',
                            'tabindex' : 7,
                            'class': 'form-control for-desktop',
                            'placeholder': 'Street'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.city) }}: </label>
                            {{ form_errors(edit_form.city) }}
                            {{ form_widget(edit_form.city, { 'attr': {
                            'accesskey' : 't',
                            'tabindex' : 8,
                            'class': 'form-control for-desktop',
                            'placeholder': 'City'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6"><label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.state) }}: </label>
                            {{ form_errors(edit_form.state) }}
                            {{ form_widget(edit_form.state, { 'attr': {
                            'accesskey' : 's',
                            'tabindex' : 9,
                            'class': 'form-control for-desktop',
                            'placeholder': 'State'} }) }}
                        </div>
                        <div class="col-xs-12 col-sm-6">
                            <label style="margin-bottom: 0px; margin-top: 10px;">{{ form_label(edit_form.zip_code) }}: </label>
                            {{ form_errors(edit_form.zip_code) }}
                            {{ form_widget(edit_form.zip_code, { 'attr': {
                            'accesskey' : 'z',
                            'tabindex' : 10,
                            'class': 'form-control for-desktop',
                            'placeholder': 'Zip Code'} }) }}
                        </div>
                    </div>
                </div>
                {{ form_rest(edit_form) }}
            </form>
            <div class="col-lg-12 container-fluid text-right">
                    <button class="btn btn-primary" onclick="SubmitFrom()">Update</button>
                <div style="display: inline-block;">
                    {{ form_start(delete_form) }}
                    {{ form_widget(delete_form.submit, {'attr': {
                    'class': 'btn btn-warning' }}) }}
                    {{ form_rest(delete_form) }}
                    {{ form_end(delete_form) }}
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block javascripts %}
    {{ parent() }}
    <script type="text/javascript">
        function SubmitFrom(){
            $('#edit_form').submit();
        }
    </script>
{% endblock %}