Skip to content

Commit

Permalink
Merge branch 'release/2.13.6' into support/2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed May 30, 2023
2 parents 2479132 + 70090ca commit 1d8a8d2
Show file tree
Hide file tree
Showing 72 changed files with 17,511 additions and 13,995 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
<a name="2.13.6"></a>
## [2.13.6](https://github.com/pluginsGLPI/formcreator/compare/2.13.5..2.13.6) (2023-05-26)


### Bug Fixes

* SQL error when inconsistency in DB ([1af78720](https://github.com/pluginsGLPI/formcreator/commit/1af78720)), closes [#3242](https://github.com/pluginsGLPI/formcreator/issues/3242)
* confirrmation strings ([8ced5744](https://github.com/pluginsGLPI/formcreator/commit/8ced5744))
* translate field label in error messages ([a4bf10a6](https://github.com/pluginsGLPI/formcreator/commit/a4bf10a6))
* **DropdownField:** fix array key value format ([7729fe20](https://github.com/pluginsGLPI/formcreator/commit/7729fe20))
* **FormAnswer:** redirect to FormAnswer or to list if needed ([44e4ab6d](https://github.com/pluginsGLPI/formcreator/commit/44e4ab6d))
* **category:** SQL statement cause MariaDB crash ([fb94035a](https://github.com/pluginsGLPI/formcreator/commit/fb94035a))
* **checkboxesfield,multiselectfield:** php warning ([342c39e9](https://github.com/pluginsGLPI/formcreator/commit/342c39e9))
* **condition:** conditions don't work when not sanitized ([f2b0fad5](https://github.com/pluginsGLPI/formcreator/commit/f2b0fad5))
* **faq:** visibility (#3118) ([252ef204](https://github.com/pluginsGLPI/formcreator/commit/252ef204))
* **filefield:** rebuild uploads for answer edition ([4f1cdf6e](https://github.com/pluginsGLPI/formcreator/commit/4f1cdf6e))
* **form:** double post broken ([07b8a1a1](https://github.com/pluginsGLPI/formcreator/commit/07b8a1a1))
* **form_language:** inverted arguments ([261e5361](https://github.com/pluginsGLPI/formcreator/commit/261e5361))
* **form_language:** restrict languages to those known by GLPI ([f8dc0803](https://github.com/pluginsGLPI/formcreator/commit/f8dc0803))
* **formanswer:** catch and report exception to end user ([9dd9777f](https://github.com/pluginsGLPI/formcreator/commit/9dd9777f))
* **formanswer:** too many escaping ([e518b7de](https://github.com/pluginsGLPI/formcreator/commit/e518b7de)), closes [#3271](https://github.com/pluginsGLPI/formcreator/issues/3271)
* **formanswer:** translate question label ([61722daf](https://github.com/pluginsGLPI/formcreator/commit/61722daf))
* **glpiselectfield:** max_tree_depth_not_saved ([462ea695](https://github.com/pluginsGLPI/formcreator/commit/462ea695))
* **install:** prevent fatal error in migration ([306c2c3f](https://github.com/pluginsGLPI/formcreator/commit/306c2c3f))
* **item_targetticket:** export of question based composition ([dc8c931a](https://github.com/pluginsGLPI/formcreator/commit/dc8c931a))
* **radiosfield, selectfield:** allow unset default value ([020bd45b](https://github.com/pluginsGLPI/formcreator/commit/020bd45b))
* **radiosfield, selectfield:** check default value before save ([d4a2ecb4](https://github.com/pluginsGLPI/formcreator/commit/d4a2ecb4))
* **section:** condition rule loss after duplicate / import ([7bfe6ca0](https://github.com/pluginsGLPI/formcreator/commit/7bfe6ca0))
* **selectfield:** show contact field ([11c86b7c](https://github.com/pluginsGLPI/formcreator/commit/11c86b7c))
* **selectfield,radiosfield:** abusive escaping ([db01a561](https://github.com/pluginsGLPI/formcreator/commit/db01a561))
* **targetchange,targetproblem:** several fields must use rich text ([cf24aa19](https://github.com/pluginsGLPI/formcreator/commit/cf24aa19))
* **targetticket:** request source ([c72901c7](https://github.com/pluginsGLPI/formcreator/commit/c72901c7))
* **targetticket:** request source may be unexpected value ([2fd6cf54](https://github.com/pluginsGLPI/formcreator/commit/2fd6cf54))
* **targetticket,targetchange,targetproblem:** missing translation of target content ([902efa78](https://github.com/pluginsGLPI/formcreator/commit/902efa78))
* **textfield:** Unescaped HTML when displaying a form answer ([d4763859](https://github.com/pluginsGLPI/formcreator/commit/d4763859))
* **translation:** delete rich editor's ghost toolbar ([ba97c842](https://github.com/pluginsGLPI/formcreator/commit/ba97c842))
* **translation:** dialog width ([0b46dec3](https://github.com/pluginsGLPI/formcreator/commit/0b46dec3))
* **translation:** typo in localizable tring ([3bb2f3d4](https://github.com/pluginsGLPI/formcreator/commit/3bb2f3d4))


### Features

* reminders ([6ed85cd3](https://github.com/pluginsGLPI/formcreator/commit/6ed85cd3))
* **abstractitiltarget:** duplicate ([3c093012](https://github.com/pluginsGLPI/formcreator/commit/3c093012))
* **category:** show category comment in service catalog ([09727147](https://github.com/pluginsGLPI/formcreator/commit/09727147)), closes [#394](https://github.com/pluginsGLPI/formcreator/issues/394)
* **clean_tickets_command:** Take merged tickets into account ([768cd467](https://github.com/pluginsGLPI/formcreator/commit/768cd467))
* **form:** edit recursion with massive actions ([7c918d3b](https://github.com/pluginsGLPI/formcreator/commit/7c918d3b))
* **formaccesstype:** massive action ([53a4285a](https://github.com/pluginsGLPI/formcreator/commit/53a4285a))
* **glpiselectfield:** PDU in assets section ([bc6a790d](https://github.com/pluginsGLPI/formcreator/commit/bc6a790d))
* **glpiselectfield:** refactor entity_restriction ([b3fb0804](https://github.com/pluginsGLPI/formcreator/commit/b3fb0804))
* **install:** stronger upgrade for unsigned columns ([030f93e3](https://github.com/pluginsGLPI/formcreator/commit/030f93e3))
* **notificationtargetformanswer:** label tags ([f1dc000c](https://github.com/pluginsGLPI/formcreator/commit/f1dc000c)), closes [#1023](https://github.com/pluginsGLPI/formcreator/issues/1023)
* **section:** update condition count after section edition ([8c04048f](https://github.com/pluginsGLPI/formcreator/commit/8c04048f))


<a name="2.13.5"></a>
## [2.13.5](https://github.com/pluginsGLPI/formcreator/compare/2.13.4..2.13.5) (2023-03-24)

Expand Down
8 changes: 6 additions & 2 deletions inc/field/textfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function showForm(array $options): void {

public function getRenderedHtml($domain, $canEdit = true): string {
if (!$canEdit) {
return $this->value;
return Sanitizer::sanitize($this->value, false);
}

$html = '';
Expand Down Expand Up @@ -108,7 +108,11 @@ public function getValueForDesign(): string {
}

public function getValueForTargetText($domain, $richText): ?string {
return Sanitizer::unsanitize($this->value);
if ($richText) {
return Sanitizer::sanitize($this->value, false);
}

return $this->value;
}

public function moveUploads() {
Expand Down
1 change: 0 additions & 1 deletion inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,6 @@ public function parseTags(string $content, PluginFormcreatorTargetInterface $tar
}
}
}
// $content = str_replace('##answer_' . $questionId . '##', Sanitizer::sanitize($value ?? ''), $content);
$content = str_replace('##answer_' . $questionId . '##', $value ?? '', $content);

if ($this->questionFields[$questionId] instanceof DropdownField) {
Expand Down
1 change: 1 addition & 0 deletions inc/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@ public static function dropdownObjectSubType(string $name, array $options = []):
Phone::class => Phone::getTypeName($plural),
Line::class => Line::getTypeName($plural),
PassiveDCEquipment::class => PassiveDCEquipment::getTypeName($plural),
PDU::class => PDU::getTypeName($plural),
],
__("Assistance") => [
Ticket::class => Ticket::getTypeName($plural),
Expand Down
8 changes: 5 additions & 3 deletions inc/section.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ public function prepareInputForAdd($input) {
}
}

if (!$this->checkConditionSettings($input)) {
$input['show_rule'] = PluginFormcreatorCondition::SHOW_RULE_ALWAYS;
if (!$this->skipChecks) {
if (!$this->checkConditionSettings($input)) {
$input['show_rule'] = PluginFormcreatorCondition::SHOW_RULE_ALWAYS;
}
}

return $input;
Expand Down Expand Up @@ -411,7 +413,7 @@ public function export(bool $remove_uuid = false) : array {
unset($export[$formFk]);

$subItems = [
'_questions' => PluginFormcreatorQuestion::class,
'_questions' => PluginFormcreatorQuestion::class,
'_conditions' => PluginFormcreatorCondition::class,
];
$export = $this->exportChildrenObjects($subItems, $export, $remove_uuid);
Expand Down
4 changes: 3 additions & 1 deletion install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public function upgrade(Migration $migration, $args = []): bool {
}
}

$this->migration = $migration;
$oldVersion = Config::getConfigurationValue('formcreator', 'previous_version');
// Force fix of signed columns to reduce upgrade errors frequency
// This assumes that all modified columns exist in the database
Expand Down Expand Up @@ -185,7 +186,6 @@ public function upgrade(Migration $migration, $args = []): bool {
}
}

$this->migration = $migration;
if (isset($args['force-upgrade']) && $args['force-upgrade'] === true) {
// Might return false
$fromSchemaVersion = array_search(PLUGIN_FORMCREATOR_SCHEMA_VERSION, $this->upgradeSteps);
Expand Down Expand Up @@ -1024,5 +1024,7 @@ protected function migrateFkToUnsignedInt() {
}
$this->migration->changeField($table, 'id', 'id', 'int ' . DBConnection::getDefaultPrimaryKeySignOption() . ' not null auto_increment');
}

$this->migration->executeMigration();
}
}
4 changes: 2 additions & 2 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ function plugin_formcreator_addTarget(items_id) {
}

$(document).on('click', '.plugin_formcreator_duplicate_target', function() {
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to duplicate this target:', 'formcreator'))) {
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to duplicate this target?', 'formcreator'))) {
$.post({
url: formcreatorRootDoc + '/ajax/form_duplicate_target.php',
data: {
Expand All @@ -1463,7 +1463,7 @@ $(document).on('click', '.plugin_formcreator_duplicate_target', function() {
});

$(document).on('click', '.plugin_formcreator_delete_target', function() {
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to delete this target:', 'formcreator'))) {
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to delete this target?', 'formcreator'))) {
$.post({
url: formcreatorRootDoc + '/ajax/form_delete_target.php',
data: {
Expand Down
Binary file modified locales/ca_ES.mo
Binary file not shown.
Loading

0 comments on commit 1d8a8d2

Please sign in to comment.