This commit is contained in:
tomolimo
2017-04-28 14:57:49 +02:00
parent 59c5abecf6
commit cf5f638030
15 changed files with 659 additions and 584 deletions

View File

@@ -63,10 +63,10 @@ function onTaskFrameLoad(event, delIndex, hideClaimButton, csrf) {
// if task resumé, then hide the form part
//debugger;
var form_resume = locContentDocument.getElementsByName('cases_Resume');
if (form_resume.length > 0 && form_resume[0].style.display != 'none') {
form_resume[0].style.display = 'none';
}
//var form_resume = locContentDocument.getElementsByName('cases_Resume');
//if (form_resume.length > 0 && form_resume[0].style.display != 'none') {
// form_resume[0].style.display = 'none';
//}
// then look if btnGLPISendRequest exists,
var locElt = locContentDocument.getElementById('form[btnGLPISendRequest]');

17
js/domain.js.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
define('GLPI_ROOT','../../..');
include (GLPI_ROOT."/inc/includes.php");
header("Content-type: application/javascript");
$config = PluginProcessmakerConfig::getInstance() ;
if( isset($config->fields['domain']) && $config->fields['domain'] != '' ) {
echo "
//debugger;
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.text = 'document.domain = \'".$config->fields['domain']."\';';
s.parentNode.insertBefore(g, s);
" ;
}