<?php
/** @var \Mirasvit\Rma\Block\Rma\NewRma\Step2\CustomFields $block */
?>
<?php $customFields = $block->getCustomFields(); ?>
<?php if ($customFields): ?>
    <fieldset class="fieldset">
        <?php foreach ($customFields as $field): ?>
            <div class="field <?= ($block->getAccessoryClass($field)); ?> <?php if ($field->getIsRequiredCustomer()): ?>required<?php endif ?>">
                <?php if ($field->getType() == 'checkbox'): ?>
                    <?= $block->getFieldInputHtml($field) ?>
                    <label class="label" for="<?= $block->escapeHtml($field->getCode()) ?>">
                        <span><?= __($block->escapeHtml($field->getName())) ?></span>
                    </label>
                    <p class="small"><?= $block->escapeHtml($field->getDescription()) ?></p>
                <?php else: ?>
                    <label class="label">
                        <span><?= __($block->escapeHtml($field->getName())) ?></span>
                    </label>

                    <div class="control">
                        <?= $block->getFieldInputHtml($field) ?>
                        <p class="small"><?= $block->escapeHtml($field->getDescription()) ?></p>
                    </div>
                <?php endif ?>
            </div>
        <?php endforeach ?>
    </fieldset>
<?php endif ?>