Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.14.2] - 2026-06-24

### Fixed

- Improve credit voucher workflow consistency

## [1.14.1] - 2025-06-25

### Fixed
Expand Down
23 changes: 18 additions & 5 deletions inc/profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ public function showForm($ID, $options = [])
$profile->getFromDB($ID);
echo "<form method='post' action='" . $profile->getFormURL() . "'>";

$rights = [['itemtype' => PluginCreditTicketConfig::getType(),
'label' => PluginCreditTicketConfig::getTypeName(Session::getPluralNumber()),
'field' => PluginCreditTicketConfig::$rightname
]
];
$rights = self::getAllRights();
$matrix_options['title'] = PluginCreditTicketConfig::getTypeName(Session::getPluralNumber());
$profile->displayRightsChoiceMatrix($rights, $matrix_options);

Expand All @@ -72,4 +68,21 @@ public function showForm($ID, $options = [])

return true;
}

private static function getAllRights()
{
return [
['itemtype' => PluginCreditTicketConfig::getType(),
'label' => PluginCreditTicketConfig::getTypeName(Session::getPluralNumber()),
'field' => PluginCreditTicketConfig::$rightname,
],
];
}

public static function uninstall(Migration $migration): void
{
foreach (self::getAllRights() as $right) {
ProfileRight::deleteProfileRights([$right['field']]);
}
}
}
9 changes: 7 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@
<cs><![CDATA[Tento zásuvný modul umožňuje deklarovat a evidovat (podle entity) spotřebu různých kuponů s kredity přímo z formuláře požadavku.]]></cs>
</long>
</description>
<homepage>https://pluginsglpi.github.io/credit/</homepage>
<homepage>https://github.com/pluginsGLPI/credit</homepage>
<download>https://github.com/pluginsGLPI/credit/releases</download>
<issues>https://github.com/pluginsGLPI/credit/issues</issues>
<readme>https://glpi-plugins.readthedocs.io/en/latest/credit/index.html</readme>
<authors>
<author>TECLIB'</author>
</authors>
<versions>
<version>
<version>
<num>1.14.2</num>
<compatibility>~10.0.0</compatibility>
<download_url>https://github.com/pluginsGLPI/credit/releases/download/1.14.2/glpi-credit-1.14.2.tar.bz2</download_url>
</version>
<version>
<num>1.14.1</num>
<compatibility>~10.0.0</compatibility>
<download_url>https://github.com/pluginsGLPI/credit/releases/download/1.14.1/glpi-credit-1.14.1.tar.bz2</download_url>
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* -------------------------------------------------------------------------
*/

define('PLUGIN_CREDIT_VERSION', '1.14.1');
define('PLUGIN_CREDIT_VERSION', '1.14.2');

// Minimal GLPI version, inclusive
define("PLUGIN_CREDIT_MIN_GLPI", "10.0.0");
Expand Down