zentaomax.ui.js 737 B

1234567891011121314151617181920
  1. window.changeSource = function()
  2. {
  3. const source = $('[name=source]').val();
  4. if(source == 'researchreport')
  5. {
  6. let items = [];
  7. $.each(reportPairs, function(reportID, reportName)
  8. {
  9. items.push({text: reportName, value: reportID});
  10. });
  11. $('.sourceNoteBox th').text(reportLang);
  12. $('.sourceNoteBox td').children().replaceWith("<div id='sourceNote' class='form-group-wrapper picker-box'></div>");
  13. new zui.Picker('#sourceNote', {name: 'sourceNote', items: items});
  14. }
  15. else
  16. {
  17. $('.sourceNoteBox th').text(sourceNoteLang);
  18. $('.sourceNoteBox td').children().replaceWith("<input class='form-control' type='text' name='sourceNote' />");
  19. }
  20. }