<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\date\DatePicker;

/* @var $this yii\web\View */
/* @var $model modules\forms\models\Dt204 */
/* @var $form yii\widgets\ActiveForm */
$yesno = [0 => 'NO', 1 => 'YES'];
$risk = [0 => 'High risk', 1 => 'Non high risk switch'];
$swdesign = ['Bull Head' => 'Bull Head','Full Depth Inclined 109lb' => 'Full Depth Inclined 109lb', 'Full Depth Inclined 110lb' => 'Full Depth Inclined 110lb', 'Full Depth Vertical CEN56 (113A)' => 'Full Depth Vertical CEN56 (113A)', 'Shallow Depth Vertical CEN56(113A)' =>'Shallow Depth Vertical CEN56(113A)', 'Shallow Depth Vertical CEN54(UIC54)' =>'Shallow Depth Vertical CEN54(UIC54)', 'Shallow Depth Vertical RT60' =>'Shallow Depth Vertical RT60', 'Shallow Depth Vertical NR60' =>'Shallow Depth Vertical NR60'];
if ($model->rwitmedate) {$model->rwitmedate = date('d/m/Y', $model->rwitmedate);}
if ($model->icinspectordate) {$model->icinspectordate = date('d/m/Y', $model->icinspectordate);}
if ($model->rwismtdate) {$model->rwismtdate = date('d/m/Y', $model->rwismtdate);}
if ($model->rwischdate) {$model->rwischdate = date('d/m/Y', $model->rwischdate);}
if ($model->dateinspected) {$model->dateinspected = date('d/m/Y', $model->dateinspected);}
if ($model->icsmtdate) {$model->icsmtdate = date('d/m/Y', $model->icsmtdate);}

$this->registerJsFile('/js/touch_0.js'); 
$this->registerJsFile('/js/touch_1.js');
$this->registerJsFile('/js/touch_2.js');
$this->registerJsFile('/js/touch_3.js');
$this->registerJsFile('/js/touch_4.js');
$this->registerJsFile('/js/updatesignatures.js'); //load canvas_3
?>
<script>
window.onload = function() {
    //	init(); //Drawing
    init0(); //canvas_0
    init1(); //canvas_1
    init2(); //canvas_2
    init3(); //canvas_3
    init4(); //canvas_3
    //	init5(); //canvas_3
};
</script>
<div class="dt204-form">
    <table class="Table">
        <tr>
            <td width="33%">NR/LE/TRK/0053 <br /> Switch Inspection Form</td>
            <td width="33%" class="text-center">TEF 3029A (1 of 4)<br /> Issue 11 - March 2018</td>
            <td width="33%" class="text-right"><?= HTML::IMG('/images/NWR.png')?></td>
        </tr>
    </table>
    <?php $form = ActiveForm::begin(); ?>
    <table class="Table">
        <tr>
            <th class="DarkerBlue" colspan="8">Site Information</th>
        </tr>
        <tr>
            <th class="DarkerBlue">Site Location</th>
            <td colspan="3"><?= $form->field($model, 'location')->textInput()->label(false)?></td>
            <th class="DarkerBlue">Point Number</th>
            <td><?= $form->field($model, 'pointno')->textInput()->label(false)?></td>
            <th class="DarkerBlue">Date Inspected</th>
            <td><?= $form->field($model, 'dateinspected')->widget(DatePicker::class, ['size' => 'sm', 'name'=>'dateinspected', 'pluginOptions' => ['todayHighlight' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?>
            </td>
        </tr>
        <tr>
            <th class="DarkerBlue">NR4 Sidewear Gauge No:</th>
            <td><?= $form->field($model, 'nr4swgno')->textInput()->label(false)?></td>
            <th class="DarkerBlue">ELR:</th>
            <td><?= $form->field($model, 'elr')->textInput()->label(false)?></td>
            <th class="DarkerBlue">Track ID</th>
            <td><?= $form->field($model, 'trackid')->textInput()->label(false)?></td>
            <th class="DarkerBlue">Mileage as toes</th>
            <td><?= $form->field($model, 'mileageattoes')->textInput()->label(false)?></td>

        </tr>
        <tr>
            <th class="DarkerBlue">Switch Rail Radius Gauge No:</th>
            <td><?= $form->field($model, 'switchrailradius')->textInput()->label(false)?></td>
            <th class="DarkerBlue" colspan="2">Switch size A - H:</th>
            <td><?= $form->field($model, 'switchsize')->textInput()->label(false)?></td>
            <td colspan="3" class="text-center">** Denote as Appropiate</td>

        </tr>
        <tr>
            <th class="DarkerBlue">TGP8 No:</th>
            <td><?= $form->field($model, 'tp8no')->textInput()->label(false)?></td>
            <th colspan="4">&nbsp;</th>
            <td><?= $form->field($model, 'risk')->radiolist($risk, ['prompt' => 'Please Select'])->label(false)?></td>


        </tr>
        <tr>
            <th class="DarkerBlue">Switch Wear Gauge No:</th>
            <td><?= $form->field($model, 'switchweargaugeno')->textInput()->label(false)?></td>
            <th rowspan="2" colspan="2" class="DarkerBlue">Switch Design</th>
            <td rowspan="2" colspan="4">
                <?= $form->field($model, 'swtichdesign')->dropdownList($swdesign, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th colspan="" class="DarkerBlue">Premium Rail</th>
            <td><?= $form->field($model, 'premiumrail')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>


    </table>
    <table class="Table">
        <tr>
            <th class="DarkerBlue" colspan="21">Seating Gap (mm) Gap between underside of switchblade and slide
                baseplate.</th>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <th colspan="10">LH</th>
            <th colspan="10">RH</th>
        </tr>
        <tr>
            <td>Bearer No:</td>
            <th>Toe</th>
            <th>2</th>
            <th>3</th>
            <th>4</th>
            <th>5</th>
            <th>6</th>
            <th>7</th>
            <th>8</th>
            <th>9</th>
            <th>10</th>
            <th>Toe</th>
            <th>2</th>
            <th>3</th>
            <th>4</th>
            <th>5</th>
            <th>6</th>
            <th>7</th>
            <th>8</th>
            <th>9</th>
            <th>10</th>
        </tr>
        <tr>
            <td>Gap No (mm):</td>
            <td><?= $form->field($model, 'lhgaptoe')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap2')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap3')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap4')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap5')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap6')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap7')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap8')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap9')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'lhgap10')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgaptoe')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap2')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap3')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap4')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap5')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap6')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap7')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap8')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap9')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'rhgap10')->textInput()->label(false)?></td>

        </tr>
    </table>
    <table class="Table">
        <tr>
            <th colspan="6" class="DarkerBlue">Inspection Type</th>
        </tr>
        <tr>
            <td width="16.6%" class="DarkerBlue">Initial Inspection</td>
            <td width="16.6%" align="center">
                <?= $form->field($model, 'itii')->checkbox(['label' => false])->label(false); ?></td>
            <td width="16.6%" class="DarkerBlue">Post Work Independent Inspection</td>
            <td width="16.6%" align="center">
                <?= $form->field($model, 'itpwii')->checkbox(['label' => false])->label(false); ?></td>
            <td width="16.6%" class="DarkerBlue">Follow up Inspection</td>
            <td width="16.6%" align="center">
                <?= $form->field($model, 'itfui')->checkbox(['label' => false])->label(false); ?></td>

        </tr>
    </table>

    <style>
    .orange {
        color: orange;
    }

    .green {
        color: #23fb04;
    }

    .red {
        color: red;
    }

    .bggrey {
        background-color: Grey;
    }
    </style>
    <table class="Table">
        <tr>
            <th width="3%" colspan="1">&nbsp;</th>
            <th colspan="5" class="text-right">Action required if any shaded box is ticked</th>
            <th width="12.5%" class="text-center LighterBlue">LH</th>
            <th width="12.5%" class="text-center LighterBlue">RH</th>
        </tr>
        <tr>
            <td class="notbb nolb norb">&nbsp;</td>
            <th colspan="5" class="DarkerBlue">Visual Inspection</th>
            <th class="text-center">Y/N</th>
            <th class="text-center">Y/N</th>
        </tr>

        <tr>
            <td rowspan="12" class="DarkerBlueC">
                <div class="rotate">Closed Switch</div>
            </td>
            <td colspan="7">
                <div id="help35" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment <br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="">3.5</td>
                                        <td rowspan="">Signs of flange climb</td>
                                        <td rowspan="2">Anywhere within the <br /> machined area</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>9W</td>
                                        <td rowspan="">All switches</td>
                                        <td>Ban to facing moves. Grind switch running edge to correct profile.</td>
                                    </tr>
                                    <tr>
                                        <td>3.5</td>
                                        <td>Vertical cracking on switch rail</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td>see TRK/001</td>
                                        <td rowspan="">All switches</td>
                                        <td>As per NR/L2/TRK/001/Mod 07</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="3">3.5</td>
                                        <td rowspan="3">Lipping</td>
                                        <td rowspan="3">Anywhere within the planed length of the switch or stock rail
                                        </td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>W13</td>
                                        <td rowspan="3">All switches</td>
                                        <td>Grind repair within 13 weeks (Cat 1A - 2)</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>W26</td>
                                        <td>Grind repair within 26 weeks (Cat 3 - 4)</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>W52</td>
                                        <td>Grind repair within 52 weeks (Cat 5 - 6)</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>

        <tr>
            <th rowspan="6" class="txt-center">
                3.5<br /><?= HTML::A('<i class="fa fa-plus"></i>','#help35', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td colspan="3">Any signs of switch tip being struck or damaged</td>
            <td><?= $form->field($model, 'vi1lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi1rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Required front stretcher bar kicking strap clearance present (See note 1)</td>
            <td><?= $form->field($model, 'vi2lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi2rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Any signs of flange climb throughout the switch planed length ?</td>
            <td><?= $form->field($model, 'vi3lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi3rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is any damage visible throughout the planed length of the switch ?</td>
            <td><?= $form->field($model, 'vi4lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi4rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is damage visible at more than one location?</td>
            <td><?= $form->field($model, 'vi5lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi5rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Any sharp corner or faceted edge present on the running edge of switch.</td>
            <td><?= $form->field($model, 'vi6lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi6rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th colspan="5">Switch rail height relative to stock rail sidewear scar through dimension B from switch
                toes.</th>
            <td class="DarkerBlue"></td>
            <td class="DarkerBlue"></td>

        </tr>
        <tr>
            <td colspan="7">
                <div id="help371" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment <br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.7.1</td>
                                        <td rowspan="2">Switch rail is level with or projects above the <br />stock rail
                                            sidewear scar anywhere along <br />machined length</td>
                                        <td rowspan="5">up to 2m from switch tip</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F1</td>
                                        <td rowspan="5">All switches</td>
                                        <td>Ban to facing moves. Grind switch running edge to correct profile.</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9F</td>
                                        <td>Ban to facing moves until stock rail is weld repaired or replaced</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.7.2</td>
                                        <td rowspan="2">Switch rail is within 2mm below the stock rail sidewear scar
                                            within the machined length</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>N/A</td>
                                        <td>Increase inspection frequency to 28 days until weld repair carried out</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F26</td>
                                        <td>Weld repair stock rail within 26 weeks</td>
                                    </tr>

                                    <tr>
                                        <td>3.7.3</td>
                                        <td>Switch rail has been forced into the sidewear on the stock rail and formed a
                                            ramp</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>see TRK/3W1</td>
                                        <td>Grind repair within 1 week</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>

        <tr>
            <th>
                3.7.1<br />
                <?= HTML::A('<i class="fa fa-plus"></i>','#help371', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td colspan="3">Is the switch rail level with or projecting above the stock rail sidewear scar?</td>
            <td><?= $form->field($model, 'vi7lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi7rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>3.7.2</th>
            <th>&#8627;</th>
            <td colspan="3">Is the switch rail within 2mm below the stock rail sidewear scar?</td>
            <td><?= $form->field($model, 'vi8lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi8rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>3.7.3</th>
            <th>&#8627;</th>
            <td colspan="3">Has the switch rail top been forced onto the sidewear on the stock rail ?</td>
            <td><?= $form->field($model, 'vi9lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi9rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <td rowspan="8" class="DarkerBlueC">
                <div class="rotate">Open Switch</div>
            </td>
            <th colspan="5">Cracking of the open switch rail within machined length</th>
            <td class="DarkerBlue"></td>
            <td class="DarkerBlue"></td>
        </tr>
        <tr>
            <th rowspan="3">3.5</th>
            <th>&#8627;</th>
            <td colspan="3">Is there horizontal cracking or damage visible ?</td>
            <td><?= $form->field($model, 'i10lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi10rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is there horizontal cracking or damage visible at more than one location?</td>
            <td><?= $form->field($model, 'vi11lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi11rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is there vertical cracking on the switch rail?</td>
            <td><?= $form->field($model, 'vi12lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi12rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th colspan="5">Lipping in the machined length of the open switch</th>
            <td class="DarkerBlue">&nbsp;</td>
            <td class="DarkerBlue">&nbsp;</td>
        </tr>
        <tr>
            <th rowspan="3">3.5</th>
            <th>&#8627;</th>
            <td colspan="3">Lipping present on the stock rail running edge ?</td>
            <td><?= $form->field($model, 'vi13lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi13rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Lipping on rear face of switch rail ?</td>
            <td><?= $form->field($model, 'vi14lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi14rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Lipping elsewhere on switch or stock rail ?</td>
            <td><?= $form->field($model, 'vi15lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi15rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <th colspan="5">Lubrication</th>
            <td class="DarkerBlue"></td>
            <td class="DarkerBlue"></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <th rowspan="2">3.5</th>
            <th>&#8627;</th>
            <td colspan="3">Is lubrication present on the switch rail ?</td>
            <td><?= $form->field($model, 'vi16lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi16rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <th>&#8627;</th>
            <td colspan="3">If a fixed lubricator is installed is it functioning correctly ?</td>
            <td><?= $form->field($model, 'vi17lh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'vi17rh')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <th colspan="3" class="DarkerBlue">Stock rail sidewear Inspection (using NR4 plain rail sidewear gauge)</th>
            <th class="text-center DarkerBlue" colspan="2">LH</th>
            <th class="text-center DarkerBlue" colspan="2">RH</th>
        </tr>
        <tr>
            <td rowspan="15" class="DarkerBlueC">
                <div class="rotate">Open Switch</div>
            </td>
            <th colspan="3">Measure sidewear of open stock rail front over dimension A at 500mm increments.</th>
            <th>Y/N</th>
            <th>Reading</th>
            <th>Y/N</th>
            <th>Reading</th>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="7">
                <div id="help361" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment <br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.6.1</td>
                                        <td rowspan="2">Sidewear on stock rail front (sidewear reading 10 - 12) - See
                                            Note 1</td>
                                        <td rowspan="5">up to 1m from switch tip</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>N/A</td>
                                        <td rowspan="5">All switches</td>
                                        <td>Enhance inspection in Ellipse to 2 monthly ( or TME assessed frequency)</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F26</td>
                                        <td>Weld repair within 26 weeks</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.6.1</td>
                                        <td rowspan="2">Sidewear on stock rail fronts (sidewear reading 7-9) - See Note
                                            1</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>N/A</td>
                                        <td>Increase inspection frequency to 56 days until weld repair carried out</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td>3F1</td>
                                        <td>Weld repair stock rail within 7 days</td>
                                    </tr>

                                    <tr>
                                        <td>3.6.1</td>
                                        <td>Sidewear on stock rail behind switch (sidewear reading 6 or less)</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>9x</td>
                                        <td>Ban to facing moves until switch is replaced</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th rowspan="3">
                3.6.1<br /><?= HTML::A('<i class="fa fa-plus"></i>','#help361', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td>Is worst sidewear reading 6 or less</td>
            <td><?= $form->field($model, 'srwilh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwilh1reading')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'srwirh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwirh1reading')->textInput()->label(false)?></td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td>Is worst sidewear reading between 7 - 9</td>
            <td><?= $form->field($model, 'srwilh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwilh2reading')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'srwirh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwirh2reading')->textInput()->label(false)?></td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td>Is worst sidewear reading between 10 - 12</td>
            <td><?= $form->field($model, 'srwilh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwilh3reading')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'srwirh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwirh3reading')->textInput()->label(false)?></td>
        </tr>
        <tr>
            <th colspan="3">Measure sidewear of open stock rail behind the switch tip throughout dimension B at 500mm
                increments.</th>
            <th>Y/N</th>
            <th>Reading</th>
            <th>Y/N</th>
            <th>Reading</th>
        </tr>
        <tr>
            <td colspan="7">
                <div id="help362" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment <br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.6.2</td>
                                        <td rowspan="2">Sidewear on stock rail behind switch (sidewear reading 10 -12) -
                                            See Note 2</td>
                                        <td rowspan="5">up to 2m from switch tip</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>N/A</td>
                                        <td rowspan="5">All switches</td>
                                        <td>Increase inspection frequency to 56 days until weld repair carried out</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F26</td>
                                        <td>Weld repair within 26 weeks</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.6.2</td>
                                        <td rowspan="2">Sidewear on stock rail behind switch (sidewear reading 7 - 9) -
                                            See Note 2</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>N/A</td>
                                        <td>Increase inspection frequency to 28 days until weld repair carried out</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td>3F1</td>
                                        <td>Weld repair stock rail within 7 days</td>
                                    </tr>

                                    <tr>
                                        <td>3.6.2</td>
                                        <td>Sidewear on stock rail behind switch (sidewear reading 6 or less)</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>9x</td>
                                        <td>Ban to facing moves until switch is replaced</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th rowspan="3">
                3.6.2
                <?= HTML::A('<i class="fa fa-plus"></i>','#help362', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td>Is worst sidewear reading 6 or less</td>
            <td width="12.5%">
                <?= $form->field($model, 'srwilh4')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td width="12.5%"><?= $form->field($model, 'srwilh4reading')->textInput()->label(false)?></td>
            <td width="12.5%">
                <?= $form->field($model, 'srwirh4')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td width="12.5%"><?= $form->field($model, 'srwirh4reading')->textInput()->label(false)?></td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td>Is worst sidewear reading between 7 - 9</td>
            <td><?= $form->field($model, 'srwilh5')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwilh5reading')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'srwirh5')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwirh5reading')->textInput()->label(false)?></td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td>Is worst sidewear reading between 10 - 12</td>
            <td><?= $form->field($model, 'srwilh6')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwilh6reading')->textInput()->label(false)?></td>
            <td><?= $form->field($model, 'srwirh6')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srwirh6reading')->textInput()->label(false)?></td>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="5">Switch rail running edge radius inspection (using Switch Rail Radius
                Gauge)</th>
            <th class="DarkerBlue text-center">LH</th>
            <th class="DarkerBlue text-center">RH</th>
        </tr>
        <tr>
            <th class="" colspan="5">Check switch running edge on open switch over dimension C</th>
            <th class="text-center">Y/N</th>
            <th class="text-center">Y/N</th>
        </tr>
        <tr>
            <td colspan="7">
                <div id="help38" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment <br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="4">3.8</td>
                                        <td rowspan="4">Sharp corner or faceted edge on running edge of switch</td>
                                        <td rowspan="4">up to 2m from switch tip</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W#</td>
                                        <td rowspan="2">High risk (see note 3)</td>
                                        <td>Grind repair within 3 days</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td>9W</td>
                                        <td>Ban to facing moves until switch has been ground</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W1</td>
                                        <td>Premium grade rail</td>
                                        <td>Grind repair within 1 week</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W13</td>
                                        <td>All other switches</td>
                                        <td>Grind repair within 13 weeks</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th rowspan="2">
                3.8<br /><?= HTML::A('<i class="fa fa-plus"></i>','#help38', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td colspan="3">Is the blade in contact with sections A and B with a gap at C ?</td>
            <td><?= $form->field($model, 'srrelh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srrerh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">For thin switch blades, is contact made throughout section A and C to the top of the switch
                rail ?</td>
            <td><?= $form->field($model, 'srrelh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'srrerh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>


        <tr>
            <td>&nbsp;</td>
            <th class="DarkerBlue" colspan="5">Flange Contact Angle Inspection (using TGP8 and feeler gauge, allowing
                for any seating gap)</th>
            <th class="DarkerBlue text-center">LH</th>
            <th class="DarkerBlue text-center">RH</th>
        </tr>
        <tr>
            <td rowspan="27" class="DarkerBlueC">
                <div class="rotate">Closed Switch</div>
            </td>
            <th class="" colspan="5">Check point of contact throughout dimension D at 100mm increments.</th>
            <th class="text-center">Y/N</th>
            <th class="text-center">Y/N</th>
        </tr>
        <tr>
            <td colspan="7">
                <div id="help39" class="helpblock collapse" aria-expanded="false" style="">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment<br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="3">3.9</td>
                                        <td rowspan="3">Shallow flange contact angle</td>
                                        <td rowspan="3">Contact at or below 55° <br /> marker for ≥ 50mm <br /> within
                                            the switch rail <br /> machined length.</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9F</td>
                                        <td rowspan="3">All switches</td>
                                        <td>Ban to facing moves. Weld repair switch rail sidewear.</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td>9W</td>
                                        <td>Ban to facing moves. Grind switch to a minimum 65° angle</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="red fa fa-square"></i></td>
                                        <td>9x</td>
                                        <td>Ban to facing moves. Replace switch</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="3">3.9</td>
                                        <td rowspan="3">Shallow flange contact angle</td>
                                        <td rowspan="3">Contact at or below 60° mark for ≥200mm within the switch rail
                                            machined length.</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3Y#F1</td>
                                        <td rowspan="3">All switches</td>
                                        <td>Weld repair switch rail sidewear within 7 days</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W#Y0</td>
                                        <td>Grind switch to a minimum angle of 65° within 3 days.</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="red fa fa-square"></i></td>
                                        <td>9x</td>
                                        <td>Ban to facing moves. Replace switch.</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.9</td>
                                        <td rowspan="2">Shallow flange contact angle</td>
                                        <td rowspan="2">Contact below the 65° mark for ≥ 200mm within the switch rail
                                            machined length.</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W13</td>
                                        <td rowspan="">High risk switches</td>
                                        <td>Grind repair to a minimum switch blade angle of 65° within 13 weeks</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3W26Y13</td>
                                        <td>All other switches</td>
                                        <td>Grind repair to a minimum switch blade angle of 65° within 26 weeks.<br />
                                            Inspect 13 weekly until switch is repaired.</td>
                                    </tr>
                                </table>
                            </div>
                        
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th width="5%" rowspan="3" style="text-align:center">
                3.9<br /><?= HTML::A('<i class="fa fa-plus"></i>','#help39', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>

            <th width="1%">&#8627;</th>
            <td width="62%" colspan="3">Is there any contact at or below the (55°) red marker for ≥50mm ?</td>
            <td width="12.5%">
                <?= $form->field($model, 'fcailh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td width="12.5%">
                <?= $form->field($model, 'fcairh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is there any contact at or below the (60°) white marker for ≥200mm ?</td>
            <td><?= $form->field($model, 'fcailh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'fcairh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is there any contact below the (65°) green marker for ≥200mm ?</td>
            <td><?= $form->field($model, 'fcailh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'fcairh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="5">Switch and stock rail; wear and damage inspection (using switch wear
                gauge, allowing for any seating gap)</th>
            <th class="DarkerBlue text-center">LH</th>
            <th class="DarkerBlue text-center">RH</th>
        </tr>
        <tr>
            <th class="text-center" colspan="5">* Not applicable for straight cut switches and NR/RT60 switches *</th>
            <th class="text-center" rowspan="2">Y/N</th>
            <th class="text-center" rowspan="2">Y/N</th>
        </tr>
        <tr>
            <th colspan="3">Pass Gauge 1 over the the closed switch, from the switch toe to 40mm</th>
        </tr>
        <tr>
            <td colspan="7">
                <div id="help3101" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment<br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.10.1</td>
                                        <td rowspan="2">Gauge 1 does not pass over switch rail (Head worn stock rail)
                                        </td>
                                        <td rowspan="2">Up to 40mm from switch tip</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W2</td>
                                        <td rowspan="2">Not straight cut switches</td>
                                        <td>Grind repair within 14 days</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td>9W</td>
                                        <td>Ban to facing moves if not ground</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.10.1</td>
                                        <td rowspan="2">The gap between the bottom of gauge 1 and the top of the switch
                                            rail is ≤ 1mm</td>
                                        <td rowspan="2">Up to 40mm from switch tip</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td rowspan="2">3W13Y4</td>
                                        <td rowspan="2">Not straight cut switches</td>
                                        <td rowspan="2">Grind repair within 13 weeks. Increase inspection frequency to
                                            every 4 weeks.</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th rowspan="2">
                3.10.1<br /><?= HTML::A('<i class="fa fa-plus"></i>','#help3101', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td colspan="3">Does Gauge 1 pass over the switch rail?</td>
            <td><?= $form->field($model, 'ssrwdilh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'ssrwdirh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">is there a gap of 1mm or less between bottom of gauge 1 and top of switch rail ?</td>
            <td><?= $form->field($model, 'ssrwdilh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'ssrwdirh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th class="text-center" colspan="5">Applicable for all switches</th>
            <th class="DarkerBlue text-center">LH</th>
            <th class="DarkerBlue text-center">RH</th>
        </tr>
        <tr>
            <th class="text-left" colspan="5">Pass Gauge 2 over the closed switch throughout the machined length.</th>
            <th class="text-center" rowspan="">Y/N</th>
            <th class="text-center" rowspan="">Y/N</th>
        </tr>

        <tr>
            <td colspan="7">
                <div id="help3104" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment<br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.10.4</td>
                                        <td rowspan="2">Horizontal cracking or damage anywhere within the machined
                                            length of switch (not the switch tip)</td>
                                        <td rowspan="2">For >200mm (see Note 4)</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F1</td>
                                        <td rowspan="2">All switches</td>
                                        <td>Weld repair within 7 days</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9F</td>
                                        <td>Ban to facing moves until weld repair is carried out</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">3.10.4</td>
                                        <td rowspan="2">Horizontal cracking or damage anywhere within the machined
                                            length of switch (not the switch tip)</td>
                                        <td rowspan="2">At more than one location</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3Y#F1</td>
                                        <td rowspan="2">All switches</td>
                                        <td>Weld repair within 7 days</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9F</td>
                                        <td>Ban to facing moves until weld repair is carried out</td>
                                    </tr>

                                    <tr>
                                        <td rowspan="2">3.10.4</td>
                                        <td rowspan="2">Horizontal cracking or damage anywhere within the machined
                                            length of closed switch (not the switch tip)</td>
                                        <td rowspan="2">For < 200mm at one location</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F13</td>
                                        <td rowspan="2">All switches</td>
                                        <td>Weld repair within 13 weeks (Cat 1A - 3)</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F26</td>
                                        <td>Weld repair withn 26 weeks (Cat 4 -6)</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>


        <tr>
            <th rowspan="7">
                3.10.4<br /><?= HTML::A('<i class="fa fa-plus"></i>','#help3104', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th class="text-left" colspan="4">Does Gauge 2 pass over the switch rail? If YES undertake the following
                additional checks:</th>
            <td><?= $form->field($model, 'allswlh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh1')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is the switch rail damaged for ≥ 200mm ?</td>
            <td><?= $form->field($model, 'allswlh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh2')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is the switch rail damaged for < 200mm ?</td>
            <td><?= $form->field($model, 'allswlh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh3')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is the damage in more than one location ?</td>
            <td><?= $form->field($model, 'allswlh4')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh4')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is the damage in the switch tip area ?</td>
            <td><?= $form->field($model, 'allswlh5')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh5')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Are there any signs of flange contact at or preceding the point of gauge 2 contact ?</td>
            <td><?= $form->field($model, 'allswlh6')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh6')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Are there any signs of flange climb at this point ?</td>
            <td><?= $form->field($model, 'allswlh7')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh7')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>

        <tr>
            <td colspan="7">
                <div id="help3105" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment<br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr style="display:none;">
                                        <td rowspan="7">3.10.5</td>
                                        <td rowspan="3">Gauge 2 passes over the switch rail (damaged switch rail)</td>
                                        <td rowspan="2">Switch rail is damaged at this point</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F1</td>
                                        <td rowspan="3">All switches</td>
                                        <td>Weld repair within 7 days</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9F</td>
                                        <td>Ban to facing moves until weld repair is carried out</td>
                                    </tr>
                                    <tr>
                                        <td>Damage is in the switch tip area and P8 contact is below 60° mark.</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9F1</td>
                                        <td>Ban to facing moves. Weld repair within 7 dayst</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="">Gauge 2 contacts switch rail (damaged switch rail)</td>
                                        <td>Switch rail is damaged at this point</td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>3F1</td>
                                        <td rowspan="">All switches</td>
                                        <td>Ban to facing moves. Replace switch.</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">Gauge 2 passes over the switch rail (low switch rail) and there
                                            is evidence of flange contact or flange climb at or preceding this point.
                                            (See note 5)</td>
                                        <td rowspan="2">Switch rail undamaged at this point and flange climb or contact
                                            is at or precedes this point</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td>9X</td>
                                        <td>High risk switches</td>
                                        <td>Ban to facing moves. Replace switch.</td>
                                    </tr>
                                    <tr>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="orange fa fa-square"></i></td>
                                        <td>9W#</td>
                                        <td>All switches</td>
                                        <td>Ban to facing moves until switch is ground to lower switch top to prevent
                                            flange contact. Replace switch within 26 weeks</td>
                                    </tr>
                                    <tr>
                                        <td>Gauge 2 passes over the switch rail (low switch rail) and there is evidence
                                            of flange contact or flange climb at or preceding this point. (See note 5)
                                        </td>
                                        <td rowspan="2">Switch rail undamaged at this point and flange climb or contact
                                            is at or precedes this point</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td>3X</td>
                                        <td rowspan="">All switches (See note 5)</td>
                                        <td>Replace switch half set within 26 weeks</td>
                                    </tr>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr style="display:none;">
            <th rowspan="">
                3.10.5 <br />
                <?= HTML::A('<i class="fa fa-plus"></i>','#help3105', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>

            </th>
            <th>&#8627;</th>
            <td colspan="3">Is the distance between the crown of the stock rail and top of switch rail ≤ 20mm ? (Low
                switch rail)</td>
            <td><?= $form->field($model, 'allswlh8')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh8')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <td colspan="7">
                <div id="help3106" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help
                                <?= HTML::A('<i class="fa fa-plus"></i>NOTES','#helpnotes', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
                            </div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <th class="DarkerBlue" rowspan="2">053 Derailment<br />Hazard Action</th>
                                        <th class="DarkerBlue" rowspan="2">Defect Type</th>
                                        <th class="DarkerBlue" rowspan="2">Location</th>
                                        <th class="DarkerBlue" colspan="3">Preference</th>
                                        <th class="DarkerBlue" rowspan="2">MAC</th>
                                        <th class="DarkerBlue" rowspan="2">Applicable to:</th>
                                        <th class="DarkerBlue" rowspan="2">Explanation of MAC</th>
                                    </tr>
                                    <tr>
                                        <td class="DarkerBlue">Welding</td>
                                        <td class="DarkerBlue">Grinding</td>
                                        <td class="DarkerBlue">Switch<br />Replacement</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="5">3.10.6</td>
                                        <td rowspan="5">Wheel strike of switch tip</td>
                                        <td rowspan="1">Switch rail is damaged at this point</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3w#</td>
                                        <td rowspan="5">All switches</td>
                                        <td>Grind repair within 3 days.</td>
                                    </tr>
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9</td>
                                        <td>Ban to facing moves. Check the back to back track gauge at the switch tips.
                                        </td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">Switch is stood off stock rail > 4mm</td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>9</td>
                                        <td>Ban to facing moves. Request S&T to carry out required adjustment.</td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2">All other conditions</td>
                                        <td class="bggrey"></td>
                                        <td align="center"><i class="green fa fa-circle"></i></td>
                                        <td class="bggrey"></td>
                                        <td>3W1</td>
                                        <td>Grind repair within 7 days</td>
                                    </tr>s
                                    <tr>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td class="bggrey"></td>
                                        <td>N/A</td>
                                        <td>Check the back to back track gauge at the switch tips. Request S&T to carry
                                            out required adjustment.</td>
                                    </tr>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th rowspan="3">3.10.6<br />
                <?= HTML::A('<i class="fa fa-plus"></i>','#help3106', ['data' => ['parent' => '#new-supplier', 'toggle' => 'collapse'], 'class'=> 'collapsed btn btn-lg', 'aria-expanded' => 'false' ]) ?>
            </th>
            <th>&#8627;</th>
            <td colspan="3">Are there any signs of wheel strike at the switch tip ?</td>
            <td><?= $form->field($model, 'allswlh9')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh9')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is the switch rail stood off the stock rail due to lipping at the toe ?</td>
            <td><?= $form->field($model, 'allswlh10')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh10')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>
        <tr>
            <th>&#8627;</th>
            <td colspan="3">Is the switch rail stood off the stock rail at the toe > 4mm</td>
            <td><?= $form->field($model, 'allswlh11')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
            <td><?= $form->field($model, 'allswrh11')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>



        <tr>
            <th colspan="8" class="text-center h4">ASK THE SIGNALLER TO SWING THE SWITCH AND REPEAT ALL ACTIONS ABOVE
                FOR THE OPPOSITE HALF SET</th>
        </tr>
        <tr>
            <th colspan="8" class="DarkerBlue">Notes</th>
        </tr>
        <tr>
            <td colspan="8">
                1. Stretcher bar kicking strap clearance: 3 - 9mm (slideplates without rollers installed), 6 - 9mm
                (slideplates with rollers installed)1. Stretcher bar kicking strap clearance: 3 - 9mm (slideplates
                without rollers installed), 6 - 9mm (slideplates with rollers installed)<br />
                <table>
                    <tr>
                        <th class="text-left" rowspan="3" valign="top">2. Dimensions :</th>
                        <th class="text-left"></th>
                        <th class="text-center">A</th>
                        <th class="text-center">B</th>
                        <th class="text-center">C</th>
                        <th class="text-center">D</th>
                    </tr>
                    <tr>
                        <td>RT60/NR60</td>
                        <td>1000</td>
                        <td>2000</td>
                        <td>2000</td>
                        <td>6000</td>
                    </tr>
                    <tr>
                        <td>All Other Switches</td>
                        <td>1000</td>
                        <td>2000</td>
                        <td>1000</td>
                        <td>3000</td>
                    </tr>
                </table>

            </td>
        </tr>
    </table>
    <table class="Table">

        <tr>
            <th class="DarkerBlue" colspan="3">Track Condition</th>
        </tr>
        <tr>
            <td class="" colspan="3">Observe the condition of the track (geometry and components) immediately on the
                approach to the switches and throughout the S&C unit in accordance with</td>
        </tr>
        <tr>
            <td class="" colspan="">Note and report any defects to SM(T).</td>
            <th class="text-center">Y/N</th>
        </tr>
        <tr>
            <td class="text-center" colspan="">Track condition irregularities have been identified during this detailed
                inspection</td>
            <td> <?= $form->field($model, 'tconditions')->dropdownlist($yesno, ['prompt' => 'Please Select'])->label(false)?>
            </td>
        </tr>

        <tr>
            <td colspan="7">
                <div id="helpnotes" class="helpblock card-collapse collapse" aria-expanded="false" style="">
                    <div class="card-group">
                        <div class="card card-default">
                            <div class="card-heading">Help</div>
                            <div class="card-body">
                                <table class="Table">
                                    <tr>
                                        <td>
                                            Welding Notes <br />
                                            Note 1: Sideworn stock rail fronts greater than 1.0m - seek advice from
                                            Route Asset Engineer (Welding & Grinding)<br />
                                            Note 2: Where the switch and stock rail are sideworn, both components should
                                            be repaired in the same shift.<br /> Where this is not possible the stock
                                            rail must be weld repaired first.<br />
                                            Note 3: Where a high risk switch has premium grade rail, the high risk MAC
                                            code takes precedence.<br />
                                            Note 4: Where switch damage is greater than 2.0m - seek advice from Route
                                            Asset Engineer (Welding & Grinding)<br />
                                            Note 5: Gauge 2 will pass over NR/RT60 switches at the toe area by design
                                        </td>
                                        <td>
                                            Key <br />
                                            <i class="green fa fa-circle"></i>First Preferred Option<br />
                                            <i class="orange fa fa-square"></i>Second Preferred Option<br />
                                            <i class="red fa fa-square"></i>Third Preferred Option<br />
                                            <i class="grey fa fa-square"></i>Not Applicable
                                        </td>
                                        <td>General Notes<br />
                                            1. Lubrication must be applied as an immediate <br /> action in all cases
                                            other than for 'ban to facing moves'.<br />
                                            2. Where MAC's exceed 13 weeks, a 13 weekly inspection must be carried out.
                                        </td>
                                    </tr>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </table>

    <table class="table">
        <tr>
            <th class="DarkerBlue" colspan="6">Inspection Complete</th>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="">Inspector Name (Print):</th>
            <td><?= $form->field($model, 'icinspectorname')->textInput()->label(false)?></td>
            <th class="DarkerBlue" colspan="">Signed:</th>
            <td>
                <canvas class="canvas" id="canvas_0"></canvas>
                <?= HTML::Button('Reset', ['Onclick' => 'ClearCanvasX(0)', 'Class' => 'btn btn-danger']); ?>
                <?= $form->field($model, 'icinspectorsign')->hiddenInput(['id' =>  'signature0'])->label(false)?>

            </td>
            <th class="DarkerBlue" colspan="">Date:</th>
            <td><?= $form->field($model, 'icinspectordate')->widget(DatePicker::class, ['size' => 'sm', 'name'=>'icinspectorsign', 'pluginOptions' => ['todayHighlight' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?>
            </td>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="">SM[T] Name (Print):</th>
            <td><?= $form->field($model, 'icsmtname')->textInput()->label(false)?></td>
            <th class="DarkerBlue" colspan="">Signed:</th>
            <td>
                <canvas class="canvas" id="canvas_1"></canvas>
                <?= HTML::Button('Reset', ['Onclick' => 'ClearCanvasX(1)', 'Class' => 'btn btn-danger']); ?>
                <?= $form->field($model, 'icsmtsign')->hiddenInput(['id' =>  'signature1'])->label(false)?>
            </td>
            <th class="DarkerBlue" colspan="">Date:</th>
            <td><?= $form->field($model, 'icsmtdate')->widget(DatePicker::class, ['size' => 'sm', 'name'=>'icsmtdate', 'pluginOptions' => ['todayHighlight' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?>
            </td>
        </tr>
    </table>

    <table class="table">
        <tr>
            <th class="DarkerBlue" colspan="6">Remedial work identified</th>
        </tr>
        <tr>
            <td rowspan="3" colspan="4">Minimum Action Taken & Work Arising <br /> If the minimum actions cannot be
                complied with consider banning the switch blade in question to all facing movements</td>
            <td colspan="2" class="text-center">Ellipse</td>
        </tr>
        <tr>
            <td colspan="1">STD Job</td>
            <td colspan="1">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="1">W/O</td>
            <td colspan="1">&nbsp;</td>
        </tr>
        <tr>
            <td rowspan="2" colspan="3"><?= $form->field($model, 'rwiactions')->textArea()->label(false)?></td>
            <td colspan="1">Defect RDMS No.</td>
            <td colspan="1">PTY</td>
            <td colspan="1">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="1"><?= $form->field($model, 'defectrdms')->textInput()->label(false)?></td>
            <td colspan="1">QTY</td>
            <td colspan="1">&nbsp;</td>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="">SM[T] Name (Print):</th>
            <td><?= $form->field($model, 'rwismtname')->textInput()->label(false)?></td>
            <th class="DarkerBlue" colspan="">Signed:</th>
            <td>
                <canvas class="canvas" id="canvas_2"></canvas>
                <?= HTML::Button('Reset', ['Onclick' => 'ClearCanvasX(2)', 'Class' => 'btn btn-danger']); ?>
                <?= $form->field($model, 'rwismtsign')->hiddenInput(['id' =>  'signature2'])->label(false)?>

            </td>
            <th class="DarkerBlue" colspan="">Date:</th>
            <td colspan="">
                <?= $form->field($model, 'rwismtdate')->widget(DatePicker::class, ['size' => 'sm', 'name'=>'rwismtdate', 'pluginOptions' => ['todayHighlight' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?>
            </td>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="">TME Name (Print):</th>
            <td><?= $form->field($model, 'rwitmename')->textInput()->label(false)?></td>
            <th class="DarkerBlue" colspan="">Signed:</th>
            <td>
                <canvas class="canvas" id="canvas_3"></canvas>
                <?= HTML::Button('Reset', ['Onclick' => 'ClearCanvasX(3)', 'Class' => 'btn btn-danger']); ?>
                <?= $form->field($model, 'rwitmesign')->hiddenInput(['id' =>  'signature3'])->label(false)?>
            </td>
            <th class="DarkerBlue" colspan="">Date:</th>
            <td colspan="">
                <?= $form->field($model, 'rwitmedate')->widget(DatePicker::class, ['size' => 'sm', 'name'=>'rwitmedate', 'pluginOptions' => ['todayHighlight' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?>
            </td>
        </tr>
        <tr>
            <th class="DarkerBlue" colspan="">Scheduler Name (Print):</th>
            <td><?= $form->field($model, 'rwischname')->textInput()->label(false)?></td>
            <th class="DarkerBlue" colspan="">Signed:</th>
            <td>
                <canvas class="canvas" id="canvas_4"></canvas>
                <?= HTML::Button('Reset', ['Onclick' => 'ClearCanvasX(4)', 'Class' => 'btn btn-danger']); ?>
                <?= $form->field($model, 'rwischsign')->hiddenInput(['id' =>  'signature4'])->label(false)?>
            </td>
            <th class="DarkerBlue" colspan="">Date:</th>
            <td colspan="">
                <?= $form->field($model, 'rwischdate')->widget(DatePicker::class, ['size' => 'sm', 'name'=>'rwischdate', 'pluginOptions' => ['todayHighlight' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?>
            </td>
        </tr>
    </table>

    <div class="form-group">
        <?= Html::submitButton('Save', ['class' => 'btn btn-primary', 'onClick' => 'saveImages();']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
<script>
x = 0;

function saveImages() {
    while (x <= 4) {
        id = "signature" + x;
        cavid = "canvas_" + x;
        document.getElementById(id).value = document.getElementById(cavid).toDataURL();
        x++
    }
}
</script>
<style>
.LighterGrey {
    background-color: #ebebeb;
    text-align: center;
}
</style>