Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Apr 27, 2024
1 parent b4ffb4c commit 955cc72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/templates/element/form/listItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
$this->set('vv_field_arguments', $arguments);

// Additional classes calculation
$classes = match ($arguments['fieldName']) {
$classes = match ($this->Fieeld->getFieldType($arguments['fieldName'])) {
'date',
'datetime',
'timestamp' => 'fields-datepicker ',
Expand Down
12 changes: 6 additions & 6 deletions app/templates/element/form/nameDiv.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@
?>

<div class="field-name <?= $classes ?>">
<!-- We print the login checkbox along with the Identifier type. As a result, the label is redundant -->
<?php if($fieldName != 'login'): ?>

<div class="field-title">
<!-- Will this work for accessibility? -->
<?php if((isset($labelIsTextOnly) && !$labelIsTextOnly)
<?php if((isset($vv_field_arguments['labelIsTextOnly']) && !$vv_field_arguments['labelIsTextOnly'])
&& $this->Fieeld->getFieldType($fieldName) !== 'boolean'): ?>
<?= $this->Form->label($fn, $label) ?>
<?php else: ?>
<!-- We print the login checkbox along with the Identifier type. -->
<!-- As a result, the label is redundant -->
<?php elseif($fieldName != 'login'): ?>
<?= $label ?>
<?php endif; ?>
<?php
// Required Field
if($this->Fieeld->isEditable() && in_array($fn, $this->Fieeld->getReqFields(), true)) {
if($this->Fieeld->isEditable() && $this->Fieeld->isReqField($fn)) {
print $this->element('form/requiredSpan');
}
?>
</div>
<?php if(isset($desc)): ?>
<div class="field-desc"><?= $desc ?></div>
<?php endif; // description?>
<?php endif; // login?>
</div>

0 comments on commit 955cc72

Please sign in to comment.