buildform.ui.js 387 B

123456789
  1. if(typeof window.onSearchFormResult !== 'function') window.onSearchFormResult = function(formName, response)
  2. {
  3. response.then(res => res.json())
  4. .then(json => {
  5. const $modal = $(formName).closest('.modal');
  6. if($modal.length) loadModal(json.load, $modal.attr('id'));
  7. else loadPage(json.load);
  8. }).catch(console.error);
  9. }