Merge remote-tracking branch 'github/master' into develop.1.8.1

This commit is contained in:
OpenXE
2023-04-01 22:39:15 +02:00
96 changed files with 10105 additions and 17198 deletions
+15 -19
View File
@@ -1,4 +1,11 @@
<?php
<?php
/*
* SPDX-FileCopyrightText: 2022 Andreas Palm
* SPDX-FileCopyrightText: 2019 Xentral (c) Xentral ERP Software GmbH, Fuggerstrasse 11, D-86150 Augsburg, Germany
*
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
*/
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@@ -10,8 +17,8 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
/****************************************************************************
@@ -163,28 +170,17 @@ class TemplateParser {
public function addMessage($class, $text, $html = false, $_var = 'MESSAGE')
{
$ret = '';
switch($class)
{
case 'error':
case 'warning':
case 'info':
break;
default:
$class = 'info';
break;
}
if(!in_array($class, ['error', 'warning', 'info', 'success']))
$class = 'info';
if(!$html)
{
$text = $this->htmlspecialchars($text);
}
$ret .= '<div class="'.$class.'">'.$text.'</div>';
$ret = sprintf('<div class="%s">%s</div>', $class, $text);
if($_var === 'return')
{
return $ret;
}
return $this->app->Tpl->Add($_var, $ret);
$this->app->Tpl->Add($_var, $ret);
}
public function addSelect($_var, $id, $name, $options, $selected = '', $class = '')