Skip to content

Commit

Permalink
move some rules ui to twig (#15360)
Browse files Browse the repository at this point in the history
* move some rules ui to twig

* lint

* improve preview

* remove size attr
  • Loading branch information
cconard96 authored Sep 2, 2023
1 parent babaca1 commit 1527aaf
Show file tree
Hide file tree
Showing 13 changed files with 578 additions and 394 deletions.
12 changes: 1 addition & 11 deletions front/rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@

Html::header(Rule::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "admin", "rule", -1);

echo TemplateRenderer::getInstance()->render(
'pages/admin/rules_list.html.twig',
[
'rules_group' => [
[
'type' => __('Rule type'),
'entries' => RuleCollection::getRules(),
],
]
]
);
RuleCollection::showCollectionsList();

Html::footer();
4 changes: 2 additions & 2 deletions src/Application/View/Extension/PhpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ public function phpConfig(string $name)
/**
* Call function of static method.
*
* @param string $callable
* @param string|array $callable
* @param array $parameters
*
* @return mixed
*/
public function call(string $callable, array $parameters = [])
public function call(string|array $callable, array $parameters = [])
{
if (is_callable($callable)) {
return call_user_func_array($callable, $parameters);
Expand Down
2 changes: 1 addition & 1 deletion src/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -2642,7 +2642,7 @@ public function displayCriteriaSelectPattern($name, $ID, $condition, $value = ""
!$display
&& ($rc = getItemForItemtype($this->rulecriteriaclass))
) {
echo Html::input($name, ['value' => $value, 'size' => '70']);
echo Html::input($name, ['value' => $value]);
}
}

Expand Down
Loading

0 comments on commit 1527aaf

Please sign in to comment.