* Copyright (C) 2023-2024 Lionel Vessiller * Copyright (C) 2023-2024 Patrice Andreani * Copyright (C) 2024 MDW * Copyright (C) 2024 Frédéric France * * This program 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 3 of the License, or * (at your option) any later version. * * This program 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 this program. If not, see . */ /** * \file htdocs/webportal/class/html.formwebportal.class.php * \ingroup webportal * \brief File of class with all html predefined components for WebPortal */ require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; /** * Class to manage generation of HTML components * Only common components for WebPortal must be here. */ class FormWebPortal extends Form { /** * @var DoliDB Database */ public $db; /** * @var array $infofiles Array of file info */ public $infofiles; // Used to return information by function getDocumentsLink /** * Constructor * * @param DoliDB $db Database handler */ public function __construct($db) { $this->db = $db; } /** * Html for input with label * * @param string $type Type of input : button, checkbox, color, email, hidden, month, number, password, radio, range, tel, text, time, url, week * @param string $name Name * @param string $value [=''] Value * @param string $id [=''] Id * @param string $morecss [=''] Class * @param string $moreparam [=''] Add attributes (checked, required, etc) * @param string $label [=''] Label * @param string $addInputLabel [=''] Add label for input * @return string Html for input with label */ public function inputType($type, $name, $value = '', $id = '', $morecss = '', $moreparam = '', $label = '', $addInputLabel = '') { $out = ''; if ($label != '') { $out .= '