Skip to content

Commit

Permalink
warning_intro (#1462)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored Jan 8, 2024
1 parent 17cdfa6 commit 2d051c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/yform.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function __construct(array $params = [])
$this->objparams['form_hiddenfields'] = [];

$this->objparams['warning'] = [];
$this->objparams['warning_intro'] = '';
$this->objparams['warning_messages'] = [];

$this->objparams['hide_top_warning_messages'] = false;
Expand Down
5 changes: 4 additions & 1 deletion ytemplates/bootstrap/errors.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

<?php
if ($this->objparams['warning_messages'] || $this->objparams['unique_error']):
if ($this->objparams['Error-occured']): ?>
if ($this->objparams['Error-occured']):
if($this->objparams['warning_intro']) { ?>
<p><?= $this->objparams['warning_intro'] ?></p>
<?php } ?>
<dl class="dl-horizontal">
<dt><?= $this->objparams['Error-occured'] ?></dt>
<dd>
Expand Down

0 comments on commit 2d051c6

Please sign in to comment.