Skip to content

Commit

Permalink
fix(form_profile): UUID was not generated
Browse files Browse the repository at this point in the history
Signed-off-by: btry <tbugier@teclib.com>
  • Loading branch information
btry committed Jul 10, 2018
1 parent e8212ab commit 44f231b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions inc/form_profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
return self::getTypeName(2);
}

/**
* Prepare input data for adding the form
*
* @param array $input data used to add the item
*
* @return array the modified $input array
*/
public function prepareInputForAdd($input) {
// generate a unique id
if (!isset($input['uuid'])
|| empty($input['uuid'])) {
$input['uuid'] = plugin_formcreator_getUuid();
}

return $input;
}

static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {
global $DB, $CFG_GLPI;

Expand Down

0 comments on commit 44f231b

Please sign in to comment.