<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model backend\models\Dt143be */

$this->title = 'DT143 - '.$model->id;
$this->params['breadcrumbs'][] = ['label' => 'DT143', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="dt143be-view">
    <table class="table table-borderless">
        <thead>
            <tr>
                <td colspan="1" rowspan="2" style="padding:none">
                    <?= $this->render('//common/_pdfheader.php', ['title' => 'Inline Track Welding Limited - MEDICAL SELF CERTIFICATION (DT143)']) ?>
                </td>
                <th width="20%" class="DarkerBlue" class="text-dark">
                    Pad No
                </th>
            </tr>
            <tr>
                <td>
                    <?= $model->padno ?>
                </td>
            </tr>
            <tr>
                <th colspan="2" class="text-dark">
                    For duties of a Safety Critical nature alertness and reasonable
                    physical fitness are
                    essential, it is therefore important to answer the following questions as accurately as possible.
                    When you declare NO you are accepting a degree of responsibility for your own safety.
                
                    <br/>
                    <br/>

                    After reading the following questions carefully, indicate 'YES' or 'NO' and sign the
                    declaration below to confirm that you have read and fully understood the questions on the form.
                </th>
            </tr>
        </thead>
        <tbody>
            <?php $x = 1 ?>
            <?php while($x <= 20 ){ ?>
                <?php $field = 'question'.$x; ?>
                    <?php if($model->getAttributeLabel($field) !== $field){ ?>
                        <tr>
                            <td>
                                <?= $model->getAttributeLabel($field) ?>
                            </td>
                            <td class="text-center text-uppercase">
                                <?= $model->$field ?>
                            </td>
                        </tr>
                    <?php } ?>
                <?php $x++ ?>
            <?php } ?>
        </tbody>
            <tr>
                <th class="DarkerBlue">
                    Signature
                </th>
                <th class="DarkerBlue">
                    Date
                </th>
            </tr>
            <tr>
                <td rowspan="3">
                    <?= HTML::IMG($model->signature, ['height' => '100px', 'alt' => $model->employeel ? $model->employeel->fullname : '' ]) ?>
                </td>
                <td>
                    <?= is_int($model->date) ? Date('d/m/Y', $model->date) : $model->date ?>
                </td>
            </tr>
            <tr>
                <th class="DarkerBlue">
                    Employee
                </th>
            </tr>
            <tr>
                <td>
                    <?= $model->employeel ? $model->employeel->fullname : '' ?>
                </td>
            </tr>
    </table>
</div>
<style>
.dt143be-view td, .dt143be-view th{
    padding : 10px;
}
</style>