Skip to content

Commit

Permalink
Merge pull request #2483 from Leantime/milestoneProjectSelectorFix
Browse files Browse the repository at this point in the history
Milestone project selector fix
  • Loading branch information
marcelfolaron authored Apr 23, 2024
2 parents b43eacb + e6a184d commit 7307801
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .idea/leantime-oss.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 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,17 +33,23 @@

<label class="control-label"><?=$tpl->__('label.project') ?></label>
<select name="projectId" class="tw-w-full">
<?php foreach($allAssignedprojects as $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>

<label><?php echo $tpl->__('label.todo_status'); ?></label>
Expand Down

0 comments on commit 7307801

Please sign in to comment.