Skip to content

Conversation

@Wanderer65
Copy link

This PR adds a visual highlight to weekends in the calendar view.
Saturdays and Sundays now have a light yellow background, making it easier for users to distinguish weekends at a glance.

  • Updated calendar.html to include dayRender logic for weekend highlighting
  • Used FullCalendar’s dayRender callback for applying styles
  • Works for both Engagements and Tests calendar views

No changes to backend logic; purely frontend enhancement.

@dryrunsecurity
Copy link

dryrunsecurity bot commented Oct 23, 2025

DryRun Security

🔴 Risk threshold exceeded.

This pull request modifies a sensitive file (dojo/templates/dojo/calendar.html) and the scanner flagged multiple sensitive-codepath edits; review the changes and update .dryrunsecurity.yaml if these edits are expected or restrict authors/paths as needed.

🔴 Configured Codepaths Edit in dojo/templates/dojo/calendar.html
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/templates/dojo/calendar.html
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/templates/dojo/calendar.html
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/templates/dojo/calendar.html
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/templates/dojo/calendar.html
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.

We've notified @mtesauro.


All finding details can be found in the DryRun Security Dashboard.

{% block head_extra %}
{{ block.super }}
<!-- fullCalendar CSS from CDN -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fullcalendar.min.css" rel="stylesheet" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you switch to locally bundled js libs please?

Comment on lines 44 to 47
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fullcalendar.min.js"></script>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you switch to locally bundled js libs please?

right: 'month,basicWeek,basicDay'
},
editable: false,
eventLimit: true, // allow "more" link when too many events
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you retain the comment please

Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the pr, left some comments

@@ -1,50 +1,33 @@
{% extends 'base.html' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed/removed?

{% load i18n %}

{% block content %}
{% block head_extra %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed/removed?

Comment on lines 7 to 33
<form method="GET" id="calfilter" action="/calendar">
<div class="container-fluid chosen-container side-by-side">
<div class="row">
<div style="display: inline-block;">
<select data-placeholder="Calendar type" id="caltype" class="chosen-select">
<option value="engagements">Engagements</option>
<option value="tests">Tests</option>
</select>
</div>
<div style="display: inline-block;">
<select data-placeholder="All users" multiple id="lead" name="lead" class="chosen-select">
<option value="0">All users</option>
<option value="-1">Unassigned</option>
{% for u in users %}
<option value="{{ u.id }}">{{ u.username }}</option>
{% endfor %}
</select>
</div>
<div style="display: inline-block;">
<input class="btn btn-primary" type="submit" value="Apply" />
</div>
</div>
</div>
</form>
<br/><br/>
<div id="calendar"></div>
<br/><br/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed/removed?

Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments and can you base the PR against the bugfix branch as per the PR instructions?

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

<div class="container-fluid chosen-container side-by-side">
<div class="row">
<div style="display: inline-block;">
<select data-placeholder="Calendar type" id="caltype" class="chosen-select">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.

</select>
</div>
<div style="display: inline-block;">
<select data-placeholder="All users" multiple id="lead" name="lead" class="chosen-select">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.

@Wanderer65
Copy link
Author

Hi @valentijnscholten , I checked the remote repository and there is no bugfix branch, only master. Should I base the PR on master instead, or is there another branch I should use?

@valentijnscholten
Copy link
Member

This branch: https://github.com/DefectDojo/django-DefectDojo/tree/bugfix. In your local clone you should be able to do something like:

git checkout bugfix

@Wanderer65
Copy link
Author

I checked the remote repository, but there doesn’t appear to be a bugfix branch ..

@valentijnscholten valentijnscholten changed the base branch from master to bugfix October 23, 2025 17:57
@valentijnscholten
Copy link
Member

How did you create your fork? Looks like it only has the master branch. For now it looks OK as bugfix and master are not too different. I've changed the base branch here on the PR.

@valentijnscholten
Copy link
Member

But it looks like your vendoring the libraries? The goal is that any new packages must be installed via yarn.

@Wanderer65
Copy link
Author

Hi @valentijnscholten , thanks for the feedback! I understand that instead of vendoring the libraries, I should install them via yarn. Should I update the PR to use yarn-managed FullCalendar, or is it okay to keep it vendored for this change?

@valentijnscholten
Copy link
Member

You need to make the PR in line with the existing codebase which has all dependencies in npm/yarn.

@valentijnscholten valentijnscholten added this to the 2.51.3 milestone Oct 23, 2025
@Maffooch Maffooch marked this pull request as draft October 27, 2025 00:58
@valentijnscholten valentijnscholten modified the milestones: 2.51.3, 2.52.0 Oct 27, 2025
@valentijnscholten
Copy link
Member

Hello @Wanderer65, Do you need more gelp/guidance?

@Wanderer65
Copy link
Author

Well,I am trying check if that is good?? Mayeb aftet that I might need help 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants