<?php 
use common\widgets\TinyMce;
use backend\models\Attributesvalues;
use yii\helpers\ArrayHelper;
use frontend\models\Dtwps;

?>
<div class="card">
    <div class="card-header">
        Comments / Job Details
    </div>
    <div class="card-body">
        <?=  $form->field($model, 'orderdata')->widget(TinyMce::class, [])->label(false); ?>
    </div>
</div>
<div class="card">
    <div class="card-header">
        Job Specification
    </div>
    <div class="card-body">
        <div class="row">
            <div class="col-6">
                <?= $form->field($model, 'jobtype')
                        ->dropDownList(Attributesvalues::formarray('actjobtype'), ['id' => 'jobtype', 'prompt' => 'Please Select']) ->label('Job Type <span class="fa fa-plus btn-attributes float-right" data-value="actjobtype"></span>')?>
            </div>
            <div class="col-6">
                <?= $form->field($model, 'weldtype')
                        ->dropDownList(Attributesvalues::formarray('actweldtype'), ['id' => 'weldtype', 'prompt' => 'Please Select']) ->label('Weld Type <span class="fa fa-plus btn-attributes float-right" data-value="actweldtype"></span>')?>
            </div>
        </div>
    </div>
    <div class="card-header">
        Technical Details for Work Instruction
    </div>
    <div class="card-body">
        <div class="row">
            <div class="col-12 col-md-1">
                <span>&nbsp;</span>
            </div>
            <div class="col-12 col-md-11">
                <div class="row">
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('railgrade ')?><span class="fa fa-plus btn-attributes float-right"
                            data-value="railgrade"></span>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('railsection'); ?><span
                            class="fa fa-plus btn-attributes float-right" data-value="railsection"></span>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('railsupport'); ?><span
                            class="fa fa-plus btn-attributes float-right" data-value="sleeper"></span>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('railwear'); ?><span class="fa fa-plus btn-attributes float-right"
                            data-value="wear"></span>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('railtrack'); ?><span
                            class="fa fa-plus btn-attributes float-right" data-value="location"></span>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('weld'); ?><span class="fa fa-plus btn-attributes float-right"
                            data-value="field"></span>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('defectno1'); ?>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('noofwelds1'); ?>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('weldprocess1'); ?>
                    </div>
                    <div class="col-12 col-md-1 font-weight-bold">
                        <?= $model->getAttributeLabel('fuelgas'); ?><span class="fa fa-plus btn-attributes float-right"
                            data-value="fuelgas"></span>
                    </div>
                    <div class="col-12 col-md-2 font-weight-bold">
                        <?= $model->getAttributeLabel('notes'); ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-12 col-md-1">
                <span>Process 1</span>
            </div>
            <div class="col-12 col-md-11">
                <div class="row">
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railgrade')->dropDownList(Attributesvalues::formarray('railgrade'), ['prompt' => 'Weld']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railsection')->dropDownList(Attributesvalues::formarray('railsection'), [ 'prompt' => 'Section']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railsupport')->dropDownList(Attributesvalues::formarray('sleeper'), [ 'prompt' => 'Support']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railwear')->dropDownList(Attributesvalues::formarray('wear'), ['prompt' => 'Diff Wear']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railtrack')->dropDownList(Attributesvalues::formarray('location'), ['prompt' => 'Track Type']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'weld')->dropDownList(Attributesvalues::formarray('field'), ['prompt' => 'Weld']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'defectno1')->textinput(['placeholder' => 'Defect No']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'noofwelds1')->textinput(['id' => 'nowelds1', 'onchange' => 'noofweldstotal()', 'placeholder' => 'No of Welds']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'weldprocess1')->dropDownList(ArrayHelper::map(dtwps::find()->where("process != ''")->orderby('Process')->all(), 'id', 'process'), ['id' => 'jobtype', 'prompt' => 'Process']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'fuelgas')->dropDownList(Attributesvalues::formarray('fuelgas'), ['prompt' => 'Fuel Gas']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-2">
                        <?= $form->field($model, 'notes')->textarea (['rows' => '2', 'placeholder' => 'Notes']) ->label(false)?>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">

            <div class="col-12 col-md-1">
                <span>Process 2</span>
            </div>
            <div class="col-12 col-md-11">
                <div class="row">
                    <div class="col-12 col-md-1">

                        <?= $form->field($model, 'railgrade2')->dropDownList(Attributesvalues::formarray('railgrade'), ['prompt' => 'Weld']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railsection2')->dropDownList(Attributesvalues::formarray('railsection'), [ 'prompt' => 'Section']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railsupport2')->dropDownList(Attributesvalues::formarray('sleeper'), [ 'prompt' => 'Support']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railwear2')->dropDownList(Attributesvalues::formarray('wear'), ['prompt' => 'Diff Wear']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railtrack2')->dropDownList(Attributesvalues::formarray('location'), ['prompt' => 'Track Type']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'weld2')->dropDownList(Attributesvalues::formarray('field'), ['prompt' => 'Weld']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'defectno2')->textinput(['placeholder' => 'Defect No']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'noofwelds2')->textinput(['id' => 'nowelds2', 'onchange' => 'noofweldstotal()', 'placeholder' => 'No of Welds']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'weldprocess2')->dropDownList(ArrayHelper::map(dtwps::find()->where("process != ''")->orderby('Process')->all(), 'id', 'process'), ['id' => 'jobtype', 'prompt' => 'Process']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'fuelgas2')->dropDownList(Attributesvalues::formarray('fuelgas'), ['prompt' => 'Fuel Gas']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-2">
                        <?= $form->field($model, 'notes2')->textarea (['rows' => '2', 'placeholder' => 'Notes']) ->label(false)?>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-12 col-md-1">
                <span>Process 3</span>
            </div>
            <div class="col-12 col-md-11">
                <div class="row">
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railgrade3')->dropDownList(Attributesvalues::formarray('railgrade'), ['prompt' => 'Weld']) ->label(false)?>

                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railsection3')->dropDownList(Attributesvalues::formarray('railsection'), [ 'prompt' => 'Section']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railsupport3')->dropDownList(Attributesvalues::formarray('sleeper'), [ 'prompt' => 'Support']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railwear3')->dropDownList(Attributesvalues::formarray('wear'), ['prompt' => 'Diff Wear']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'railtrack3')->dropDownList(Attributesvalues::formarray('location'), ['prompt' => 'Track Type']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'weld3')->dropDownList(Attributesvalues::formarray('field'), ['prompt' => 'Weld']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'defectno3')->textinput(['placeholder' => 'Defect No']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'noofwelds3')->textinput(['id' => 'nowelds3', 'onchange' => 'noofweldstotal()', 'placeholder' => 'No of Welds']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'weldprocess3')->dropDownList(ArrayHelper::map(dtwps::find()->where("process != ''")->orderby('Process')->all(), 'id', 'process'), ['id' => 'jobtype', 'prompt' => 'Process']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-1">
                        <?= $form->field($model, 'fuelgas3')->dropDownList(Attributesvalues::formarray('fuelgas'), ['prompt' => 'Fuel Gas']) ->label(false)?>
                    </div>
                    <div class="col-12 col-md-2">
                        <?= $form->field($model, 'notes3')->textarea (['rows' => '2', 'placeholder' => 'Notes']) ->label(false)?>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-12">
                <?= $form->field($model, 'gcmdata')->checkbox(['label' => 'Gauge Corner Machine'])->label(false) ?>
            </div>
        </div>
    </div>
</div>