dropdownMassiveActionAuthMethods.php 2.05 KB
Newer Older
1
<?php
2
3
4
/**
 * ---------------------------------------------------------------------
 * GLPI - Gestionnaire Libre de Parc Informatique
5
 * Copyright (C) 2015-2021 Teclib' and contributors.
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 *
 * http://glpi-project.org
 *
 * based on GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2003-2014 by the INDEPNET Development Team.
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * GLPI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GLPI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GLPI. If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
31
32
 */

yllen's avatar
yllen committed
33
$AJAX_INCLUDE = 1;
34
include ('../inc/includes.php');
yllen's avatar
yllen committed
35

36
header("Content-Type: text/html; charset=UTF-8");
yllen's avatar
yllen committed
37
Html::header_nocache();
38

moyooo's avatar
moyooo committed
39
Session::checkRight('user', User::UPDATEAUTHENT);
yllen's avatar
yllen committed
40

remi's avatar
remi committed
41
if ($_POST["authtype"] > 0) {
yllen's avatar
yllen committed
42
43
   $name = 'massiveaction';

moyooo's avatar
moyooo committed
44
   if (isset($_POST['name'])) {
yllen's avatar
yllen committed
45
      $name = $_POST['name'];
moyooo's avatar
moyooo committed
46
47
   }

Anael Mobilia's avatar
Anael Mobilia committed
48
   switch ($_POST["authtype"]) {
49
      case Auth::DB_GLPI :
moyooo's avatar
moyooo committed
50
         echo "<input type='hidden' name='auths_id' value='0'>";
remi's avatar
remi committed
51
         break;
yllen's avatar
yllen committed
52

53
54
      case Auth::LDAP :
      case Auth::EXTERNAL :
55
56
57
58
         AuthLDAP::dropdown([
            'name'      => "auths_id",
            'condition' => ['is_active' => 1]
         ]);
remi's avatar
remi committed
59
60
         break;

61
      case Auth::MAIL :
62
63
64
65
         AuthMail::dropdown([
            'name'      => "auths_id",
            'condition' => ['is_active' => 1]
         ]);
remi's avatar
remi committed
66
67
         break;
   }
yllen's avatar
yllen committed
68

Cédric Anne's avatar
Cédric Anne committed
69
   echo "&nbsp;<input type='submit' name='$name' class='btn btn-primary' value=\""._sx('button', 'Post')."\">";
70
}