diff --git a/js/dolimeet.min.js b/js/dolimeet.min.js index 9b30daf..7d386a0 100644 --- a/js/dolimeet.min.js +++ b/js/dolimeet.min.js @@ -1 +1 @@ -"use strict";window.dolimeet||(window.dolimeet={},window.dolimeet.scriptsLoaded=!1),window.dolimeet.scriptsLoaded||(window.dolimeet.init=function(){window.dolimeet.load_list_script()},window.dolimeet.load_list_script=function(){if(!window.dolimeet.scriptsLoaded){let e=void 0,o=void 0;for(e in window.dolimeet)for(o in window.dolimeet[e].init&&window.dolimeet[e].init(),window.dolimeet[e])window.dolimeet[e]&&window.dolimeet[e][o]&&window.dolimeet[e][o].init&&window.dolimeet[e][o].init();window.dolimeet.scriptsLoaded=!0}},window.dolimeet.refresh=function(){let e=void 0,o=void 0;for(e in window.dolimeet)for(o in window.dolimeet[e].refresh&&window.dolimeet[e].refresh(),window.dolimeet[e])window.dolimeet[e]&&window.dolimeet[e][o]&&window.dolimeet[e][o].refresh&&window.dolimeet[e][o].refresh()},$(document).ready(window.dolimeet.init)),window.dolimeet.session={},window.dolimeet.session.init=function(){window.dolimeet.session.event()},window.dolimeet.session.event=function(){$(document).on("change","#fk_soc",window.dolimeet.session.reloadField)},window.dolimeet.session.reloadField=function(){var e=document.getElementById("session_form"),e=new FormData(e),o=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL),e=e.get("fk_soc");$.ajax({url:document.URL+i+"fk_soc="+e+"&token="+o,type:"POST",processData:!1,contentType:!1,success:function(e){$(".field_fk_project").replaceWith($(e).find(".field_fk_project"))},error:function(){}})}; \ No newline at end of file +"use strict";window.dolimeet||(window.dolimeet={},window.dolimeet.scriptsLoaded=!1),window.dolimeet.scriptsLoaded||(window.dolimeet.init=function(){window.dolimeet.load_list_script()},window.dolimeet.load_list_script=function(){if(!window.dolimeet.scriptsLoaded){let e=void 0,o=void 0;for(e in window.dolimeet)for(o in window.dolimeet[e].init&&window.dolimeet[e].init(),window.dolimeet[e])window.dolimeet[e]&&window.dolimeet[e][o]&&window.dolimeet[e][o].init&&window.dolimeet[e][o].init();window.dolimeet.scriptsLoaded=!0}},window.dolimeet.refresh=function(){let e=void 0,o=void 0;for(e in window.dolimeet)for(o in window.dolimeet[e].refresh&&window.dolimeet[e].refresh(),window.dolimeet[e])window.dolimeet[e]&&window.dolimeet[e][o]&&window.dolimeet[e][o].refresh&&window.dolimeet[e][o].refresh()},$(document).ready(window.dolimeet.init)),window.dolimeet.session={},window.dolimeet.session.init=function(){window.dolimeet.session.event()},window.dolimeet.session.event=function(){$(document).on("change","#fk_soc",window.dolimeet.session.reloadField)},window.dolimeet.session.reloadField=function(){var e=document.getElementById("session_form"),e=new FormData(e),o=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL),e=e.get("fk_soc");$.ajax({url:document.URL+i+"fk_soc="+e+"&token="+o,type:"POST",processData:!1,contentType:!1,success:function(e){$(".field_fk_project").replaceWith($(e).find(".field_fk_project")),$(".field_fk_contrat").replaceWith($(e).find(".field_fk_contrat"))},error:function(){}})}; \ No newline at end of file diff --git a/js/modules/session.js b/js/modules/session.js index 8e8b194..8db8c84 100644 --- a/js/modules/session.js +++ b/js/modules/session.js @@ -88,6 +88,7 @@ window.dolimeet.session.reloadField = function() { contentType: false, success: function(resp) { $('.field_fk_project').replaceWith($(resp).find('.field_fk_project')); + $('.field_fk_contrat').replaceWith($(resp).find('.field_fk_contrat')); }, error: function() {} }); diff --git a/view/session/session_card.php b/view/session/session_card.php index 221d1e7..9889569 100644 --- a/view/session/session_card.php +++ b/view/session/session_card.php @@ -322,6 +322,7 @@ if (GETPOST('fk_soc')) { $object->fields['fk_project']['type'] = 'integer:Project:projet/class/project.class.php:0:(fk_soc:=:' . GETPOST('fk_soc') . ')'; + $object->fields['fk_contrat']['type'] = 'integer:Contrat:contrat/class/contrat.class.php:0:(fk_soc:=:' . GETPOST('fk_soc') . ')'; } if (!empty($fromType)) {