General developer forum

What Javascript is used when adding a new event in calendar (3.5)

 
Picture of Eva E
What Javascript is used when adding a new event in calendar (3.5)
Core developers

Hi,

When adding a new event in calendar (moodle version 3.5) we have an 'event type' select menu and depending on your role you can add site, user, course, category, group event types. 

Depending on which event type you have selected the row below will have different content - for ex if you select 'course' an option to chose the course will display, then if you change the selection to 'category' that course selection option will be hidden and a category selection option will appear.

I am struggling to find which JS code is handling this and where it is being triggered. 

I have identified that this form is loaded in definition() in calendar/classes/local/event/forms/create.php. The only javascript I can trace from there is line 110 which calls event_form.js, however this is not done there. 

Any help is greatly appreciated.

 

 
Average of ratings: -