{% extends (app['twig_theme'] ~ '/' ~ 'layout.twig') | trans %}

{% set active = 'application-catalog' %}
{% set title =  'Applications'|trans ~ ': ' ~ 'Terms of Service.'|trans %}


{% block content %}
    <div id="iptv_list">
        <div class="row">
            <div class="col-xs-12 col-sm-12">
                {% if attribute(app, 'tos') is defined %}
                    {% autoescape false %}
                    {{ app.tos.tos_en }}
                    {% endautoescape %}
                {% endif %}
            </div>
            <div class="col-xs-12 col-sm-12">
                <form class="form-horizontal" role="form" method="POST" action="{{app.workHost}}server/adm/{{app.controller_alias}}/accept-tos">
                    <input type="hidden" name="tos_alias" value="{% if attribute(app, 'tos_alias') is defined %}{{ app.tos_alias }}{% endif %}">
                    <div class="box">
                        <div class="box-content">
                            <div class="form-group">
                                <div class="checkbox pull-left">
                                    <label>
                                        <input type="checkbox" value="1" name="accepted" {% if not (attribute(app, 'userlogin') is defined) or app.userlogin != 'admin' %}readonly="readonly" disabled="disabled"{% endif %}>
                                        <i class="fa fa-square-o small" style="left: 7px;"></i>
                                    </label>
                                    <span class="txt-default">{{ 'I AGREE I have read and agree to all of terms and conditions above'|trans }}</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-success" {% if not (attribute(app, 'userlogin') is defined) or app.userlogin != 'admin' %}readonly="readonly" disabled="disabled"{% endif %}>{{ 'Agree'|trans }}</button>
                                <a class="btn btn-success no_context_menu" href="{{app.workHost}}server/adm/">{{ 'Do Not Agree'|trans }}</a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="col-xs-12 col-sm-12"><br/></div>
        </div>
    </div>
{% endblock %}