Skip to content

Commit

Permalink
Fix upload field label
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Oct 6, 2024
1 parent dc57161 commit c4a48a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions panel/views/fields/upload.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php if ($field->has('label')) : ?>
<label class="form-label"><?= $field->label() ?></label>
<?php endif ?>
<?php if ($field->get('listFiles', false) && ($model = $field->parent()?->model())) : ?>
<?php $this->insert('fields.partials.filelist', ['model' => $model, 'files' => $field->collection()]); ?>
<?php endif ?>
<?php if ($field->has('label')) : ?>
<label class="<?= $this->classes(['form-label', 'form-label-required' => $field->isRequired()]) ?>"><?= $this->escape($this->append($field->label(), ':')) ?></label>
<?php if ($field->has('suggestion')) : ?><span class="form-label-suggestion">(<?= $this->escape($field->get('suggestion')) ?>)</span><?php endif ?>
<?php endif ?>
<input <?= $this->attr([
'type' => 'file',
'class' => ['form-input', 'form-input-file'],
Expand Down

0 comments on commit c4a48a0

Please sign in to comment.