Skip to content

Commit

Permalink
To be compliant with GLPI 10.0
Browse files Browse the repository at this point in the history
Set version to 5.0.0
  • Loading branch information
tomolimo committed Oct 16, 2023
1 parent eeed2b0 commit c6cd509
Show file tree
Hide file tree
Showing 64 changed files with 328 additions and 381 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ version 4.3.x is compatible with GLPI 9.5 and needs ProcessMaker 3.3.0-RE-1.13 (

version 4.4.x is compatible with GLPI 9.5 and needs ProcessMaker 3.3.0-RE-2.0 (https://github.com/tomolimo/processmaker-server/releases/latest)

version 5.0.x is compatible with GLPI 10.0 and needs ProcessMaker 3.3.0-RE-2.0 (https://github.com/tomolimo/processmaker-server/releases/latest)

This plugin can run classic (ProcessMaker server v2) and BPMN (ProcessMaker server v3 and later) processes

2 changes: 1 addition & 1 deletion ajax/asynchronousdatas.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ajax/dropdownProcesses.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ajax/dropdownTaskcategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ajax/dropdownTicketCategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ajax/dropdownUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ajax/selfservicedrafts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
65 changes: 34 additions & 31 deletions ajax/task_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down Expand Up @@ -97,7 +97,7 @@
]);

// there is only one row
$taskCat = $res->next();
$taskCat = $res->current();
$ask_for_reason = PluginProcessmakerTaskCategory::inheritedReAssignReason($taskCat['pm_is_reassignreason_mandatory'], $taskCat['gppp_is_reassignreason_mandatory']);

PluginProcessmakerUser::dropdown( ['name' => 'users_id_recipient',
Expand All @@ -121,43 +121,47 @@
// Dialog helpers
// Create the dialog with \"Re-assign\" button
function showCommentDlg(title, content, alttext) {
var dlgContents = {
title: title,
modal: true,
width: 'auto',
height: 'auto',
resizable: false,
close: function (event, ui) {
$(this).dialog('destroy').remove();
},
buttons: [{
text: alttext,
id: 'submit$rand',
disabled: 'disabled',
click: function() {
$('#comment$rand').val($('#commenttxtarea$rand').val());
$('#reassign$rand').click();
$('#submit$rand').button('disable');
}
}],
show: true,
hide: true
modalId = title.replaceAll(' ', '_')
var modal = $('#'+title);
if (modal && modal.length == 0) {
var modal = '<div class=\"modal fade testmodalprocess\" id=\"'+ modalId +'\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalCenterTitle\" aria-hidden=\"true\">'
+ '<div class=\"modal-dialog modal-dialog-centered\"role=\"document\">'
+ '<div class=\"modal-content\">'
+ '<div class=\"modal-header\">'
+ '<h5 class=\"modal-modalId\" id=\"changeChoiceTitle\">'+ title +'</h5>'
+ '<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>'
+ '</div >'
+ '<div class=\"modal-body\">'
+ '</div>'
+ '<div class=\"modal-footer\">'
+ '<button type=\"button\" class=\"btn btn-primary\" id=\"submit$rand\" disabled>'+alttext+'</button>'
+ '</div>'
+ '</div>'
+ '</div>';
$('body').append(modal);
}
$('<div id=divreassign$rand></div>').appendTo($('#processmaker_form_task$rand-".$_REQUEST['delIndex']."'));
var locDlg = $('#divreassign$rand').html(content + '<p><textarea id=commenttxtarea$rand rows=6 cols=60></textarea></p><font color=red>".addslashes(__('Input at least 10 words to justify.','processmaker'))."</font>').dialog(dlgContents);
$('#'+modalId).modal('show');
$('#'+modalId+' .modal-body').append('<label for=\"message-text\" class=\"col-form-label\">'+content+'</label><textarea class=\"form-control\" id=\"commenttxtarea$rand\" style=\"height: 100px\"></textarea></p><font color=red>".addslashes(__('Input at least 10 words to justify.','processmaker'))."</font>');
$('#commenttxtarea$rand').focus();
$('#commenttxtarea$rand').on('keydown keyup', function(e) {
if ($('#commenttxtarea$rand').val().split(/\W+/).length > 10) {
$('#submit$rand').button('enable');
$('#submit$rand').prop('disabled', false);
} else {
$('#submit$rand').button('disable');
$('#submit$rand').prop('disabled', true);
}
});
return locDlg;
$('#'+modalId).on('hide.bs.modal', function () {
$('#'+modalId).remove();
})
$('#submit$rand').click(() => {
$('#comment$rand').val($('#commenttxtarea$rand').val());
$('#reassign$rand').click();
$('#submit$rand').button('disable');
$('#'+modalId).modal('hide').remove();
});
};
$('input[name=reassign$rand]').click(function (e) {
//debugger;
let post = true;
Expand All @@ -176,7 +180,6 @@ function showCommentDlg(title, content, alttext) {
// un-claim
if (".($can_unclaim ? 1 : 0)." && users_id_val != 0) {
if (" . ($ask_for_reason ? 1 : 0) . ") {
//e.preventDefault();
showCommentDlg('".addslashes(__('Un-claim task', 'processmaker'))."',
'".addslashes(__('Please input reason to un-claim<br/>(task will be re-assigned to former group):', 'processmaker'))."',
'".addslashes(__('Un-claim', 'processmaker'))."');
Expand Down
5 changes: 4 additions & 1 deletion css/task.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down Expand Up @@ -34,10 +34,13 @@ span.pm_task, a.pm_task {

a.pm_task_badge {
background-color: #4185F4 !important;
display: flex;
}

span.pm_task_case {
background-color: red !important;
padding-right: 8px;
margin-left: 8px;
flex: none;
align-self: flex-start;
}
2 changes: 1 addition & 1 deletion front/case.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/case.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/caselink.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/caselink.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/crontaskaction.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/crontaskaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/document.send.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/process.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/process_profile.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion front/processmaker.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
-------------------------------------------------------------------------
ProcessMaker plugin for GLPI
Copyright (C) 2014-2022 by Raynet SAS a company of A.Raymond Network.
Copyright (C) 2014-2023 by Raynet SAS a company of A.Raymond Network.
https://www.araymond.com/
-------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit c6cd509

Please sign in to comment.