Skip to content

Commit

Permalink
[fix] Select correct project based on session or current milestone id
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Apr 23, 2024
1 parent b44fce9 commit b2d22be
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions app/Domain/Tickets/Templates/milestoneDialog.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</script>

<div class="modal-icons">
<?php if( isset($currentMilestone->id) && $currentMilestone->id != '') {?>
<?php if (isset($currentMilestone->id) && $currentMilestone->id != '') {?>
<a href="#/tickets/delMilestone/<?php echo $currentMilestone->id; ?>" class="danger" data-tippy-content="Delete"><i class='fa fa-trash-can'></i></a>
<?php } ?>
</div>
Expand All @@ -33,19 +33,22 @@

<label class="control-label"><?=$tpl->__('label.project') ?></label>
<select name="projectId" class="tw-w-full">
<?php foreach($allAssignedprojects as $project) {
if(empty($project['type']) || $project['type'] == "project"){
?>
<?php foreach ($allAssignedprojects as $project) {
if (empty($project['type']) || $project['type'] == "project") {
?>
<option value="<?=$project['id'] ?>"
<?php
if($currentMilestone->projectId == $project['id']) {
echo "selected";
}else if( $_SESSION['currentProject'] == $project['id']){
echo "selected";
}
if (
!empty($currentMilestone->projectId)
&& $currentMilestone->projectId == $project['id']
) {
echo "selected";
} else if ($_SESSION['currentProject'] == $project['id']) {
echo "selected";
}
?>
><?=$tpl->escape($project["name"]); ?></option>
<?php }
<?php }
} ?>
</select>

Expand Down

0 comments on commit b2d22be

Please sign in to comment.