Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/support/2.13.0' into support/2.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Nov 14, 2023
2 parents 7b651fc + 63d89aa commit 84b59a0
Show file tree
Hide file tree
Showing 60 changed files with 63,655 additions and 713 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
<a name="2.13.8"></a>
## [2.13.8](https://github.com/pluginsGLPI/formcreator/compare/2.13.7..2.13.8) (2023-111-08)


### Bug Fixes

* restoring ticket may create inconsistency in DB ([3cf3e4ebd](https://github.com/pluginsGLPI/formcreator/commit/3cf3e4ebd))
* **abstractitiltarget:** itil category from template shall not take precedence ([8f8d9a7c4](https://github.com/pluginsGLPI/formcreator/commit/8f8d9a7c4))
* **category:** translation feature of dropdowns not handled ([6287f1b34](https://github.com/pluginsGLPI/formcreator/commit/6287f1b34))
* **dropdownfield:** display of username ([af43a9cf1](https://github.com/pluginsGLPI/formcreator/commit/af43a9cf1))
* **form:** better theme compatibility, UI enhancement ([9146ea57a](https://github.com/pluginsGLPI/formcreator/commit/9146ea57a))
* **form:** import access restrictions may ignore uuids ([9d23d4c1e](https://github.com/pluginsGLPI/formcreator/commit/9d23d4c1e))
* **formanswer:** redirect after submit may lead to unavailable page ([599451af4](https://github.com/pluginsGLPI/formcreator/commit/599451af4))
* **formanswer:** requester can edit refused answer ([c4f799b2c](https://github.com/pluginsGLPI/formcreator/commit/c4f799b2c))
* **formanswer:** show spinner when validate ([c59dc72ac](https://github.com/pluginsGLPI/formcreator/commit/c59dc72ac))
* **formanswer:** status update on ticket change ([079a12063](https://github.com/pluginsGLPI/formcreator/commit/079a12063))
* **glpiselectfield:** disable anonymization of user for answer resolution ([66bea30e0](https://github.com/pluginsGLPI/formcreator/commit/66bea30e0))
* **glpiselectfield,dropdownfield:** prevent php warning ([4da93e38e](https://github.com/pluginsGLPI/formcreator/commit/4da93e38e))
* **install:** ineffective data fix un upgrade to 2.13.7 ([c31134c35](https://github.com/pluginsGLPI/formcreator/commit/c31134c35))
* **issue:** SQL scaping problem when updating a ticket ([56ddff261](https://github.com/pluginsGLPI/formcreator/commit/56ddff261))
* **issue:** bad status if ticket has valdiation on creation ([fc0ea0a00](https://github.com/pluginsGLPI/formcreator/commit/fc0ea0a00))
* **locales:** resolve locales management warnings ([d5db37452](https://github.com/pluginsGLPI/formcreator/commit/d5db37452))
* **radiosfield,checkboxesfield,glpiselectfield,requesttypefield,urgencyfield:** validate default value before saving ([4815abeda](https://github.com/pluginsGLPI/formcreator/commit/4815abeda))
* **requesttype:** force english for comparisons ([7b9e94114](https://github.com/pluginsGLPI/formcreator/commit/7b9e94114))
* **selectfield:** translation breaks validation checks ([28b4781d8](https://github.com/pluginsGLPI/formcreator/commit/28b4781d8))
* **target_actor:** actors ID not converted when duplicating a form ([c5167c16c](https://github.com/pluginsGLPI/formcreator/commit/c5167c16c))
* **textareadield:** missing translation for default value ([bda43df77](https://github.com/pluginsGLPI/formcreator/commit/bda43df77))


### Features

* **DropdownField:** Load translation for plugin too ([16a1379a8](https://github.com/pluginsGLPI/formcreator/commit/16a1379a8))
* **DropdownField:** Load translation for plugin too ([6af1766d1](https://github.com/pluginsGLPI/formcreator/commit/6af1766d1))
* **formanswer:** log any failure when saving a answer ([5d84054af](https://github.com/pluginsGLPI/formcreator/commit/5d84054af))
* **formanswer:** show item's name in web page title ([c7e81cb9d](https://github.com/pluginsGLPI/formcreator/commit/c7e81cb9d))
* **glpiselectfield:** attach existing documents to targets ([63999d068](https://github.com/pluginsGLPI/formcreator/commit/63999d068))



<a name="2.13.7"></a>
## [2.13.7](https://github.com/pluginsGLPI/formcreator/compare/2.13.6..2.13.7) (2023-07-19)

Expand Down
2 changes: 1 addition & 1 deletion RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function archiveBuild($release = 'release') {
$success = $this->taskExec('composer')
->arg('install')
->arg('--no-dev')
->arg("--working-dir='$archiveWorkdir/$pluginName'")
->arg("--working-dir=$archiveWorkdir/$pluginName")
->run();
if ($success->getExitCode() != 0) {
throw new RuntimeException("failed to generate PHP resources");
Expand Down
2 changes: 1 addition & 1 deletion inc/entityconfig.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
$tabNames = [];
if (!$withtemplate) {
if ($item->getType() == 'Entity') {
$tabNames[1] = self::createTabEntry(_n('Form', 'Forms', Session::getPluralNumber(), 'formcreator'), 0, PluginFormcreatorForm::getType(), self::getIcon());
$tabNames[1] = self::createTabEntry(PluginFormcreatorForm::getTypeName(Session::getPluralNumber()), 0, PluginFormcreatorForm::getType(), self::getIcon());
}
}
return $tabNames;
Expand Down
2 changes: 1 addition & 1 deletion inc/field/fieldsfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ public function parseAnswerValues($input, $nonDestructive = false): bool {
}

public static function getName(): string {
return __("Additionnal fields", "fields");
return __("Additional fields", "fields");
}

public static function canRequire(): bool {
Expand Down
1 change: 1 addition & 0 deletions inc/field/ldapselectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public function prepareQuestionInputForSave($input) {
if (isset($ldap_values['ldap_attribute'])) {
$ldap_dropdown = RuleRightParameter::getById((int) $ldap_values['ldap_attribute']);
if (!($ldap_dropdown instanceof RuleRightParameter)) {
Session::addMessageAfterRedirect(__('LDAP attribute is required!', 'formcreator'), false, ERROR);
return [];
}
}
Expand Down
4 changes: 2 additions & 2 deletions inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
];
}
if ($item->getType() == Central::class) {
return _n('Form', 'Forms', Session::getPluralNumber(), 'formcreator');
return PluginFormcreatorForm::getTypeName(Session::getPluralNumber());
}
return '';
}
Expand Down Expand Up @@ -2017,7 +2017,7 @@ public function showForCentral() {

echo '<table class="tab_cadrehov" id="plugin_formcreatorHomepageForms">';
echo '<tr class="noHover">';
echo '<th><a href="' . FORMCREATOR_ROOTDOC . '/front/formlist.php">' . _n('Form', 'Forms', 2, 'formcreator') . '</a></th>';
echo '<th><a href="' . FORMCREATOR_ROOTDOC . '/front/formlist.php">' . PluginFormcreatorForm::getTypeName(Session::getPluralNumber()) . '</a></th>';
echo '</tr>';

$currentCategoryId = -1;
Expand Down
4 changes: 0 additions & 4 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1282,10 +1282,6 @@ public function post_addItem() {
'plugin_formcreator_questions_id' => $questionId,
'answer' => Toolbox::addslashes_deep($answer_value),
], [], 0);
if ($answer->isNewItem()) {
$formanswerId = $this->getID();
trigger_error("Formcreator: failed to save answer for question $questionId in formanswer ID $formanswerId. Value was: $answer_value", E_USER_WARNING);
}
foreach ($field->getDocumentsForTarget() as $documentId) {
$docItem = new Document_Item();
$docItem->add([
Expand Down
Loading

0 comments on commit 84b59a0

Please sign in to comment.