<b><?php echo $this->user->lang('Press the button to download the file'); ?>:</b>

<div class="mt-3">
    <div class="row mb-3">
        <label class="col-sm-3 col-form-label fw-bold">
            <?php echo $this->user->lang('Client Id'); ?>:
        </label>
        <div class="col-sm-3">
            <input type="text"
                   name="userid"
                   id="userid"
                   class="form-control"
                   style="width: 90px;"
                   value="<?php echo $this->userid; ?>" />
        </div>
    </div>
</div>

<?php if ($this->userid != '') { ?>
    <input type="hidden" name="exportdata" value="<?php echo $this->userid; ?>" />
    <input type="hidden" name="sessionHash" value="<?php echo CE_Lib::getSessionHash(); ?>" />
<?php } ?>

<button class="cm-btns orange mt-2" id="exportButton">
    <span><?php echo $this->user->lang("Download .json"); ?></span>
</button>

<?php if ($this->userid != '') { ?>
<script type="text/javascript">
    $(document).ready(function() {
        $('#exportButton').click();
    });
</script>
<?php } ?>
