Skip to content

Commit

Permalink
extra fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Jun 25, 2024
1 parent 03e0084 commit ac96fdf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/models/Itindata_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function set_checkpoint()
public function get_checkpoints()
{
// $this->db->order_by('compname_clients', 'ASC');
$query = $this->db->query('SELECT c.id_section as mainsectid, c.name_section as mainsect, c.pos_section as sectionpos, c.en_name_section as en_mainsect, c.printtext_section as mainsectprint, c.en_printtext_section as en_mainsectprint, b.id_section, b.name_section, b.en_name_section, b.printtext_section, b.en_printtext_section, a.id_cp, a.name_cp, a.en_name_cp, a.points_cp, a.printtext_cp, a.pos_cp, a.en_printtext_cp, a.nokpoints_cp, a.helptext_cp, a.en_helptext_cp FROM db_itindev.checkpoint_tbl as a left join db_itindev.sections_tbl as b on b.id_section = a.sect_cp inner join db_itindev.sections_tbl as c on b.parent_section = c.id_section ORDER BY c.pos_section, a.pos_cp');
$query = $this->db->query('SELECT c.id_section as mainsectid, c.name_section as mainsect, c.pos_section as sectionpos, c.en_name_section as en_mainsect, c.printtext_section as mainsectprint, c.en_printtext_section as en_mainsectprint, b.id_section, b.name_section, b.en_name_section, b.printtext_section, b.en_printtext_section, a.id_cp, a.name_cp, a.en_name_cp, a.points_cp, a.printtext_cp, a.pos_cp, a.en_printtext_cp, a.nokpoints_cp, a.helptext_cp, a.en_helptext_cp, a.typ_cp as cptype FROM db_itindev.checkpoint_tbl as a left join db_itindev.sections_tbl as b on b.id_section = a.sect_cp inner join db_itindev.sections_tbl as c on b.parent_section = c.id_section ORDER BY c.pos_section, a.pos_cp');
return $query->result_array();
}

Expand Down
15 changes: 12 additions & 3 deletions application/views/inspectionform.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$insgenpremark = $inspection->en_rmrk_inspection;
}
}

$prcp = 0;
$mainsect = $langprefix."mainsect";
$name_section = $langprefix."name_section";
Expand Down Expand Up @@ -123,7 +123,7 @@
<legend class="col-form-label col-form-label-lg col-sm-12"><?= $cp[$name_section]; ?></legend>
</div>
<?php } ?>

<?php if ($cp['cptype'] == 'chs') { ?>
<div class="form-group row pt-3">
<input type=hidden name="chpsect[<?= $cp['id_cp']; ?>]" value ="<?= $cp['mainsectid']; ?>">
<input type=hidden name="points[<?= $cp['id_cp']; ?>]" data-sectpen="<?= $cp['mainsectid']; ?>" value ="<?= $cp['points_cp']; ?>">
Expand All @@ -143,7 +143,16 @@
</div>
</div>
</div>

<?php } else { ?>
<div class="form-group row pt-3">
<input type=hidden name="chpsect[<?= $cp['id_cp']; ?>]" value ="<?= $cp['mainsectid']; ?>">
<label for="chpsect[<?= $cp['id_cp']; ?>]" class="col-sm-7 col-form-label "><?= $cp[$name_cp]; ?><small class="form-text text-muted"><?= $cp[$helptext_cp]; ?></small></label>
<div class="col-sm-5 text-center text-sm-right">
<input type="number" name="checkpoint[<?= $cp['id_cp']; ?>]">
</div>
</div>

<?php } ?>
<div class="form-group row pb-3">
<div class="col-12">
<label for="rmrk[<?= $cp['id_cp']; ?>]"><?= $this->lang->line('comment'); ?></label>
Expand Down

0 comments on commit ac96fdf

Please sign in to comment.