formatting added id to icon for dropdown referencing

This commit is contained in:
Tim Krehan 2019-05-26 18:02:06 +02:00
parent cd4b68b8e7
commit e031f29633

View file

@ -18,13 +18,15 @@
$div_item_menu = "ml-auto mr-2";
foreach ($shopping->list as $index => $item) {
if($index%2==0){$color_theme = "bg-primary";}
else{$color_theme = "bg-secondary";}
if ($index % 2 == 0) {
$color_theme = "bg-primary";
} else {
$color_theme = "bg-secondary";
}
if ($item->Erledigt) {
$div_item_row_color_classes = "bg-success";
$checked = "checked";
}
else{
} else {
$div_item_row_color_classes = $color_theme;
$checked = "";
}
@ -33,7 +35,7 @@
print_r("<div class='$div_item_checkbox_classes'><input type='checkbox' class='$input_item_checkbox_classes' data-color='$color_theme' data-id='$item->ID' $checked></div>");
print_r("<div class='$div_item_quantity_classes'>$item->Anzahl $item->Einheit</div>");
print_r("<div class='$div_item_name_classes'>$item->Name</div>");
print_r("<div class='$div_item_menu'><i class='fas fa-angle-right'></i></div>");
print_r("<div class='$div_item_menu'><i class='fas fa-angle-right dropdown-toggle' id='dropdownMenuButtonDataID" . $item->ID . "'></i></div>");
print_r("</div>");
}
?>
@ -44,7 +46,11 @@
<select class="w-50" name="einheit">
<?php
foreach ($units->list as $index => $unit) {
if($unit->Standard){$selected="selected";}else{$selected=NULL;}
if ($unit->Standard) {
$selected = "selected";
} else {
$selected = NULL;
}
print_r("<option value='$unit->ID' $selected>$unit->Name</option>");
}
?>