Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/backend/widgets/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ protected function getFieldDepends($field): string
*/
protected function showFieldLabels(FormField $field): bool
{
if (in_array($field->type, ['checkbox', 'switch', 'section', 'hint'])) {
if (in_array($field->type, ['checkbox', 'switch', 'section', 'hint', 'ruler'])) {
return false;
}

Expand Down
10 changes: 10 additions & 0 deletions modules/backend/widgets/form/partials/_field_ruler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<!-- Horizontal Rule -->
<?php if ($field->label): ?>
<label for="<?= $field->getId() ?>" class="form-label">
<?= e(__($field->label)) ?>
</label>
<?php endif ?>
<div class="field-horizontalrule">
<hr />
</div>
<?php if ($field->comment): ?>
<p class="form-text">
<?= $field->commentHtml ? trans($field->comment) : e(__($field->comment)) ?>
</p>
<?php endif ?>