Skip to content

Commit

Permalink
8.x warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis committed Mar 26, 2024
1 parent 04e6f80 commit ea05829
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fragments/default_theme/mform_input.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
$wrapperOpen = $wrapperClose = '';

switch ($this->type) {
case 'text':
break;
case 'radio':
$this->wrapperOpen = '<div class="radio"><label class="description" for="' . $this->id . '">';
$this->wrapperClose = $this->label . '</label></div>';
$wrapperOpen = '<div class="radio"><label class="description" for="' . $this->id . '">';
$wrapperClose = $this->label . '</label></div>';
break;
case 'checkbox':
$this->wrapperOpen = '<div class="checkbox"><label class="description" for="' . $this->id . '">';
$this->wrapperClose = ' ' . $this->label . '</label></div>';
$wrapperOpen = '<div class="checkbox"><label class="description" for="' . $this->id . '">';
$wrapperClose = ' ' . $this->label . '</label></div>';
break;
}

Expand All @@ -18,5 +19,5 @@
} elseif ('datalist-option' == $this->type) {
echo '<option ' . $this->attributes . '>' . $this->value . '</option>';
} else {
echo(property_exists($this, 'wrapperOpen') ? $this->wrapperOpen : '') . '<input id="' . $this->id . '" type="' . $this->type . '" name="REX_INPUT_VALUE' . $this->varId . '" value="' . $this->value . '" class="' . $this->class . '" ' . $this->attributes . '>' . $this->datalist . (property_exists($this, 'wrapperClose') ? $this->wrapperClose : '');
echo $wrapperOpen . '<input id="' . $this->id . '" type="' . $this->type . '" name="REX_INPUT_VALUE' . $this->varId . '" value="' . $this->value . '" class="' . $this->class . '" ' . $this->attributes . '>' . $this->datalist . $wrapperClose;
}

0 comments on commit ea05829

Please sign in to comment.