{% extends app['twig_theme'] ~ '/' ~ 'layout.twig' %}

{% set title = 'Video club'|trans ~ ': ' ~ (app.modEdit ? ('Edit moderator'|trans ~ " '"~ app.modName ~ "'"): 'Add moderator'|trans) %}
{% set active_alias = 'video-moderators-addresses' %}


{% block footer %}
    {{ parent() }}
    
    <script type="text/javascript" defer>
       
        {% include app.twig_theme ~ "/VideoClub/add_video_moderators/add_video_moderators.js.twig" %}

    </script>
{% endblock %}


{% block content %}
    <div id="add_channel">
        {{ form_start(app['form'], {'method': 'POST', 'action': (app.request_context.baseUrl ~ '/' ~ app.controller_alias  ~ '/' ~ app.action_alias) | trans, 'attr': {'class': 'form-horizontal', 'role': 'form', 'id': 'form_'}}) }}
        <div class="bg-danger">
            <div class="bg-danger">
                {{ form_errors(app['form']) }}
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                <div class="box">
                    <div class="box-content">
                        <div class="form-group">
                            <label class="col-sm-2 control-label ">{{ 'Name'|trans }}<span class="icon-required">*</span></label>
                            <div class="col-xs-10 col-sm-6">
                                <div class=" col-xs-10 col-sm-6">
                                    {{ form_widget(app['form'].id, {'attr': {'class': 'form-control'}}) }}
                                    {{ form_widget(app['form'].name, {'attr': {'class': 'form-control', 'data-validation':'required'}}) }}
                                    <div class="bg-danger">
                                        {{ form_errors(app['form'].name) }}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ">{{ 'MAC address'|trans }}<span class="icon-required">*</span></label>
                            <div class="col-xs-10 col-sm-6">
                                <div class=" col-xs-10 col-sm-6">
                                    {{ form_widget(app['form'].mac, {'attr': {'class': 'form-control', 'data-validation':'required'}}) }}
                                    <div class="bg-danger">
                                        {{ form_errors(app['form'].mac) }}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label ">{{ 'Switch off advertising'|trans }}</label>
                            <div class=" col-xs-10 col-sm-6">
                                <div class=" col-xs-10 col-sm-6">
                                    <div class="checkbox">
                                        <label>
                                            {{ form_widget(app['form'].disable_vclub_ad) }}
                                            <i class="fa fa-square-o small"></i>
                                        </label>
                                        <div class="bg-danger">
                                            {{ form_errors(app['form'].disable_vclub_ad) }}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="box">
                    <div class="box-content">
                        <div class="row">
                            <div class="col-xs-10 col-sm-4 pull-right">
                                {{ form_widget(app['form'].save, { 'label': 'Save'|trans , attr: {'class': 'btn btn-success col-sm-5 pull-right'}}) }}
                                <a href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/video-moderators-addresses" class="btn btn-default col-sm-5 pull-left">{{ 'Cancel'|trans }}</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div style="">
            {{ form_rest(app.form) }}
        </div>
        
        {{ form_end(app['form']) }}  
    
    </div>

{% endblock %}
