CC deopdown added in make creation : GWM
This commit is contained in:
parent
b42fa935de
commit
184175000c
@ -4,6 +4,7 @@ namespace App\Controllers;
|
|||||||
|
|
||||||
use App\Models\BikemodelsModel;
|
use App\Models\BikemodelsModel;
|
||||||
use App\Models\BikemakeModel;
|
use App\Models\BikemakeModel;
|
||||||
|
use App\Models\ComplaintModel;
|
||||||
use CodeIgniter\API\ResponseTrait;
|
use CodeIgniter\API\ResponseTrait;
|
||||||
|
|
||||||
|
|
||||||
@ -12,12 +13,15 @@ class Make extends BaseController
|
|||||||
|
|
||||||
public $session;
|
public $session;
|
||||||
use ResponseTrait;
|
use ResponseTrait;
|
||||||
|
public $BikemakeModel;
|
||||||
|
public $ComplaintModel;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->session = session();
|
$this->session = session();
|
||||||
$this->BikemakeModel = new BikemakeModel();
|
$this->BikemakeModel = new BikemakeModel();
|
||||||
|
$this->ComplaintModel = new ComplaintModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
@ -26,6 +30,8 @@ class Make extends BaseController
|
|||||||
$BikemakeModel = new BikemakeModel();
|
$BikemakeModel = new BikemakeModel();
|
||||||
$make = $BikemakeModel->orderBy('make')->findAll();
|
$make = $BikemakeModel->orderBy('make')->findAll();
|
||||||
$data['make']=$make;
|
$data['make']=$make;
|
||||||
|
$cubiccapacity = $this->ComplaintModel->getCubicCapacityName();
|
||||||
|
$data['cubiccapacity']=$cubiccapacity;
|
||||||
|
|
||||||
return view('make_list',$data);
|
return view('make_list',$data);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,6 +115,15 @@
|
|||||||
<input class="form-control" type="text" id="make_id" required="" placeholder="Make Name...." style="display:none;">
|
<input class="form-control" type="text" id="make_id" required="" placeholder="Make Name...." style="display:none;">
|
||||||
<label for="makename">Make Name </label>
|
<label for="makename">Make Name </label>
|
||||||
<input class="form-control" type="text" id="makename" required="" placeholder="Make Name...." disabled>
|
<input class="form-control" type="text" id="makename" required="" placeholder="Make Name...." disabled>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="cubiccapacity">Cubic capacity</label>
|
||||||
|
<select class="form-control" id="cubiccapacity" required data-toggle="select2">
|
||||||
|
<option value="0">Select Cubic capacity</option>
|
||||||
|
<?php foreach ($cubiccapacity as $item): ?>
|
||||||
|
<option value="<?= $item['id'] ?>"><?= $item['value'] ?></option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<label for="modelname">Model Name </label>
|
<label for="modelname">Model Name </label>
|
||||||
<input class="form-control" type="text" id="modelname" required="" placeholder="Model Name....">
|
<input class="form-control" type="text" id="modelname" required="" placeholder="Model Name....">
|
||||||
</div>
|
</div>
|
||||||
@ -148,7 +157,8 @@
|
|||||||
// console.log( $('#modelname').val());
|
// console.log( $('#modelname').val());
|
||||||
var formData = {
|
var formData = {
|
||||||
make_id: $('#make_id').val(),
|
make_id: $('#make_id').val(),
|
||||||
modelname: $('#modelname').val()
|
modelname: $('#modelname').val(),
|
||||||
|
cubiccapacity: $('#cubiccapacity').val()
|
||||||
};
|
};
|
||||||
var model_id =0;
|
var model_id =0;
|
||||||
$(params).attr('disabled','true').text('Processing...');
|
$(params).attr('disabled','true').text('Processing...');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user