From 486a13e026382c85ca17f224b38d5f880851eb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Mon, 15 Nov 2021 14:47:31 +0100 Subject: [PATCH] Replace deprecated usage of Html::autocompletionTextField() --- inc/config.class.php | 50 +++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/inc/config.class.php b/inc/config.class.php index f93b89a..17b3bec 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -55,48 +55,74 @@ public function showForm() { echo ""; echo "" . __("Service URL", "fusioninventory") . ""; echo ""; - Html::autocompletionTextField($this, "fusioninventory_url"); + echo Html::input( + 'fusioninventory_url', + [ + 'value' => $this->fields['fusioninventory_url'], + ] + ); echo ""; echo ""; echo ""; echo "" . __("Airwatch Service URL", "airwatch") . ""; echo ""; - Html::autocompletionTextField($this, "airwatch_service_url"); + echo Html::input( + 'airwatch_service_url', + [ + 'value' => $this->fields['airwatch_service_url'], + ] + ); echo ""; echo ""; echo ""; echo "" . __("Airwatch Console URL", "airwatch") . ""; echo ""; - Html::autocompletionTextField($this, "airwatch_console_url"); + echo Html::input( + 'airwatch_console_url', + [ + 'value' => $this->fields['airwatch_console_url'], + ] + ); echo ""; echo ""; echo ""; echo "" . __("Username", "airwatch") . ""; echo ""; - // FIXME This is a credential field so it is not in autocomplete whitelist - // Replace with a simple text input. - Html::autocompletionTextField($this, "username"); + echo Html::input( + 'username', + [ + 'value' => $this->fields['username'], + ] + ); echo ""; echo ""; echo ""; echo "" . __("Password", "airwatch") . ""; echo ""; - // FIXME This is a credential field so it is not in autocomplete whitelist - // Replace with a password text input, crypt it, and handle ability to "blank" it. - Html::autocompletionTextField($this, "password"); + // FIXME This is a credential field. Encrypt it, and handle ability to "blank" it. + echo Html::input( + 'password', + [ + 'type' => 'password', + 'value' => $this->fields['password'], + ] + ); echo ""; echo ""; echo ""; echo "" . __("API Key", "airwatch") . ""; echo ""; - // FIXME This is a credential field so it is not in autocomplete whitelist - // Replace with a simple text input. - Html::autocompletionTextField($this, "api_key"); + echo Html::input( + 'api_key', + [ + 'value' => $this->fields['api_key'], + ] + ); echo ""; echo "";