Skip to content

Commit 2cb3f4e

Browse files
committed
feat(form_validator):enhance presentation
Signed-off-by: Thierry Bugier <[email protected]>
1 parent c209561 commit 2cb3f4e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

inc/form_validator.class.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function showForForm(PluginFormcreatorForm $item, $options = []) {
130130
// Global validation settings
131131
echo "<form method='post' action='".self::getFormURL()."'>";
132132
echo "<div class='spaced'><table class='tab_cadre_fixe'>";
133-
echo "<tr class='tab_bg_1'><th colspan='3'>";
133+
echo "<tr class='tab_bg_1'><th colspan='3' class='center'>";
134134
echo __('General settings', 'formcreator');
135135
echo "</th>";
136136
echo "<tr><td width='20%'>";
@@ -184,6 +184,16 @@ class='submit'>";
184184
// Show current validators
185185
$formFk = PluginFormcreatorForm::getForeignKeyField();
186186
$rows = $this->find([$formFk => $formId], ['level ASC']);
187+
echo '<table class="tab_cadre_fixe">';
188+
echo '<tr class="tab_bg_1"><th class="center">';
189+
echo self::getTypeName(Session::getPluralNumber());
190+
echo '</th>';
191+
echo '</tr>';
192+
echo '</table>';
193+
if (count($rows) < 1) {
194+
// No valdiatorr to show
195+
return;
196+
}
187197

188198
$rand = mt_rand();
189199
Html::openMassiveActionsForm('mass'.__CLASS__.$rand);

0 commit comments

Comments
 (0)