Skip to content

Commit 1122d18

Browse files
committed
Merge branch 'support/2.14.0' into develop
2 parents 0dd899a + ef6bf93 commit 1122d18

121 files changed

Lines changed: 15585 additions & 11292 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
<a name="2.13.6"></a>
2+
## [2.13.6](https://github.com/pluginsGLPI/formcreator/compare/2.13.5..2.13.6) (2023-05-26)
3+
4+
5+
### Bug Fixes
6+
7+
* SQL error when inconsistency in DB ([1af78720](https://github.com/pluginsGLPI/formcreator/commit/1af78720)), closes [#3242](https://github.com/pluginsGLPI/formcreator/issues/3242)
8+
* confirrmation strings ([8ced5744](https://github.com/pluginsGLPI/formcreator/commit/8ced5744))
9+
* translate field label in error messages ([a4bf10a6](https://github.com/pluginsGLPI/formcreator/commit/a4bf10a6))
10+
* **DropdownField:** fix array key value format ([7729fe20](https://github.com/pluginsGLPI/formcreator/commit/7729fe20))
11+
* **FormAnswer:** redirect to FormAnswer or to list if needed ([44e4ab6d](https://github.com/pluginsGLPI/formcreator/commit/44e4ab6d))
12+
* **category:** SQL statement cause MariaDB crash ([fb94035a](https://github.com/pluginsGLPI/formcreator/commit/fb94035a))
13+
* **checkboxesfield,multiselectfield:** php warning ([342c39e9](https://github.com/pluginsGLPI/formcreator/commit/342c39e9))
14+
* **condition:** conditions don't work when not sanitized ([f2b0fad5](https://github.com/pluginsGLPI/formcreator/commit/f2b0fad5))
15+
* **faq:** visibility (#3118) ([252ef204](https://github.com/pluginsGLPI/formcreator/commit/252ef204))
16+
* **filefield:** rebuild uploads for answer edition ([4f1cdf6e](https://github.com/pluginsGLPI/formcreator/commit/4f1cdf6e))
17+
* **form:** double post broken ([07b8a1a1](https://github.com/pluginsGLPI/formcreator/commit/07b8a1a1))
18+
* **form_language:** inverted arguments ([261e5361](https://github.com/pluginsGLPI/formcreator/commit/261e5361))
19+
* **form_language:** restrict languages to those known by GLPI ([f8dc0803](https://github.com/pluginsGLPI/formcreator/commit/f8dc0803))
20+
* **formanswer:** catch and report exception to end user ([9dd9777f](https://github.com/pluginsGLPI/formcreator/commit/9dd9777f))
21+
* **formanswer:** too many escaping ([e518b7de](https://github.com/pluginsGLPI/formcreator/commit/e518b7de)), closes [#3271](https://github.com/pluginsGLPI/formcreator/issues/3271)
22+
* **formanswer:** translate question label ([61722daf](https://github.com/pluginsGLPI/formcreator/commit/61722daf))
23+
* **glpiselectfield:** max_tree_depth_not_saved ([462ea695](https://github.com/pluginsGLPI/formcreator/commit/462ea695))
24+
* **install:** prevent fatal error in migration ([306c2c3f](https://github.com/pluginsGLPI/formcreator/commit/306c2c3f))
25+
* **item_targetticket:** export of question based composition ([dc8c931a](https://github.com/pluginsGLPI/formcreator/commit/dc8c931a))
26+
* **radiosfield, selectfield:** allow unset default value ([020bd45b](https://github.com/pluginsGLPI/formcreator/commit/020bd45b))
27+
* **radiosfield, selectfield:** check default value before save ([d4a2ecb4](https://github.com/pluginsGLPI/formcreator/commit/d4a2ecb4))
28+
* **section:** condition rule loss after duplicate / import ([7bfe6ca0](https://github.com/pluginsGLPI/formcreator/commit/7bfe6ca0))
29+
* **selectfield:** show contact field ([11c86b7c](https://github.com/pluginsGLPI/formcreator/commit/11c86b7c))
30+
* **selectfield,radiosfield:** abusive escaping ([db01a561](https://github.com/pluginsGLPI/formcreator/commit/db01a561))
31+
* **targetchange,targetproblem:** several fields must use rich text ([cf24aa19](https://github.com/pluginsGLPI/formcreator/commit/cf24aa19))
32+
* **targetticket:** request source ([c72901c7](https://github.com/pluginsGLPI/formcreator/commit/c72901c7))
33+
* **targetticket:** request source may be unexpected value ([2fd6cf54](https://github.com/pluginsGLPI/formcreator/commit/2fd6cf54))
34+
* **targetticket,targetchange,targetproblem:** missing translation of target content ([902efa78](https://github.com/pluginsGLPI/formcreator/commit/902efa78))
35+
* **textfield:** Unescaped HTML when displaying a form answer ([d4763859](https://github.com/pluginsGLPI/formcreator/commit/d4763859))
36+
* **translation:** delete rich editor's ghost toolbar ([ba97c842](https://github.com/pluginsGLPI/formcreator/commit/ba97c842))
37+
* **translation:** dialog width ([0b46dec3](https://github.com/pluginsGLPI/formcreator/commit/0b46dec3))
38+
* **translation:** typo in localizable tring ([3bb2f3d4](https://github.com/pluginsGLPI/formcreator/commit/3bb2f3d4))
39+
40+
41+
### Features
42+
43+
* reminders ([6ed85cd3](https://github.com/pluginsGLPI/formcreator/commit/6ed85cd3))
44+
* **abstractitiltarget:** duplicate ([3c093012](https://github.com/pluginsGLPI/formcreator/commit/3c093012))
45+
* **category:** show category comment in service catalog ([09727147](https://github.com/pluginsGLPI/formcreator/commit/09727147)), closes [#394](https://github.com/pluginsGLPI/formcreator/issues/394)
46+
* **clean_tickets_command:** Take merged tickets into account ([768cd467](https://github.com/pluginsGLPI/formcreator/commit/768cd467))
47+
* **form:** edit recursion with massive actions ([7c918d3b](https://github.com/pluginsGLPI/formcreator/commit/7c918d3b))
48+
* **formaccesstype:** massive action ([53a4285a](https://github.com/pluginsGLPI/formcreator/commit/53a4285a))
49+
* **glpiselectfield:** PDU in assets section ([bc6a790d](https://github.com/pluginsGLPI/formcreator/commit/bc6a790d))
50+
* **glpiselectfield:** refactor entity_restriction ([b3fb0804](https://github.com/pluginsGLPI/formcreator/commit/b3fb0804))
51+
* **install:** stronger upgrade for unsigned columns ([030f93e3](https://github.com/pluginsGLPI/formcreator/commit/030f93e3))
52+
* **notificationtargetformanswer:** label tags ([f1dc000c](https://github.com/pluginsGLPI/formcreator/commit/f1dc000c)), closes [#1023](https://github.com/pluginsGLPI/formcreator/issues/1023)
53+
* **section:** update condition count after section edition ([8c04048f](https://github.com/pluginsGLPI/formcreator/commit/8c04048f))
54+
55+
156
<a name="2.13.5"></a>
257
## [2.13.5](https://github.com/pluginsGLPI/formcreator/compare/2.13.4..2.13.5) (2023-03-24)
358

RoboFilePlugin.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,16 @@ public function localesPull($percent = 70) {
130130
* @return void
131131
*/
132132
public function localesMo() {
133-
$this->_exec('./tools/release --compile-mo');
133+
$po_files = preg_grep('/\.po$/', scandir('./locales'));
134+
foreach ($po_files as $po_file) {
135+
$mo_file = preg_replace('/\.po$/', '.mo', $po_file);
136+
echo("Processing {$po_file}\n");
137+
passthru("cd ./locales && msgfmt -f -o {$mo_file} {$po_file}", $exit_code);
138+
if ($exit_code > 0) {
139+
exit($exit_code);
140+
}
141+
}
142+
134143
return $this;
135144
}
136145

ajax/edit_translation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
die();
4242
}
4343

44+
Session::checkRight('entity', UPDATE);
45+
4446
// if (!isset($_POST['plugin_formcreator_translations_id'])) {
4547
// http_response_code(400);
4648
// die();

ajax/formanswer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
// Save form
5757
$backup_debug = $_SESSION['glpi_use_mode'];
58-
$_SESSION['glpi_use_mode'] = \Session::NORMAL_MODE;
58+
$_SESSION['glpi_use_mode'] = Session::NORMAL_MODE;
5959
$formAnswer = new PluginFormcreatorFormAnswer();
6060
if ($formAnswer->add($_POST) === false) {
6161
http_response_code(400);

ajax/get_form_tags.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
/**
3+
* ---------------------------------------------------------------------
4+
* Formcreator is a plugin which allows creation of custom forms of
5+
* easy access.
6+
* ---------------------------------------------------------------------
7+
* LICENSE
8+
*
9+
* This file is part of Formcreator.
10+
*
11+
* Formcreator is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 2 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* Formcreator is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
23+
* ---------------------------------------------------------------------
24+
* @copyright Copyright © 2011 - 2021 Teclib'
25+
* @license http://www.gnu.org/licenses/gpl.txt GPLv3+
26+
* @link https://github.com/pluginsGLPI/formcreator/
27+
* @link https://pluginsglpi.github.io/formcreator/
28+
* @link http://plugins.glpi-project.org/#/plugin/formcreator
29+
* ---------------------------------------------------------------------
30+
*/
31+
32+
include ('../../../inc/includes.php');
33+
34+
// Check if plugin is activated...
35+
if (!Plugin::isPluginActive('formcreator')) {
36+
http_response_code(404);
37+
die();
38+
}
39+
40+
if (!Session::haveRight(PluginFormcreatorForm::$rightname, UPDATE)) {
41+
http_response_code(403);
42+
die();
43+
}
44+
45+
$form = new PluginFormcreatorForm();
46+
if (!$form->getFromDB($_POST['id'])) {
47+
http_response_code(500);
48+
die();
49+
}
50+
51+
$tags = $form->getTags($_POST['searchText']);
52+
echo json_encode($tags, JSON_UNESCAPED_UNICODE);

css/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ a.plugin_formcreator_formTile_title {
10731073
}
10741074
}
10751075

1076-
/* TODO when the following PR is merged and minimal GLPI version is above the version containing it, remove this CSS */
1076+
/* remove this CSS when requirement is GLPI 10.0.1 or later */
10771077
/* https://github.com/glpi-project/glpi/pull/11524 */
10781078
.formcreator_dashboard_container .dashboard .big-number .label {
10791079
font-size: 12px !important;

front/formanswer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
Html::displayNotFoundError();
3737
}
3838

39+
Session::checkLoginUser();
40+
3941
if (!PluginFormcreatorFormAnswer::canView()) {
4042
Html::displayRightError();
4143
}

front/targetchange.form.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
'PluginFormcreatorForm'
8585
);
8686

87+
Html::requireJs('plugin_formcreator_tags');
8788
$targetChange->getFromDB((int) $_REQUEST['id']);
8889
$form = PluginFormcreatorForm::getByItem($targetChange);
8990
$_SESSION['glpilisttitle'][$targetChange::getType()] = sprintf(

front/targetproblem.form.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
'PluginFormcreatorForm'
8585
);
8686

87+
Html::requireJs('plugin_formcreator_tags');
8788
$targetProblem->getFromDB((int) $_REQUEST['id']);
8889
$form = PluginFormcreatorForm::getByItem($targetProblem);
8990
$_SESSION['glpilisttitle'][$targetProblem::getType()] = sprintf(

front/targetticket.form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
'PluginFormcreatorForm'
9999
);
100100

101-
101+
Html::requireJs('plugin_formcreator_tags');
102102
$targetTicket->getFromDB((int) $_REQUEST['id']);
103103
$form = PluginFormcreatorForm::getByItem($targetTicket);
104104
$_SESSION['glpilisttitle'][$targetTicket::getType()] = sprintf(

0 commit comments

Comments
 (0)