<?php
/*
 * *************************************************
 * Copyright (C) 2021 Earworks.                    *
 * Codeigniter Project Template Modification       *
 * Please contact our email for more information : *
 * contact@earworks.co.id                          *
 * *************************************************
 */

defined('BASEPATH') OR exit('No direct script access allowed');
Ci::set_title('ABSENSI');
?> 

<h1 class="page-title">
    <?= Ci::$title ?>
    <hr class="hiasan-judul blue" />
</h1>
<br /><br />
<style type="text/css">
    .text-left {
        text-align:left !important;
    }
</style>
<div class="row">
    <div class="col-sm-8 col-sm-offset-2">
        <?= form_open('dashboard/visitor-absen' . $redir) ?>
        <?= form_hidden('scan_code', $data['scan_code']) ?>
        <?= form_hidden('souvenir', $data['souvenir']) ?>
        <div class="form-horizontal">
            <div class="form-group">
                <?= lang('name', [], 'name', ['class' => 'col-sm-3 control-label text-left']) ?>
                <div class="col-sm-9">
                    <div class="form-control"  disabled="disabled">
                        <?= $visitor->profile->name ?>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <?= lang('optic', [], 'optic', ['class' => 'col-sm-3 control-label text-left']) ?>
                <div class="col-sm-9">
                    <div class="form-control" disabled="disabled">
                        <?= $visitor->profile->optic ?>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <?= lang('souvenir', [], 'souvenir', ['class' => 'col-sm-3 control-label text-left']) ?>
                <div class="col-sm-9">
                    <div class="form-control" disabled="disabled">
                        <?= $data['souvenir'] == 1 ? 'Yes' : 'No' ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <button type="submit" name="submit" value="submit" class="btn btn-submit btn-block">
                    Submit
                </button>

            </div>
            <div class="col-sm-6">
                <a href="<?= base_url('dashboard/index') ?>" class="btn btn-block btn-submit btn-danger" role="button" type="button">
                    Cancel
                </a>
            </div>
        </div>
        <?= form_close() ?>
    </div>
</div>
<?php
Ci::set_script(<<<EOD
     var page_script = function () {
        var the;
        return {
            init: function () {
                the = this;
            }
        };
    }();
    $(document).ready(function () {
        page_script.init();
    });
EOD
    , 'embed');
