<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model modules\forms\models\Dt131 */
?>
<div class="dt131-view">
    <table class="table table-borderless">
        <thead>
            <tr>
                <td class="nolb norb notbb" colspan="5">
                    <?= $this->render('//common/_viewheader', ['title' => 'Accident Report Form DT131:']);?>

                </td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th>Contract / Project:</th>
                <td><?= $model->contract ?></td>
                <td class="notbb">&nbsp;</td>
                <th>Ref Number:</th>
                <td><?= $model->ref ?></td>
            </tr>
            <tr>
                <th>Details of person who had accident:</th>
                <td></td>
                <td class="notbb">&nbsp;</td>
                <th>PPE being worn (if YES please specify):</th>
                <td><?= $model->ppeworn ?></td>
            </tr>
            <tr>
                <th>Name:</th>
                <td><?= $model->name ?></td>
                <td class="notbb">&nbsp;</td>
                <td colspan="2" rowspan="4"><?= $model->ppedetails ?></td>
            </tr>
            <tr>
                <th>Date of Birth:</th>
                <td><?= $model->dob ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th>Job Title:</th>
                <td><?= $model->jobtitle ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th>National Insurance Number:</th>
                <td><?= $model->ninumber ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th>Home Address:</th>
                <td><?= $model->homeaddress1 ?></td>
                <td class="notbb">&nbsp;</td>
                <th>First Aid treatment given (name of First Aider if YES):</th>
                <td><?= $model->firstaidgiven ?></td>
            </tr>
            <tr>
                <th><?= $model->hometown ?></th>
                <td></td>
                <td class="notbb">&nbsp;</td>
                <td colspan="2"><?= $model->firstaidername ?></td>
            </tr>
            <tr>
                <td colspan="2"><?= $model->homeaddress2 ?>
                    <?= $model->homecounty ?></td>
                <td class="notbb">&nbsp;</td>
                <th></th>
                <td></td>
            </tr>
            <tr>
                <th>Post Code:<?= $model->homepostcode ?></th>
                <td>Tel No:<?= $model->hometel ?></td>
                <td class="notbb">&nbsp;</td>
                <th></th>
                <td></td>
            </tr>
            <tr>
                <th>Employer:</th>
                <td>Inline Track Welding Ltd</td>
                <td class="notbb">&nbsp;</td>
                <th>Attended Hospital (if YES give name):</th>
                <td><?= $model->attendedhospital ?></td>
            </tr>
            <tr>
                <th>Employers Address</th>
                <td>ASHMILL BUSINESS PARK</td>
                <td class="notbb">&nbsp;</td>

                <td colspan="2"><?= $model->hospitalname ?></td>
            </tr>
            <tr>

                <td colspan="2">ASFORD ROAD, LENHAM - MAIDSTONE<br />KENT</td>
                <td class="notbb">&nbsp;</td>
                <th>What is the total number of man-days lost?</th>
                <td><?= $model->lostmandays ?></td>
            </tr>
            <tr>
                <th>Post Code: ME17 2GQ</th>
                <td>Tel No: 01622 854730</td>
                <td class="notbb">&nbsp;</td>
                <th></th>
                <td></td>
            </tr>
            <tr>
                <th colspan="2">Details of person completing report:</th>

                <td class="notbb" align="center" colspan="2">&nbsp;</td>
                <th>Details of any witnesses:</th>
                <td></td>
            </tr>
            <tr>
                <th>Name</th>
                <td><?= $model->employer ?></td>
                <td class="notbb">&nbsp;</td>
                <td colspan="2" rowspan="6"><?= $model->witnesses ?></td>
            </tr>
            <tr>
                <th>Job Title</th>
                <td><?= $model->employeraddress1 ?></td>
                <td class="notbb">&nbsp;</td>


            </tr>
            <tr>
                <th>Business Address</th>
                <td>Ashmill Business Park</td>
                <td class="notbb">&nbsp;</td>

            </tr>
            <tr>
                <td colspan="2">Asford Road, Lenham - Maidstone</td>
                <td class="notbb">&nbsp;</td>

            </tr>
            <tr>
                <td colspan="2">Kent</td>
                <td class="notbb">&nbsp;</td>

            </tr>
            <tr>
                <th>Post Code: ME17 2GQ</th>
                <td>Tel No: 01622 854730</td>
                <td class="notbb">&nbsp;</td>

            </tr>
            <tr>
                <th>Employer</th>
                <td></td>
                <td class="notbb">&nbsp;</td>
                <th colspan="2">Immediate action taken to prevent </th>

            </tr>
            <tr>
                <th style="text-align: left">Signature:<img src="<?= $model->employersign ?>"></img>
                </th>
                <td style="text-align: left">Date:<?= $model->employersigndate ?></td>
                <td class="notbb">&nbsp;</td>
                <td colspan="2" rowspan="9"><?= $model->actiontaken ?></td>
            </tr>
            <tr>
                <th>Details of Accident:</th>
                <td></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th>Date of Accident: <?= $model->detailsdate ?></th>
                <td>Time of Accident: <?= $model->detailstime ?></td>
                <td class="notbb">&nbsp;</td>


            </tr>
            <tr>
                <th>Location of Accident</th>
                <td><?= $model->detailslocation ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th>Did the accident occur on Network Rail <br /> Controlled Infrastructure</th>
                <td><?= $model->detailsnwraili ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th>ELR:<?= $model->detailselr ?></th>
                <td>Mileage:<?= $model->detailsmileage ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <th colspan="2">About the Accident (what happened?):</th>

                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" rowspan="8"><?= $model->about ?></td>
                <td class="notbb">&nbsp;</td>
            </tr>
            <tr>
                <td class="notbb">&nbsp;</td>
            </tr>




            <tr>
                <td class="notbb">&nbsp;</td>
                <th>Confirmed by Line Manager:</th>
                <td><?= $model->confirmedlineman ?></td>
            </tr>
            <tr>
                <td class="notbb">&nbsp;</td>
                <th>Name</th>
                <td><?= $model->linemanname ?></td>
            </tr>
            <tr>
                <td class="notbb">&nbsp;</td>
                <th>Job Title</th>
                <td><?= $model->linemantitle ?></td>
            </tr>
            <tr>
                <td class="notbb">&nbsp;</td>
                <th>Signature: <img src="<?= $model->linemansign ?>"></img></th>
                <td>Date: <?= $model->linemansigndate ?></td>
            </tr>
            <tr>
                <td class="notbb">&nbsp;</td>
                <th>Accidents Reportable under RIDDOR 95:</th>
                <td><?= $model->riddor95 ?></td>
            </tr>
            <tr>
                <td class="notbb">&nbsp;</td>
                <th>Has a F2508 been sent to the HMRI?</th>
                <td>Initials: <?= $model->riddor95initial ?></td>
            </tr>
        </tbody>
    </table>

    <pagebreak orientation='portrait' />
    <table class="Table">
        <tbody>

            <tr>
                <th class="DarkerBlue" colspan="5">Investigators / HSEQ Manager Findings (attach Sketches, Photographs,
                    Witness Statements as required).</th>
            </tr>
            <tr>
                <td colspan="5" height="125px"><?= $model->findings ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="5">Conclusions</th>
            </tr>
            <tr>
                <td colspan="5" height="125px"><?= $model->conclusions ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="5">Immediate Causes</th>
            </tr>
            <tr>
                <td colspan="5" height="125px"><?= $model->inmmediatecauses ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="5">Underlying Causes</th>
            </tr>
            <tr>
                <td colspan="5" height="125px">
                    <?= $model->underlyingcauses ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="5">Remedial Actions</th>
            </tr>
            <tr>
                <td colspan="5" height="125px">
                    <?= $model->remedialaction ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="5">Recommendations</th>
            </tr>
            <tr>
                <td colspan="5" height="125px"><?= $model->recommendations ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue">Signed:</th>
                <td colspan="2" height="75px"><img src="<?= $model->supervisorsigned ?>"></img></td>
                <th class="DarkerBlue">Signed:</th>
                <td> <img src="<?= $model->hseqmansign ?>"></img></td>
            </tr>
            <tr>
                <th class="DarkerBlue">Print Name:</th>
                <td colspan="2"><?= $model->superprint ?><br />(Line Manager/Supervisor)</td>
                <th class="DarkerBlue">Print Name:</th>
                <td><?= $model->hseqprint ?><br />HSEQ Manager</td>
            </tr>
            <tr>
                <th class="DarkerBlue">Date:</th>
                <td colspan="2"><?= $model->linemandate ?></td>
                <th class="DarkerBlue">Date:</th>
                <td><?= $model->hseqdate ?></td>
            </tr>
		</tbody>
	</table>
<?php if (!str_contains(Yii::$app->controller->action->id, 'pdf')){ ?>
    <div class="box">
        <?= Html::a('Witness Form', ['/forms/dt132/create', 'masterid' => $model->id, 'actid' => $model->actid, 'location' => $model->detailslocation, 'contract' => $model->contract, 'ref' => $model->ref, ], ['class' => 'btn btn-primary', 'target'=>'_blank', ]); ?>
    </div>
    <?php } ?>
</div>