<?php
/*
 * This is almost clone of saveSearchModal
 *
 * TODO: REFACOR/COMBINE with save sarch
 *
 *
 *
 */

?>
<script type="text/ng-template" id="copySearchModal.html">
    <div class="modal-header">
        <button type="button" class="close" ng-click="close('copySearchModal')"><i class="bi bi-x"></i></button>
        <h2>Copy Query</h2>
    </div>
    <div class="modal-body">
        <div id="notification_block_wrapper" ng-show="modalOpen.status==true" data-notifications></div>

        <div class="row-fluid">
        <form id="saveformAdvancedReports" name="savesearchForm" method="post" class="form-search form-horizontal">
        <?php
            $data['formName'] = 'savesearchForm';
            $this->load->view('/partials/elements/_saveSearchRolesPublicCheckboxes', $data);
        ?>
        </form>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-large" data-dismiss="modal" ng-click="close('copySearchModal')"  ng-disable="savedSearchName==''">Close</button>
        <button id="saveSearchModal_SE" class="btn btn-large btn-primary" ng-click="copyReport()" ng-disabled="savedSearchName=='' || savesearchForm.$invalid">Save</button>
        <button id="saveSearchModalOverwrite_SE" ng-show="showOverwrite == true"  class="btn btn-large btn-danger" ng-click="copyReport(true)" ng-disabled="savedSearchName==''">Overwrite</button>
    </div>
</script>
