<div ng-controller="AuditController">

    <div class="module-content">
        <div class="left-sidebar">
            <div class="module-header">
                <h3>
                    <span translate>audit.title</span>
                </h3>
            </div>
            <form name="auditForm">
                <div class="well panel">
                    <div class="panel-body">

                        <div ng-include="'modules/audit/views/components/audit-selection.client.view.html'"></div>

                        <div>
                            <label for="dateFromAudit" translate>audit.navigation.label.dateFrom</label>
                            <span class="required-asterisk">*</span>

                            <date-time-picker data="dateFrom"></date-time-picker>
                            <label for="dateToAudit" translate>audit.navigation.label.dateTo</label>
                            <span class="required-asterisk">*</span>
                            <div>
                                <date-time-picker data="dateTo"></date-time-picker>
                            </div>
                        </div>

                        <div class="checkbox">
                            <label>
                                <input type="checkbox" ng-model="showXmlReport">
                                <span translate>
                                    audit.navigation.checkBox.xmlReport
                                </span>
                            </label>
                        </div>

                        <div>
                            <button class="btn btn-sm btn-primary" id="generateReportButton" type="button" ng-disabled="auditForm.$invalid"
                                    ng-click="showIframe()">
                                <span translate>audit.navigation.button.generateAuditReport.btn</span>
                            </button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="content-body">
            <div ng-switch on="showXmlReport">
                <div ng-switch-when="false">
                    <iframe name="audit-iframe" iframe-onload="iframeLoadedCallBack()" class="audit-iframe" iframeborder="0"
                            ng-src="{{auditReportUrl}}"></iframe>
                </div>
            </div>
        </div>
    </div>

</div>
