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\BikemakeModel;
|
||||
use App\Models\ComplaintModel;
|
||||
use CodeIgniter\API\ResponseTrait;
|
||||
|
||||
|
||||
@ -12,12 +13,15 @@ class Make extends BaseController
|
||||
|
||||
public $session;
|
||||
use ResponseTrait;
|
||||
public $BikemakeModel;
|
||||
public $ComplaintModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->session = session();
|
||||
$this->BikemakeModel = new BikemakeModel();
|
||||
$this->ComplaintModel = new ComplaintModel();
|
||||
}
|
||||
|
||||
public function index()
|
||||
@ -26,6 +30,8 @@ class Make extends BaseController
|
||||
$BikemakeModel = new BikemakeModel();
|
||||
$make = $BikemakeModel->orderBy('make')->findAll();
|
||||
$data['make']=$make;
|
||||
$cubiccapacity = $this->ComplaintModel->getCubicCapacityName();
|
||||
$data['cubiccapacity']=$cubiccapacity;
|
||||
|
||||
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;">
|
||||
<label for="makename">Make Name </label>
|
||||
<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>
|
||||
<input class="form-control" type="text" id="modelname" required="" placeholder="Model Name....">
|
||||
</div>
|
||||
@ -148,7 +157,8 @@
|
||||
// console.log( $('#modelname').val());
|
||||
var formData = {
|
||||
make_id: $('#make_id').val(),
|
||||
modelname: $('#modelname').val()
|
||||
modelname: $('#modelname').val(),
|
||||
cubiccapacity: $('#cubiccapacity').val()
|
||||
};
|
||||
var model_id =0;
|
||||
$(params).attr('disabled','true').text('Processing...');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user