{% comment %}
Copyright 2017 Workonline Communications (Pty) Ltd. All rights reserved.

The contents of this file are licensed under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
{% endcomment %}
{% load staticfiles %}
<div class="modal fade" id="accept-terms-modal" tabindex="-1" role="dialog" aria-labelledby="accept-terms-modal-label">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <img src="{% static info.small_logo %}" alt="Logo">
                <h4 class="modal-title" id="accept-terms-modal-label">
                    Welcome to the {{ info.title }}<br/>
                    <small>You are visiting from {{ info.src_address }}</small>
                </h4>
            </div>
            <div class="modal-body">
                {% include "djangolg/terms.html" %}
            </div>
            <form class="form-inline" action="#" method="get" id="accept-terms-form">
                <div class="modal-footer">
                    {% if recaptcha %}
                        <div class="pull-left">
                            <div class="g-recaptcha" data-sitekey="{{ recaptcha.site_key }}"></div>
                        </div>
                    {% else %}
                        <div id="accept-terms-checkbox" class="checkbox pull-left" data-trigger="manual" data-toggle="popover"
                             data-content="Please accept terms to continue" data-placement="top" data-html="true" container="input">
                            <label for="{{ modal.accept.id_for_label }}">
                                {{ modal.accept }} {{ modal.accept.label }}
                            </label>
                        </div>
                    {% endif %}
                    <button type="submit" class="btn btn-primary">Continue</button>
                </div>
            </form>
        </div>
    </div>
</div>
