<?php $this->load->view('site/layout'); ?>
<?php
if ($this->session->userdata('language') == "english") {
    $language_set = "arabic";
} else {
    $language_set = "english";
}
?>

<link href="<?php echo base_url() ?>public/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css" />

<?php $this->load->view('site/navbar'); ?>
<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">

    <!-- begin:: Content Head -->
    <div class="kt-subheader  kt-grid__item" id="kt_subheader">
        <div class="kt-container  kt-container--fluid ">
            <div class="kt-subheader__main">
                <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                <span class="kt-subheader__desc"><?php echo $this->lang->line('pay_order'); ?></span>
            </div>

        </div>
    </div>
    <div class="kt-portlet">
        <div class="kt-portlet__head">
            <div class="kt-portlet__head-label">
                <h3 class="kt-portlet__head-title">
                    <?php echo $this->lang->line('edit') ?> <?php echo $this->lang->line('pay_order') ?>
                </h3>
            </div>
        </div>
        <?php echo form_open_multipart(); ?>
        <!-- <form class="kt-form kt-form--label-right"> -->
        <div class="kt-portlet__body">
            <?php if (isset($msg) || validation_errors() !== ''): ?>
                <div class="form-group form-group-last">
                    <div class="alert alert-secondary" role="alert">
                        <div class="alert-icon"><i class="flaticon-warning kt-font-brand"></i></div>
                        <div class="alert-text">
                            <?= validation_errors(); ?>
                            <?= isset($msg) ? $msg : ''; ?>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
            <div class="form-group row">
                <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('amount') ?></label>
                <div class="col-9">
                    <input type="number" step=".001" class="form-control" id="exampleInputEmail1" placeholder="<?php echo $this->lang->line('enter') ?> <?php echo $this->lang->line('amount') ?>" value="<?= set_value('amount', $order->amount) ?>" name="amount" autofocus >
                </div>
                <div class="col-1 mt-2">
                    <span><strong><?= $sett->inv_currency ?></strong></span>
                </div>
            </div>
            <div class="form-group row">
                <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('phone') ?></label>
                <div class="col-3">
                   <?= phone_code_select('phone_code') ?>
                </div>
                <div class="col-7">
                    <input type="number" class="form-control" id="exampleInputEmail1" placeholder="<?php echo $this->lang->line('enter') ?> <?php echo $this->lang->line('phone') ?>" name="phone" value="<?= set_value('phone', $order->phone) ?>" >
                </div>
            </div>
            <div class="form-group row">
                <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('client_name') ?></label>
                <div class="col-10">
                    <input name="client_name" class="form-control"  placeholder="<?php echo $this->lang->line('enter') ?> <?php echo $this->lang->line('client_name') ?>" value="<?= set_value('client_name', $order->client_name) ?>" />
                </div>
            </div>
            <div class="form-group row">
                <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('description') ?></label>
                <div class="col-10">
                    <textarea name="desc" class="form-control" rows="5" placeholder="<?php echo $this->lang->line('enter') ?> <?php echo $this->lang->line('description') ?>"><?= set_value('desc', $order->desc) ?></textarea>
                </div>
            </div>
        </div>
        <div class="kt-portlet__foot">
            <div class="kt-form__actions">
                <div class="row">
                    <div class="col-2">
                    </div>
                    <div class="col-10">
                        <button type="submit" class="btn btn-primary" name="submit" value="pl"><?php echo $this->lang->line('edit') ?></button>
                    </div>
                </div>
            </div>
        </div>
        </form>
    </div>
    <?php $this->load->view('site/footer_2'); ?>

    <script>
        var phone_code = "<?= set_value('phone_code', $order->phone_code) ?>";
        $(".code_input").val(phone_code);
        $(".code_input").select2();
    </script>