Skip to content
Snippets Groups Projects
Unverified Commit 417057ee authored by Saurabh Kumar's avatar Saurabh Kumar Committed by GitHub
Browse files

Fix report-frequency.js and report-calculator.js (#3358)

It shows errors when reporting is not yet displayed on a project

Fixes #3310
parent dcb467c0
No related branches found
No related tags found
2 merge requests!18Fix application form submit button remaining disabled (#3483),!13Merge in v4.1.1
(function ($) {
'use strict';
const reportData = JSON.parse(document.getElementById('reportData').textContent);
const reportDataEl = document.getElementById('reportData');
if (!reportDataEl) {
return;
}
const reportData = JSON.parse(reportDataEl.textContent);
// Form inputs
const frequencyNumberInput = document.getElementById('id_occurrence');
......
......@@ -2,8 +2,13 @@
'use strict';
const var_repeat = $('#id_does_not_repeat')[0];
if (var_repeat.checked) {
const var_repeat = $('#id_does_not_repeat');
if (!var_repeat.length) {
return;
}
if (var_repeat[0].checked) {
$('.form__group--report-every').hide();
$('.form__group--schedule').hide();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment