{% extends app.twig_theme ~ "/NewVideoClub/add_video/add_video.twig"%}

{% block footer_steps_js %}

    {{ parent() }}
    <script type="text/javascript">

        {% include app.twig_theme ~ "/NewVideoClub/add_video/add_video_step_1.js.twig" %}

    </script>

{% endblock %}

{% block form_step_by_step %}
                <h4 class="section-header"><span>{{ 'Basic'|trans }}</span></h4>
                {#
                <a class="collapse-link">
                    <div class="box-header">
                        <div class="box-name">
                            <div class="row">
                                <div class="col-xs-10 col-sm-2">
                                    <span>{{ 'Basic'|trans }}</span>
                                </div>
                            </div>
                        </div>
                        <div class="box-icons">
                            <i class="fa fa-chevron-up"></i>
                        </div>
                        <div class="no-move"></div>
                    </div>
                </a>
                #}
                <div class="box-content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-lg-8" style="max-width: 790px;">
                            <div class="form-group">
                                <label class="col-sm-2 control-label ">{{ 'Title'|trans }}<span class="icon-required">*</span></label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-11">
                                        {{ form_widget(app['form'].id) }}
                                        {{ form_widget(app['form'].rating_count_kinopoisk) }}
                                        {{ form_widget(app['form'].rating_imdb) }}
                                        {{ form_widget(app['form'].rating_count_imdb) }}
                                        {{ form_widget(app['form'].name, {'attr': {'class': 'form-control', 'data-validation':'required'}}) }}
                                        {{ form_errors(app['form'].name) }}
                                    </div>

                                    <i class="i-hint"
                                        title="{{ 'You can use letters, digits and symbols from the list: ! @ # $ % ^ & * ( ) _ - + : ; , .' |trans }}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>

                                    {# old hint
                                    <span class="help-inline col-xs-12 col-sm-12">
                                        <span class="small txt-default">{{ 'You can use letters, digits and symbols from the list: ! @ # $ % ^ & * ( ) _ - + : ; , .'|trans }}</span>
                                    </span>
                                    #}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label ">{{ 'Original title'|trans }}<span class="icon-required">*</span></label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-11">
                                        {{ form_widget(app['form'].o_name, {'attr': {'class': 'form-control', 'data-oldvalue': app['form'].o_name.vars.value, 'data-validation':'required' }}) }}
                                        {{ form_errors(app['form'].o_name) }}
                                        <div>
                                            <a href="" id="kinopoisk_url"></a>
                                        </div>
                                    </div>
                                    <i class="i-hint"
                                        title="{{ 'Title on the native language. Autocomplete is available' |trans }}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label ">{{ 'Autocomplete'|trans }}</label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-11" id="autocomplete_button_container">
                                        {% for providerChild in app['form'].autocomplete_provider %}
                                        <div class="radio-inline">
                                            <label>
                                                {{ form_widget(providerChild) }}
                                                <i class="fa fa-dot-circle-o"></i>
                                                {{ form_label(providerChild, null, {"attr": {"for": providerChild.vars.id} }) }}
                                            </label>
                                        </div>
                                        {% endfor %}
                                        <button class="btn btn-default col-xs-offset-1">{{ 'Autocomplete'|trans }}</button>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label " for="form_autocomplete_provider">{% if app['form'].autocomplete_provider.vars.value and app['form'].autocomplete_provider.vars.value == 'tmdb' %}{{ 'TMDB ID'|trans }}{% else %}{{ 'Kinopoisk ID'|trans }}{% endif %}</label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-11">
                                        {{ form_widget(app['form'].kinopoisk_id, {'attr': {'class': 'form-control'}}) }}
                                        {{ form_errors(app['form'].kinopoisk_id) }}
                                    </div>
                                    <i class="i-hint"
                                        title="{% if app['form'].autocomplete_provider.vars.value and app['form'].autocomplete_provider.vars.value == 'tmdb' %}{{ 'ID of movie on the TMDB'|trans }}{% else %}{{ 'ID of movie on the Kinopoisk'|trans }}{% endif %}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>
                                </div>
                            </div>
                        </div>

                        <div class="col-xs-12 col-sm-12">
                            <div class="separator"></div>
                        </div>

                        <div class="col-xs-12 col-sm-8 col-lg-8" style="max-width: 790px;">
                            <div class="form-group">
                                <label class="col-sm-2 control-label ">{{ 'Category'|trans }}<span class="icon-required">*</span></label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-6">
                                        {{ form_widget(app['form'].category_id, {'attr': {'class': 'populate placeholder', 'data-validation':'required'} }) }}
                                        {{ form_errors(app['form'].category_id) }}
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label ">{{ 'Genre'|trans }}<span class="icon-required">*</span></label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-11">
                                        {{ form_widget(app['form'].cat_genre_id, {'attr': {'class': 'populate placeholder', 'data-validation':'required'}}) }}
                                        {{ form_errors(app['form'].cat_genre_id) }}
                                    </div>
                                    <i class="i-hint"
                                        title="{{ 'You can choose up to 4 genres' |trans }}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label ">{{ 'Type'|trans }}</label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-6">
                                        {{ form_widget(app['form'].is_series, {'attr': {'class': 'populate placeholder'}}) }}
                                        {{ form_errors(app['form'].is_series) }}
                                    </div>
                                    <i class="i-hint"
                                        title="{{ 'Type Serial adds seasons and episodes structure' |trans }}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label uniseries">{{ 'Year'|trans }}</label>
                                <label class="col-sm-2 control-label ">{{ 'Period of showing '|trans }}</label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-6">
                                        {{ form_widget(app['form'].year, {'attr': {'class': 'form-control pull-left', 'data-validation':'compare_number', 'data-validation-compare-element': '#form_year_end', 'data-validation-compare-operation': '<=', 'data-validation-regexp' : '^\\d{4}$', 'data-validation-optional' : 'true'}}) }}
                                        {{ form_widget(app['form'].year_end, {'attr': {'class': 'form-control  pull-left add-video-year', 'data-validation' : 'compare_number', 'data-validation-compare-element': '#form_year', 'data-validation-compare-operation': '>=' , 'data-validation-regexp' : '^(?:\\d{4})$', 'data-validation-optional' : 'true', 'disabled': 'disabled' }}) }}
                                        {{ form_errors(app['form'].year) }}
                                        {{ form_errors(app['form'].year_end) }}
                                    </div>
                                    <i class="i-hint uniseries"
                                       title="{{ 'Year of the film creation Example: 2014' |trans }}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>
                                    <i class="i-hint"
                                       title="{{ 'The period of showing of the episodes on TV' |trans }}" >
                                        <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                    </i>
                                    {#
                                    <span class="help-inline col-xs-12 col-sm-12">
                                        <span class="small txt-default uniseries">{{ 'Year of the film creation Example: 2014'|trans }}</span>
                                        <span class="small txt-default">{{ 'The period of showing of the episodes on TV'|trans }}</span>
                                    </span>
                                    #}
                                </div>
                            </div>

                            <div class="form-group form-group-checkbox">
                                <label class="col-sm-2 control-label ">{{ 'Parent control'|trans }}</label>
                                <div class="col-xs-10 col-sm-7">
                                    <div class=" col-xs-10 col-sm-11">
                                        <div class="checkbox-inline">
                                            <label>
                                                {{ form_widget(app['form'].censored) }}
                                                <i class="fa fa-square-o small"></i>
                                            </label>
                                        </div>
                                        <i class="i-hint"
                                            title="{{ 'Adds the restriction for movie access (password set in the "Parental advisory"). Default password 0000' |trans }}" >
                                            <img class="i-hint-sign" src="{{app.request_context.baseUrl}}/img/field-hint-sign.svg" />
                                        </i>
                                        {{ form_errors(app['form'].censored) }}
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
{% endblock form_step_by_step %}