Skip to content

Commit

Permalink
wheeldrive
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Apr 15, 2024
1 parent f7eb584 commit 07271e5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
6 changes: 6 additions & 0 deletions application/controllers/Inspection.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public function inspections_pdf()
$data['username'] = $user->first_name." ".$user->last_name;
$inspections = $this->itindata_model->get_inspectionsfull(array('id_inspection' => $id));
$data['fueltypes'] = $this->_getfueltypes();
$data['wheeldrives'] = $this->_getwheeldrives();
$data['inspection'] = $inspections[0];
$data['inspremark'] = $this->itindata_model->get_inspectionremarks($id);
$inspection = $inspections[0];
Expand Down Expand Up @@ -805,6 +806,11 @@ private function _getfueltypes() {
$fueltypes = array('petrol', 'diesel', 'hybridpetrol', 'hybriddiesel', 'pluginpetrol', 'plugindiesel', 'electric', 'cng', 'lng');
return $fueltypes;
}

private function _getwheeldrives() {
$wheeldrives = array('fwd', 'rwd', 'awd');
return $wheeldrives;
}

private function _getclients() {

Expand Down
2 changes: 1 addition & 1 deletion application/language/english/itin_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$lang['electric'] = 'Electric';
$lang['cng'] = 'CNG';
$lang['lng'] = 'LNG';
$lang['wheeldrive'] = 'Κίνηση';
$lang['wheeldrive_vhcl'] = 'Κίνηση';
$lang['fwd'] = 'Front wheel drive';
$lang['ρwd'] = 'Rear wheel drive';
$lang['awd'] = 'All whell drive - 4x4';
Expand Down
2 changes: 1 addition & 1 deletion application/language/greek/itin_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$lang['electric'] = 'Ηλεκτρικό';
$lang['cng'] = 'CNG';
$lang['lng'] = 'LNG';
$lang['wheeldrive'] = 'Κίνηση';
$lang['wheeldrive_vhcl'] = 'Κίνηση';
$lang['fwd'] = 'Εμπρός τροχοί';
$lang['ρwd'] = 'Πίσω τροχοί';
$lang['awd'] = 'Όλοι οι τροχοί - 4x4';
Expand Down
28 changes: 21 additions & 7 deletions application/views/vehiclesform.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
$pow_vhcl = $vhcldata[0]->pow_vhcl;
$id_vhcl = $vhcldata[0]->id_vhcl;
$fueltyp_vhcl = $vhcldata[0]->fueltyp_vhcl;
$wheeldrive_vhcl = $vhcldata[0]->wheeldrive_vhcl;

}

Expand Down Expand Up @@ -77,16 +78,12 @@
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="form-group col">
<label for="vin_vhcl"><?= $this->lang->line('vin_vhcl'); ?></label>
<input type="text" class="form-control" id="vin_vhcl" name ="vin_vhcl" value = "<?= $vin_vhcl ?>" onfocusout="checkifexists(this, 15)">
</div>
<div class="form-row">
<div class="form-group col">
<label for="mlg_vhcl"><?= $this->lang->line('mlg_vhcl'); ?></label>
<input type="number" class="form-control" id="mlg_vhcl" name ="mlg_vhcl" value = "<?= $mlg_vhcl ?>">
</div>
<div class="form-group col">
<div class="form-group col">
<label for="fueltyp_vhcl"><?= $this->lang->line('fuel_vhcl'); ?></label>
<div class="input-group mb-3">
<select class="custom-select" name="fueltyp_vhcl" id="fueltyp_vhcl" >
Expand All @@ -99,6 +96,23 @@
<span class="input-group-text" id="basic-addon2"><i class="fal fa-gas-pump"></i></span>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="mlg_vhcl"><?= $this->lang->line('mlg_vhcl'); ?></label>
<input type="number" class="form-control" id="mlg_vhcl" name ="mlg_vhcl" value = "<?= $mlg_vhcl ?>">
</div>
<div class="form-group col">
<label for="wheeldrive_vhcl"><?= $this->lang->line('wheeldrive_vhcl'); ?></label>
<select class="custom-select" name="wheeldrive_vhcl" id="wheeldrive_vhcl" >
<option value = ""><?= $this->lang->line('choose'); ?></option>
<?php foreach ($wheeldrives as $wd) { ?>
<option value="<?= $wd ?>" <?php if ($wd == $wheeldrive_vhcl) { echo "SELECTED"; } ?>><?= $this->lang->line($wd); ?></option>
<?php } ?>
</select>


</div>
</div>
<div class="form-group">
Expand Down

0 comments on commit 07271e5

Please sign in to comment.