diff --git a/lib/assets/javascripts/views/plans/new.js b/lib/assets/javascripts/views/plans/new.js index ed7d900..43c0b71 100644 --- a/lib/assets/javascripts/views/plans/new.js +++ b/lib/assets/javascripts/views/plans/new.js @@ -172,15 +172,15 @@ }); // Empty combobox on second tab activation - const emptySecondTab = () => { + const emptyTab = () => { // $('#plan_org_id').val('-1'); $('#plan_org_name').val(''); $('#single-template, #default-template').hide(); }; - // Empty combobox on second tab activation - $('a[href="#other_org"]').on('shown.bs.tab', emptySecondTab); - $('a[href="#other_org"]').on('hidden.bs.tab', emptySecondTab); + // Empty combobox on second & third tab activation + $('a[href="#other_org"], a[href="#funder"]').on('shown.bs.tab', emptyTab); + $('a[href="#other_org"], a[href="#funder"]').on('hidden.bs.tab', emptyTab); // Restore default organisation when activating first tab $('a[href="#own_org"]').on('shown.bs.tab', () => {