N°3537 run_query : fix query suggestion button

Was throwing plain old HTML
Now use standard button component, and a new HtmlFactory to avoid calling \WebPage::GetP

Also change "use this query" behavior : now also submits the form directly

And : added a TODO 3.0.0 for the "query examples" buttons (will be done later)
This commit is contained in:
Pierre Goiffon
2021-01-14 17:07:55 +01:00
parent a41229b223
commit 442e9598f8
4 changed files with 54 additions and 13 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* Copyright (C) 2013-2020 Combodo SARL
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
*/
namespace Combodo\iTop\Application\UI\Base\Component\Html;
/**
* @package Combodo\iTop\Application\UI\Base\Component\Html
* @since 3.0.0
*/
class HtmlFactory
{
public static function MakeP(string $sContent): Html
{
return new Html('<p>'.$sContent.'</p>');
}
}