{% 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 work types</strong></H3>
            </div>
        </div>
    </div>
{% endblock %}
{% block content %}
    <div class="container" style="min-height: 500px;">
        <div class="col-md-12 text-right">
            <div class="col-ms-2 pull-right">
                <a href="{{ path('worktypes') }}">
                    <span class="glyphicon glyphicon-list"></span>
                    Main list
                </a>
            </div>
        </div>
        {% form_theme edit_form _self %}
        <form id="edit_form" action="{{ path('worktypes_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}>
            <div class="form-group container-fluid">
                <div class="row">
                    <div>
                        <!-- Name input -->
                        <div>
                            <label style="margin-bottom: 0px;">Work type: </label>
                            {{ form_errors(edit_form.work_type) }}
                            {{ form_widget(edit_form.work_type, { 'attr': {
                            'id': 'name_imput',
                            'accesskey' : 'n',
                            'tabindex' : 1,
                            'class': 'form-control for-desktop',
                            'type': 'text',
                            'placeholder': 'Work Type'} }) }}
                        </div>
                        <!-- Main phone input -->
                        <div>
                            <label style="margin-bottom: 0px; margin-top: 10px;">Description: </label>
                            {{ form_errors(edit_form.description) }}
                            {{ form_widget(edit_form.description, { 'attr': {
                            'accesskey' : 'p',
                            'tabindex' : 3,
                            'class': 'form-control for-desktop',
                            'type': 'text',
                            'placeholder': 'Description'} }) }}
                        </div>
                    </div>
                </div>
            </div>
            {{ form_rest(edit_form) }}
        </form>
        <div class="col-lg-12 container-fluid text-right">
                <button form="edit_form" type="submit" class="btn btn-info btn-sm">
                    Update
                </button>
            <div style="display: inline-block;">
                {{ form_start(delete_form) }}
                {{ form_widget(delete_form.submit, {'attr': {
                'class': 'btn btn-warning btn-sm' }}) }}
                {{ form_rest(delete_form) }}
                {{ form_end(delete_form) }}
            </div>
        </div>
    </div>
{% endblock %}
{% block javascripts %}
    {{ parent() }}
    <script type="text/javascript">
        // Activates knockout.js
        //ko.applyBindings(baseViewModel, document.getElementById("menu-bar"));
    </script>
{% endblock %}