Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Find Available' button no longer outputs an infinite loop of appt times #1567

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions modules/calendar/add_edit_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,12 @@ function find_available(extra) {
f = document.forms[0].facility.options[f.selectedIndex].value;
<?php }?>
var c = document.forms[0].form_category;
var formDate = document.forms[0].form_date;
dlgopen('<?php echo $GLOBALS["web_root"]; ?>/modules/calendar/find_appt_popup.php' +
var formDate = document.forms[0].form_date;

// evdur must be a positive number; if evdur <= 0, it will output an infinite stream of times
// If evdur is positive, include it in URL.
if (document.forms[0].form_duration.value > 0) {
dlgopen('<?php echo $GLOBALS["web_root"]; ?>/modules/calendar/find_appt_popup.php' +
'?providerid=' + s +
'&catid=' + c.options[c.selectedIndex].value +
'&facility=' + f +
Expand All @@ -1307,6 +1311,16 @@ function find_available(extra) {
'&eid=<?php echo 0 + $eid; ?>' +
extra,
'_blank', 500, 400);
} else { // If evdur is zero or negative, do not include it in URL.
dlgopen('<?php echo $GLOBALS["web_root"]; ?>/modules/calendar/find_appt_popup.php' +
'?providerid=' + s +
'&catid=' + c.options[c.selectedIndex].value +
'&facility=' + f +
'&startdate=' + formDate.value +
Copy link
Member

Choose a reason for hiding this comment

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

I should guess this is the breaker :0

'&eid=<?php echo 0 + $eid; ?>' +
extra,
'_blank', 500, 400);
}
}

</script>
Expand Down