mirror of
https://github.com/itflow-org/itflow
synced 2026-06-09 11:31:06 +00:00
Categories: Moved note type, software type, rack type to be creatable/editable Categories with common defaults and descriptions
This commit is contained in:
@@ -1101,6 +1101,14 @@ if (isset($_GET['contact_id'])) {
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
$note_types_array = array (
|
||||
'Call'=>'fa-phone-alt',
|
||||
'Email'=>'fa-envelope',
|
||||
'Meeting'=>'fa-handshake',
|
||||
'In Person'=>'fa-people-arrows',
|
||||
'Note'=>'fa-sticky-note'
|
||||
);
|
||||
|
||||
while ($row = mysqli_fetch_assoc($sql_related_notes)) {
|
||||
$contact_note_id = intval($row['contact_note_id']);
|
||||
$contact_note_type = nullable_htmlentities($row['contact_note_type']);
|
||||
|
||||
@@ -32,8 +32,17 @@ ob_start();
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-comment"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="type">
|
||||
<?php foreach ($note_types_array as $note_type => $note_type_icon) { ?>
|
||||
<option><?php echo nullable_htmlentities($note_type); ?></option>
|
||||
<?php
|
||||
$sql_contact_note_types_select = mysqli_query($mysqli, "
|
||||
SELECT category_name FROM categories
|
||||
WHERE category_type = 'contact_note_type'
|
||||
AND category_archived_at IS NULL
|
||||
ORDER BY category_order ASC, category_name ASC
|
||||
");
|
||||
while ($row = mysqli_fetch_assoc($sql_contact_note_types_select)) {
|
||||
$contact_note_type_select = nullable_htmlentities($row['category_name']);
|
||||
?>
|
||||
<option><?= $contact_note_type_select ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -43,8 +43,17 @@ ob_start();
|
||||
</div>
|
||||
<select class="form-control select2" name="type" required>
|
||||
<option value="">- Type -</option>
|
||||
<?php foreach($rack_type_select_array as $rack_type) { ?>
|
||||
<option><?php echo $rack_type; ?></option>
|
||||
<?php
|
||||
$sql_rack_types_select = mysqli_query($mysqli, "
|
||||
SELECT category_name FROM categories
|
||||
WHERE category_type = 'rack_type'
|
||||
AND category_archived_at IS NULL
|
||||
ORDER BY category_order ASC, category_name ASC
|
||||
");
|
||||
while ($row = mysqli_fetch_assoc($sql_rack_types_select)) {
|
||||
$rack_type_select = nullable_htmlentities($row['category_name']);
|
||||
?>
|
||||
<option><?= $rack_type_select ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -59,8 +59,19 @@ ob_start();
|
||||
</div>
|
||||
<select class="form-control select2" name="type" required>
|
||||
<option value="">- Type -</option>
|
||||
<?php foreach($rack_type_select_array as $rack_type_select) { ?>
|
||||
<option <?php if ($rack_type == $rack_type_select) { echo "selected"; } ?>><?php echo $rack_type_select; ?></option>
|
||||
<?php
|
||||
$sql_rack_types_select = mysqli_query($mysqli, "
|
||||
SELECT category_name FROM categories
|
||||
WHERE category_type = 'rack_type'
|
||||
AND category_archived_at IS NULL
|
||||
ORDER BY category_order ASC, category_name ASC
|
||||
");
|
||||
while ($row = mysqli_fetch_assoc($sql_rack_types_select)) {
|
||||
$rack_type_select = nullable_htmlentities($row['category_name']);
|
||||
?>
|
||||
<option <?php if ($rack_type == $rack_type_select) { echo "selected"; } ?>>
|
||||
<?= $rack_type_select ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -79,8 +79,17 @@ ob_start();
|
||||
</div>
|
||||
<select class="form-control select2" name="type" required>
|
||||
<option value="">- Select Type -</option>
|
||||
<?php foreach ($software_types_array as $software_type) { ?>
|
||||
<option><?php echo $software_type; ?></option>
|
||||
<<?php
|
||||
$sql_software_types_select = mysqli_query($mysqli, "
|
||||
SELECT category_name FROM categories
|
||||
WHERE category_type = 'software_type'
|
||||
AND category_archived_at IS NULL
|
||||
ORDER BY category_order ASC, category_name ASC
|
||||
");
|
||||
while ($row = mysqli_fetch_assoc($sql_software_types_select)) {
|
||||
$software_type_select = nullable_htmlentities($row['category_name']);
|
||||
?>
|
||||
<option><?= $software_type_select ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -86,8 +86,20 @@ ob_start();
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="type" required>
|
||||
<?php foreach($software_types_array as $software_type_select) { ?>
|
||||
<option <?php if ($software_type == $software_type_select) { echo "selected"; } ?>><?php echo $software_type_select; ?></option>
|
||||
<option value="">- Select Type -</option>
|
||||
<<?php
|
||||
$sql_software_types_select = mysqli_query($mysqli, "
|
||||
SELECT category_name FROM categories
|
||||
WHERE category_type = 'software_type'
|
||||
AND category_archived_at IS NULL
|
||||
ORDER BY category_order ASC, category_name ASC
|
||||
");
|
||||
while ($row = mysqli_fetch_assoc($sql_software_types_select)) {
|
||||
$software_type_select = nullable_htmlentities($row['category_name']);
|
||||
?>
|
||||
<option <?php if ($software_type == $software_type_select) { echo "selected"; } ?>>
|
||||
<?= $software_type_select ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user