<?php
use yii\helpers\{ArrayHelper, Html, Url};

use yii\bootstrap4\Modal;
use yii\web\View;
use yii\widgets\ActiveForm;

use kartik\time\TimePicker;
use kartik\datetime\DateTimePicker;
use kartik\date\DatePicker;

Use backend\models\Attributesvalues;
use modules\users\models\User;
use frontend\models\Vehicle;


/* @var $this yii\web\View */
/* @var $model modules\forms\models\Dt5 */
/* @var $form yii\widgets\ActiveForm */

if (!$model->injobno) {$model->injobno = Yii::$app->getRequest()->getQueryParam('injobno');}
	if (!$model->collectiondate && Yii::$app->getRequest()->getQueryParam('starttime')) {
		$model->collectiondate = date("d/m/Y", strtotime(Yii::$app->getRequest()->getQueryParam('starttime')));
	} elseif (is_integer($model->collectiondate) && $model->collectiondate > 1) {
		$model->collectiondate = date("d/m/Y", $model->collectiondate);
	} else {
		$model->collectiondate = date("d/m/Y", strtotime('today'));
	}

if (!$model->checkedby && Yii::$app->getRequest()->getQueryParam('starttime')) {
		$model->checkedby = date("d/m/Y", strtotime(Yii::$app->getRequest()->getQueryParam('starttime')));
	} elseif (is_integer($model->checkedby) && $model->checkedby > 1) {
		$model->checkedby = date("d/m/Y", $model->checkedby);
	} else {
		$model->checkedby = date("d/m/Y", strtotime('today'));
	}

if (!$model->actid) $model->actid = Yii::$app->getRequest()->getQueryParam('actid');

$users = User::Employees();
$yesno = Attributesvalues::formarray('yesno');
$vehicle = ArrayHelper::map(Vehicle::find()->where(['status'=> 'Active'])->orderby(['reg' => SORT_ASC])->all(), 'id', 'reg');

	    $setdetails = "
    $('#reg').change(function() {
    	var id = $(this).val();
    	$.get('/vehicleequip/getdetails', {id : id },function(data) {
    		var data = $.parseJSON(data);
$('#dt5-universalmountingid').attr('value',data.universalmountingid);
$('#dt5-mouldshoestypeid').attr('value',data.mouldshoestypeid);
$('#dt5-straightedgeid').attr('value',data.straightedgeid);
$('#dt5-hammerid').attr('value',data.hammerid);
$('#dt5-wedgeslargenoid').attr('value',data.wedgeslargenoid);
$('#dt5-wedgessmallnoid').attr('value',data.wedgessmallnoid);
$('#dt5-barid').attr('value',data.barid);
$('#dt5-sandtrayid').attr('value',data.sandtrayid);
$('#dt5-dryinglidid').attr('value',data.dryinglidid);
$('#dt5-thimbledriftid').attr('value',data.thimbledriftid);
$('#dt5-thimbleapplicatorid').attr('value',data.thimbleapplicatorid);
$('#dt5-tongsid').attr('value',data.tongsid);
$('#dt5-splashcoversid').attr('value',data.splashcoversid);
$('#dt5-slagbowlsid').attr('value',data.slagbowlsid);
$('#dt5-crucibletripodid').attr('value',data.crucibletripodid);
$('#dt5-cruciblelidid').attr('value',data.cruciblelidid);
$('#dt5-distancegaugeid').attr('value',data.distancegaugeid);
$('#dt5-spadgerid').attr('value',data.spadgerid);
$('#dt5-rammingtoolsid').attr('value',data.rammingtoolsid);
$('#dt5-mouldcoverid').attr('value',data.mouldcoverid);
$('#dt5-mouldalignmenttoolid').attr('value',data.mouldalignmenttoolid);
$('#dt5-fileid').attr('value',data.fileid);
$('#dt5-bottlecageid').attr('value',data.bottlecageid);
$('#dt5-absorbentspillpadsid').attr('value',data.absorbentspillpadsid);
$('#dt5-metalwastecontainerid').attr('value',data.metalwastecontainerid);
$('#dt5-cuttingtorchid').attr('value',data.cuttingtorchid);
$('#dt5-preheaterid').attr('value',data.preheaterid);
$('#dt5-preheatholderid').attr('value',data.preheatholderid);
$('#dt5-regulatorsid').attr('value',data.regulatorsid);
$('#dt5-flashbackarrestorsid').attr('value',data.flashbackarrestorsid);
$('#dt5-flowgaugeid').attr('value',data.flowgaugeid);
$('#dt5-pipesid').attr('value',data.pipesid);
$('#dt5-cuttingguideid').attr('value',data.cuttingguideid);
$('#dt5-cuttingrollersid').attr('value',data.cuttingrollersid);
$('#dt5-ignitersboxid').attr('value',data.ignitersboxid);
$('#dt5-spareoxyregid').attr('value',data.spareoxyregid);
$('#dt5-sparegasregid').attr('value',data.sparegasregid);
$('#dt5-weldrecordsheetid').attr('value',data.weldrecordsheetid);
$('#dt5-dailytimesheetid').attr('value',data.dailytimesheetid);
$('#dt5-spraypaintid').attr('value',data.spraypaintid);
$('#dt5-railclampid').attr('value',data.railclampid);
$('#dt5-mouldshoesid').attr('value',data.mouldshoesid);
$('#dt5-baseplateid').attr('value',data.baseplateid);
$('#dt5-slagbowlid').attr('value',data.slagbowlid);
$('#dt5-crucibleforkid').attr('value',data.crucibleforkid);
$('#dt5-plugholderid').attr('value',data.plugholderid);
$('#dt5-lutingpastedistributorid').attr('value',data.lutingpastedistributorid);
$('#dt5-railtrolleyhandleid').attr('value',data.railtrolleyhandleid);
$('#dt5-profilegrindersid').attr('value',data.profilegrindersid);
$('#dt5-trimmerhandleid').attr('value',data.trimmerhandleid);
$('#dt5-anglegrinderid').attr('value',data.anglegrinderid);
$('#dt5-lightingid').attr('value',data.lightingid);
$('#dt5-umbrellaid').attr('value',data.umbrellaid);
$('#dt5-shovelid').attr('value',data.shovelid);
$('#dt5-fireextinguisherid').attr('value',data.fireextinguisherid);
$('#dt5-tarpaulinid').attr('value',data.tarpaulinid);
$('#dt5-padlockandchainid').attr('value',data.padlockandchainid);
$('#dt5-needlegunid').attr('value',data.needlegunid);
$('#dt5-engineoilid').attr('value',data.engineoilid);
$('#dt5-hydraulicoilid').attr('value',data.hydraulicoilid);
$('#dt5-disccutterid').attr('value',data.disccutterid);
$('#dt5-delechauxbeamid').attr('value',data.delechauxbeamid);
$('#dt5-impactwrenchid').attr('value',data.impactwrenchid);
$('#dt5-fumeextractorid').attr('value',data.fumeextractorid);
$('#dt5-generatorid').attr('value',data.generatorid);
$('#dt5-scgrinderid').attr('value',data.scgrinderid);
$('#dt5-extensionleadid').attr('value',data.extensionleadid);
$('#dt5-l80equipmentid').attr('value',data.l80equipmentid);
    		
    		});
    });";
    $this->registerJs($setdetails); ?>

<?php
//$this->registerJsFile('/js/touch.js'); //load canvas drawing 
$this->registerJsFile('/js/touch_1.js');//load canvas_1 
//$this->registerJsFile('/js/touch_2.js'); //load canvas_2 
//$this->registerJsFile('/js/touch_3.js'); //load canvas_3 ?>
<script>
window.onload = function() {
    //init(); //Drawing
    init1(); //canvas_1
    //init2(); //canvas_2
    //init3(); //canvas_3
}
</script>

<div class="dt5-form">
    <div class="card">
        <div class="card-header">
            <?= $this->title ?>
        </div>
        <div class="card-body">
            <?php $form = ActiveForm::begin(); ?>
            <div class="row">
                <div class="col-12 col-md-3">
                    <?= $form->field($model, 'vehicle')->dropdownList($vehicle, ['prompt' => 'Please Select…', 'id' => 'reg'])->label() ?>
                </div>
                <div class="col-12 col-md-3">
                    <?= $form->field($model, 'collectiondate')->textInput()->label() ?>
                </div>
                <div class="col-12 col-md-3">
                    <?= $form->field($model, 'driver')->dropdownList($users, ['prompt'=>'Please Select'])->label() ?>
                </div>
                <div class="col-12 col-md-3">
                    <?= $form->field($model, 'injobno')->textInput()->label() ?>
                </div>
            </div>

            <div class="row">
				<div class="col-12 text-center h3">
				Consumable Check List
				</div>
			</div>
            <div class="row">
                <div class="col-12 col-md-3">
                    <div class="row">
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        OXYGEN
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Size'])->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        GASSES
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput([])->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput([])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        NITROGEN
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput()->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput()->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        PETROL / FUNNELL
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput()->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput()->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        GRIND STONES
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput()->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput()->label(false) ?>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-12 col-md-3">
					<div class="row">
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        MOULDS
                                    </span>
                                </div>
                                <?= $form->field($model, 'mouldstype', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Size'])->label(false) ?>
                                <?= $form->field($model, 'mouldsqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        PORTIONS
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Size'])->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
                                        SAND
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Size'])->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
									CRUCIBLE/1 SHOT POTS
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Size'])->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <div class="input-group-prepend w-25 mx-auto">
                                    <span class="input-group-text DarkerBlue w-100">
									RAILTECH KITS
                                    </span>
                                </div>
                                <?= $form->field($model, 'oxygensize', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Size'])->label(false) ?>
                                <?= $form->field($model, 'oxygenqty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-12 col-md-3">
					<div class="row">
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item1', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item1type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item1qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item2', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item2type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item2qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item3', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item3type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item3qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item4', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item4type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item4qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item5', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item5type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item5qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-12 col-md-3">
					<div class="row">
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item6', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item6type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item6qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item7', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item7type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item7qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item8', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item8type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item8qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item9', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item9type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item9qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="input-group">
                                <?= $form->field($model, 'item10', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Item'])->label(false) ?>
                                <?= $form->field($model, 'item10type', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Type'])->label(false) ?>
                                <?= $form->field($model, 'item10qty', ['template' => '{input}{error}{hint}', 'options' => ['tag' => false]])->textInput(['placeholder' => 'Qty'])->label(false) ?>
                            </div>
                        </div>
                    </div>
            	</div>
            </div>
            <style>
            .input-group .input-group-prepend .input-group-text,
            .input-group .form-control {
                border-radius: 0;
            }
            </style>


            <table class="Table">
                <tr>
                    <td colspan="12" class="Title">
                        Consumable Check List
                    </td>
                </tr>
                <tr class=DarkerBlue>
                    <td>ITEM</td>
                    <td>SIZE</td>
                    <td>QUANTITY</td>
                    <td>ITEM</td>
                    <td>TYPE</td>
                    <td>QUANTITY</td>
                    <td>ITEM</td>
                    <td>TYPE</td>
                    <td>QUANTITY</td>
                    <td>ITEM</td>
                    <td>TYPE</td>
                    <td>QUANTITY</td>

                </tr>
                <tr>
                    <td class="DarkerBlue">OXYGEN</td>
                    <td><?= $form->field($model, 'oxygensize')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'oxygenqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">MOULDS</td>
                    <td> <?= $form->field($model, 'mouldstype')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'mouldsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">
						<?= $form->field($model, 'item1')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item1type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item1qty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item6')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item6type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item6qty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">GASSES *</td>
                    <td><?= $form->field($model, 'gassessize')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'gassesqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">PORTIONS</td>
                    <td><?= $form->field($model, 'portionstype')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'portionsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item2')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item2type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item2qty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item7')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item7type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item7qty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">NITROGEN</td>
                    <td><?= $form->field($model, 'nitrogensize')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'nitrogenqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">SAND</td>
                    <td><?= $form->field($model, 'sandtype')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'sandqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item3')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item3type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item3qty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item8')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item8type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item8qty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">PETROL/FUNNEL</td>
                    <td><?= $form->field($model, 'petrolfunnelsize')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'petrolfunnelqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">CRUCIBLE/1 SHOT POTS</td>
                    <td><?= $form->field($model, 'crucible1shotpotstype')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'crucible1shotpotsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item4')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item4type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item4qty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item9')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item9type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item9qty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">GRIND STONES</td>
                    <td> <?= $form->field($model, 'grindstonessize')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'grindstonesqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">RAILTECH KITS</td>
                    <td><?= $form->field($model, 'railtechkitstype')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'railtechkitsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item5')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item5type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item5qty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue"> <?= $form->field($model, 'item10')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item10type')->textInput()->label(false) ?></td>
                    <td> <?= $form->field($model, 'item10qty')->textInput()->label(false) ?></td>
                </tr>
            </table>
            <table class="Table">
                <tr>
                    <td colspan="9"></td>
                </tr>
                <tr>
                    <td colspan="3">TOOL BOX CHECK LIST</td>
                    <td colspan="3">GAS EQUIPMENT CHECK LIST * </td>
                    <td colspan="3">PLANT CHECK LIST</td>
                </tr>
                <tr class="DarkerBlue">
                    <td>ITEM</td>
                    <td>I.D. NO.</td>
                    <td>QUANTITY</td>
                    <td>ITEM</td>
                    <td>I.D NO.</td>
                    <td>FIT FOR USE</td>
                    <td>ITEM</td>
                    <td>I.D. NO.</td>
                    <td>QUANTITY</td>
                </tr>
                <tr>
                    <td class="DarkerBlue">UNIVERSALMOUNTING</td>
                    <td><?= $form->field($model, 'universalmountingid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'universalmountingqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">CUTTINGTORCH</td>
                    <td><?= $form->field($model, 'cuttingtorchid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'cuttingtorchfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">RAILTROLLEYHANDLE</td>
                    <td><?= $form->field($model, 'railtrolleyhandleid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'railtrolleyhandleqty')->textInput()->label(false) ?></td>
                </tr>


                <tr>
                    <td class="DarkerBlue">MOULDSHOESTYPE</td>
                    <td><?= $form->field($model, 'mouldshoestypeid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'mouldshoestypeqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">PREHEATER</td>
                    <td><?= $form->field($model, 'preheaterid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'preheaterfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">PROFILEGRINDERS</td>
                    <td><?= $form->field($model, 'profilegrindersid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'profilegrindersqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">STRAIGHTEDGE</td>
                    <td><?= $form->field($model, 'straightedgeid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'straightedgeqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">PREHEATHOLDER</td>
                    <td><?= $form->field($model, 'preheatholderid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'preheatholderfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">TRIMMERHANDLE</td>
                    <td><?= $form->field($model, 'trimmerhandleid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'trimmerhandleqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">HAMMER</td>
                    <td><?= $form->field($model, 'hammerid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'hammerqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">REGULATORS</td>
                    <td><?= $form->field($model, 'regulatorsid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'regulatorsfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">ANGLEGRINDER</td>
                    <td><?= $form->field($model, 'anglegrinderid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'anglegrinderqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">WEDGESLARGENo</td>
                    <td><?= $form->field($model, 'wedgeslargenoid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'wedgeslargenoqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">FLASHBACKARRESTORS</td>
                    <td><?= $form->field($model, 'flashbackarrestorsid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'flashbackarrestorsfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">LIGHTING</td>
                    <td><?= $form->field($model, 'lightingid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'lightingqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">WEDGESSMALLNo</td>
                    <td><?= $form->field($model, 'wedgessmallnoid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'wedgessmallnoqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">FLOWGAUGE</td>
                    <td><?= $form->field($model, 'flowgaugeid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'flowgaugefit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">UMBRELLA</td>
                    <td><?= $form->field($model, 'umbrellaid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'umbrellaqty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">BAR</td>
                    <td><?= $form->field($model, 'barid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'barqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">PIPES</td>
                    <td><?= $form->field($model, 'pipesid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'pipesfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">SHOVEL</td>
                    <td><?= $form->field($model, 'shovelid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'shovelqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">SANDTRAY</td>
                    <td><?= $form->field($model, 'sandtrayid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'sandtrayqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">CUTTINGGUIDE</td>
                    <td><?= $form->field($model, 'cuttingguideid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'cuttingguidefit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">FIREEXTINGUISHER</td>
                    <td><?= $form->field($model, 'fireextinguisherid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'fireextinguisherqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">DRYINGLID</td>
                    <td><?= $form->field($model, 'dryinglidid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'dryinglidqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">CUTTINGROLLERS</td>
                    <td><?= $form->field($model, 'cuttingrollersid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'cuttingrollersfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">TARPAULIN</td>
                    <td><?= $form->field($model, 'tarpaulinid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'tarpaulinqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">THIMBLEDRIFT</td>
                    <td><?= $form->field($model, 'thimbledriftid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'thimbledriftqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">IGNITERSBOX</td>
                    <td><?= $form->field($model, 'ignitersboxid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'ignitersboxfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">PADLOCKANDCHAIN</td>
                    <td><?= $form->field($model, 'padlockandchainid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'padlockandchainqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">THIMBLEAPPLICATOR</td>
                    <td><?= $form->field($model, 'thimbleapplicatorid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'thimbleapplicatorqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">SPAREOXYREG</td>
                    <td><?= $form->field($model, 'spareoxyregid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'spareoxyregfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">NEEDLEGUN</td>
                    <td><?= $form->field($model, 'needlegunid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'needlegunqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">TONGS</td>
                    <td><?= $form->field($model, 'tongsid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'tongsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">SPAREGASREG</td>
                    <td><?= $form->field($model, 'sparegasregid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'sparegasregfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">ENGINEOIL</td>
                    <td><?= $form->field($model, 'engineoilid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'engineoilqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">SPLASHCOVERS</td>
                    <td><?= $form->field($model, 'splashcoversid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'splashcoversqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">WELDRECORDSHEET</td>
                    <td><?= $form->field($model, 'weldrecordsheetid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'weldrecordsheetfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">HYDRAULICOIL</td>
                    <td><?= $form->field($model, 'hydraulicoilid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'hydraulicoilqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">SLAGBOWLS</td>
                    <td><?= $form->field($model, 'slagbowlsid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'slagbowlsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">DAILYTIMESHEET</td>
                    <td><?= $form->field($model, 'dailytimesheetid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'dailytimesheetfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">CRUCIBLETRIPOD</td>
                    <td><?= $form->field($model, 'crucibletripodid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'crucibletripodqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">SPRAYPAINT</td>
                    <td><?= $form->field($model, 'spraypaintid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'spraypaintfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td>ADDITIONAL PLANT</td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">CRUCIBLELID</td>
                    <td><?= $form->field($model, 'cruciblelidid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'cruciblelidqty')->textInput()->label(false) ?></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>ITEM</td>
                    <td></td>
                    <td></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">DISTANCEGAUGE</td>
                    <td><?= $form->field($model, 'distancegaugeid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'distancegaugeqty')->textInput()->label(false) ?></td>
                    <td>RAILTECH EQUIPMENT</td>
                    <td></td>
                    <td></td>
                    <td class="DarkerBlue">DISCCUTTER</td>
                    <td><?= $form->field($model, 'disccutterid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'disccutterqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">SPADGER</td>
                    <td><?= $form->field($model, 'spadgerid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'spadgerqty')->textInput()->label(false) ?></td>
                    <td>ITEM</td>
                    <td></td>
                    <td></td>
                    <td class="DarkerBlue">DELECHAUXBEAM</td>
                    <td><?= $form->field($model, 'delechauxbeamid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'delechauxbeamqty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">RAMMINGTOOLS</td>
                    <td><?= $form->field($model, 'rammingtoolsid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'rammingtoolsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">RAILCLAMP</td>
                    <td><?= $form->field($model, 'railclampid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'railclampfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">IMPACTWRENCH</td>
                    <td><?= $form->field($model, 'impactwrenchid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'impactwrenchqty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">MOULDCOVER</td>
                    <td><?= $form->field($model, 'mouldcoverid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'mouldcoverqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">MOULDSHOES</td>
                    <td><?= $form->field($model, 'mouldshoesid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'mouldshoesfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">FUMEEXTRACTOR</td>
                    <td><?= $form->field($model, 'fumeextractorid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'fumeextractorqty')->textInput()->label(false) ?></td>

                </tr>
                <tr>
                    <td class="DarkerBlue">MOULDALIGNMENTTOOL</td>
                    <td><?= $form->field($model, 'mouldalignmenttoolid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'mouldalignmenttoolqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">BASEPLATE</td>
                    <td><?= $form->field($model, 'baseplateid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'baseplatefit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">GENERATOR</td>
                    <td><?= $form->field($model, 'generatorid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'generatorqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">FILE</td>
                    <td><?= $form->field($model, 'fileid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'fileqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">SLAGBOWL</td>
                    <td><?= $form->field($model, 'slagbowlid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'slagbowlfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">SCGRINDER</td>
                    <td><?= $form->field($model, 'scgrinderid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'scgrinderqty')->textInput()->label(false) ?></td>


                </tr>
                <tr>
                    <td class="DarkerBlue">BOTTLECAGE</td>
                    <td><?= $form->field($model, 'bottlecageid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'bottlecageqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">CRUCIBLEFORK</td>
                    <td><?= $form->field($model, 'crucibleforkid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'crucibleforkfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">EXTENSIONLEAD</td>
                    <td><?= $form->field($model, 'extensionleadid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'extensionleadqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">ABSORBENTSPILLPADS</td>
                    <td><?= $form->field($model, 'absorbentspillpadsid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'absorbentspillpadsqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">PLUGHOLDER</td>
                    <td><?= $form->field($model, 'plugholderid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'plugholderfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td class="DarkerBlue">L80EQUIPMENT</td>
                    <td><?= $form->field($model, 'l80equipmentid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'l80equipmentqty')->textInput()->label(false) ?></td>
                </tr>
                <tr>
                    <td class="DarkerBlue">METALWASTECONTAINER</td>
                    <td><?= $form->field($model, 'metalwastecontainerid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'metalwastecontainerqty')->textInput()->label(false) ?></td>
                    <td class="DarkerBlue">LUTINGPASTEDISTRIBUTOR</td>
                    <td><?= $form->field($model, 'lutingpastedistributorid')->textInput()->label(false) ?></td>
                    <td><?= $form->field($model, 'lutingpastedistributorfit')->dropdownList($yesno, ['prompt' => 'Please Select…'])->label(false) ?>
                    </td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>


                <tr>
                    <td>CHECKED BY</td>
                    <td colspan="2">
                        <div id="canvas1">
                            <canvas id="canvas_1" width="350" height="100"
                                style="border:1pt solid black;margin:auto;cursor:crosshair;clear:both;"></canvas>
                            <?= Html::button('Reset', [ 'class' => 'btn btn-primary', 'onclick' => 'ClearCanvasX(1);' ]); ?>

                        </div>
                    </td>
                    <td>CHECKED BY PRINT</td>
                    <td colspan="2">
                        <?= $form->field($model, 'checkedprint')->textInput()->label(false) ?>
                    <td>CHECKED DATE</td>
                    <td colspan="2">
                        <?= $form->field($model, 'checkedby')->textInput()->label(false) ?>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>




<?= $form->field($model, 'sign')->hiddeninput(['id' => 'sign'])->label(false) ?>

<div class="form-group">
    <?= Html::submitButton('Save', ['class' => 'btn btn-success', 'onclick' => 'saveImage9()']) ?>
</div>

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

</div>

<script>
var canvas = document.getElementById('canvas_1');

function saveImage9() {
    var data = canvas.toDataURL();
    document.getElementById("sign").value = data;
}


var context = canvas.getContext('2d');
var imagesrc = document.getElementById('sign').value;
var image = new Image();
image.src = imagesrc
context.drawImage(image, 0, 0);
</script>