<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<div class="modal fade bulk_actions" id="leads_bulk_actions" tabindex="-1" role="dialog" data-table="<?php echo (isset($table) ? $table : '.table-leads'); ?>">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title"><?php echo _l('bulk_actions'); ?></h4>
        </div>
        <div class="modal-body">
            <?php if(has_permission('leads','','delete')){ ?>
            <div class="checkbox checkbox-danger">
                <input type="checkbox" name="mass_delete" id="mass_delete">
                <label for="mass_delete"><?php echo _l('mass_delete'); ?></label>
            </div>
            <hr class="mass_delete_separator" />
            <?php } ?>
            <div id="bulk_change">
            <div class="form-group">
                    <div class="checkbox checkbox-primary checkbox-inline">
                    <input type="checkbox" name="leads_bulk_mark_lost" id="leads_bulk_mark_lost" value="1">
                    <label for="leads_bulk_mark_lost">
                    <?php echo _l('lead_mark_as_lost'); ?>
                    </label>
                    </div>
                </div>
                <?php echo render_select('move_to_status_leads_bulk',$statuses,array('id','name'),'ticket_single_change_status',null,null,null,null,null,null, TRUE); ?>
                <?php
                    echo render_select('move_to_source_leads_bulk',$sources,array('id','name'),'lead_source');
                    echo render_datetime_input('leads_bulk_last_contact','leads_dt_last_contact');
                    if(has_permission('leads','','edit')){
                    echo render_select('assign_to_leads_bulk',$staff,array('staffid',array('firstname','lastname')),'leads_dt_assigned');
                    }
                    ?>
                <div class="form-group">
                    <?php echo '<p><b><i class="fal fa-tag" aria-hidden="true"></i> ' . _l('tags') . ':</b></p>'; ?>
                    <input type="text" class="tagsinput" id="tags_bulk" name="tags_bulk" value="" data-role="tagsinput">
                </div>
                <hr />
                <div class="form-group no-mbot">
                    <div class="radio radio-primary radio-inline">
                    <input type="radio" name="leads_bulk_visibility" id="leads_bulk_public" value="public">
                    <label for="leads_bulk_public">
                    <?php echo _l('lead_public'); ?>
                    </label>
                    </div>
                    <div class="radio radio-primary radio-inline">
                    <input type="radio" name="leads_bulk_visibility" id="leads_bulk_private" value="private">
                    <label for="leads_bulk_private">
                    <?php echo _l('private'); ?>
                    </label>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _l('close'); ?></button>
            <a href="#" class="btn btn-info" onclick="leads_bulk_action(this); return false;"><?php echo _l('confirm'); ?></a>
        </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>