Skip to content

Commit

Permalink
Migrate other controllers to generic form
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval authored and trasher committed Dec 13, 2024
1 parent 6127716 commit c7e6c3c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 358 deletions.
8 changes: 0 additions & 8 deletions front/authldap.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,9 @@
}
//LDAP Server add/update/delete
if (isset($_POST["update"])) {
if (array_key_exists('rootdn_passwd', $_POST)) {
// Password must not be altered, it will be encrypted and never displayed, so sanitize is not necessary.
$_POST['rootdn_passwd'] = $_POST['rootdn_passwd'];
}
$config_ldap->update($_POST);
Html::back();
} else if (isset($_POST["add"])) {
if (array_key_exists('rootdn_passwd', $_POST)) {
// Password must not be altered, it will be encrypt and never displayed, so sanitize is not necessary.
$_POST['rootdn_passwd'] = $_POST['rootdn_passwd'];
}
//If no name has been given to this configuration, then go back to the page without adding
if ($_POST["name"] != "") {
if ($newID = $config_ldap->add($_POST)) {
Expand Down
123 changes: 0 additions & 123 deletions front/cartridgeitem.form.php

This file was deleted.

127 changes: 0 additions & 127 deletions front/certificate.form.php

This file was deleted.

95 changes: 0 additions & 95 deletions front/lockedfield.form.php

This file was deleted.

10 changes: 10 additions & 0 deletions src/CartridgeItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public static function getTypeName($nb = 0)
return _n('Cartridge model', 'Cartridge models', $nb);
}

public static function getLogDefaultServiceName(): string
{
return 'inventory';
}

public static function getSectorizedDetails(): array
{
return ['assets', self::class];
}

public static function getMenuName()
{
return Cartridge::getTypeName(Session::getPluralNumber());
Expand Down
5 changes: 5 additions & 0 deletions src/Certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public static function getTypeName($nb = 0)
return _n('Certificate', 'Certificates', $nb);
}

public static function getLogDefaultServiceName(): string
{
return 'inventory';
}

public static function getSectorizedDetails(): array
{
return ['management', self::class];
Expand Down
Loading

0 comments on commit c7e6c3c

Please sign in to comment.