Skip to content

Commit

Permalink
Merge pull request #26 from tomolimo/2.0
Browse files Browse the repository at this point in the history
Fixed issue with non-existant dyn_forward html element
  • Loading branch information
tomolimo authored Nov 21, 2023
2 parents ca9299b + 7b2db9f commit 3157cb8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions workflow/engine/methods/login/version-pmos.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
if (!defined('PM_VERSION')) {
define("PM_VERSION", "3.3.0-community-RE-2.1");
define("PM_BUILD_VERSION", "3.3.0-community-RE-2.1");
define("PM_VERSION", "3.3.0-community-RE-2.2");
define("PM_BUILD_VERSION", "3.3.0-community-RE-2.2");
}
18 changes: 10 additions & 8 deletions workflow/public_html/glpi/glpi.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ pm_glpi = {

// hide dyn_forward_assign when it is the last step in the task
let dyn_forward_assign = document.querySelector('a[id*="dyn_forward" i][href="cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN"]');
if (dyn_forward_assign) {
dyn_forward_assign.outerHTML = '';
if (dyn_forward_assign && dyn_forward_assign.style.display != 'none') {
dyn_forward_assign.style.display = 'none';
}

if (dyn_forward_assign && document.querySelector('html').postmessage.data.message == 'parentready') {
Expand Down Expand Up @@ -257,16 +257,18 @@ pm_glpi = {

// hide Next Step button, this button is displayed by Output Document form
let next_step = document.getElementById('form[NEXT_STEP]');
if (next_step) {
next_step.outerHTML = '';
if (next_step && next_step.style.display != 'none') {
next_step.style.display = 'none';
}

let cancelButton = document.getElementById('form[BTN_CANCEL]');
if (cancelButton) {
cancelButton.outerHTML = '';
if (cancelButton && cancelButton.style.display != 'none') {
cancelButton.style.display = 'none';
let claimButton = document.getElementById('form[BTN_CATCH]');
if (claimButton && GLPI_DATA.glpi_hide_claim_button) {
claimButton.outerHTML = '';
if (claimButton
&& claimButton.style.display != 'none'
&& GLPI_DATA.glpi_hide_claim_button) {
claimButton.style.display = 'none';
}
}

Expand Down

0 comments on commit 3157cb8

Please sign in to comment.