<?php
if($this->vars['formModel'] instanceof \OFFLINE\Mall\Models\Review) {
    $id = $this->vars['formModel']->id;
    $handler = 'onApprove';
    $label = 'approve_next';
} else {
    $id = post('manage_id');
    $handler = 'onApproveReview';
    $label = 'approve';
}
?>
<button class="btn btn-default"
        data-request="<?= e($handler) ?>"
        data-request-data="id: '<?= e($id) ?>'"
        data-dismiss="popup"
        data-request-redirect
        data-request-flash
        data-attach-loading>
    <?= e(trans('offline.mall::lang.reviews.' . $label)) ?>
</button>