<%=raw app.core.View.getTemplate( 'group-nav', { activeTab : 'terms', group : group, currentProfile : currentProfile } ) %>
<% var termsAccepted = currentProfile.getGroupData(group.getId()).terms_accepted == 1; %>
<div class="row">
    <div class="col-sm-12">
        <div class="card">
            <div class="team-header">
                <div class="pb_cover_v3 overflow-hidden cover-bg-indigo cover-bg-opacity-8 text-left pb_gradient_v1 pb_slant-white-small"
                     style="overflow: hidden; background: url(./img-system/<%= group.getBackgroundImgUrl() %>); background-position: center;background-repeat: no-repeat;background-size: cover;height: 135px;">
                </div>
                <div class="team-logo"
                     style="position: relative">
                    <img src="<%= group.getEmblemUrl() %>"
                         style="width: 128px; height: 128px; top: -64px; margin: auto; border: 4px solid white;z-index: 11; padding: 0; "
                         class="card-img-overlay"/>
                </div>
            </div>
            <div class="card-body">
                <div class="form-group">
                    <p>
                        <strong><%= _lc( 'GROUP_TERMS_DESCRIPTION' ) %></strong>
                    </p>
                    <div class="group-terms"><p><%=raw group.getTermsConditions() ? app.util.Helper.nl2br( group.getTermsConditions() ) : '' %></p></div>

                    <% if ( group.getTermsConditionsActive() ) {    %>
                        <div class="form-group">
                            <div class="custom-control custom-checkbox my-1 mr-sm-2">
                            <input type="checkbox"
                                   name="checkbox-terms-conditions-accept"
                                   data-id="checkbox-terms-conditions-accept"
                                   id="checkbox-terms-conditions-accept"
                                   class="custom-control-input"
                            <%= termsAccepted ? 'checked' : '' %>
                            >
                            <label class="custom-control-label"
                                   for="checkbox-terms-conditions-accept"><%= _lc( 'GROUP_TERMS_ACCEPT' ) %>
                                    <span data-id="terms-accepted-note">
                                        <% if (termsAccepted) { %>
                                        (<%= _lc( 'GROUP_TERMS_ACCEPTED' ) %>)
                                        <% } else { %>
                                        (<%= _lc( 'GROUP_TERMS_NOT_ACCEPTED' ) %>)
                                        <% } %>
                                    </span>

                                %>
                            </label>
                            <p>
                                <small><%= _lc( 'GROUP_TERMS_ACTIVE_DESCRIPTION' ) %></small>
                            </div>
                        </div>
                    <% } %>
                </div>
            </div>
            <div class="card-footer">
            </div>
        </div>
    </div>
</div>