<?php
// Copyright 1999-2024. WebPros International GmbH. All rights reserved.
?>
<?php if (!$this->doNotRenderRow):?>
<div class="form-row">
<?php endif?>
    <?php
    $title = $this->element->getAttrib('title');
    if($title) {
        ?>
        <div class="field-name">
            <?php echo $title; ?>
        </div>
        <?php
    }
    ?>
    <?php if (!$this->doNotRenderRow):?>
    <div class="field-value">
    <?php endif?>
        <div class="choice-block">
            <?php foreach ($this->element->getMultiOptions() as $optionName => $optionTitle):?>
                <?php $value = $this->element->getValue(); ?>
                <span
                    <?php echo ($optionName == $this->element->getValue())
                        ? ('class="selected' . (('0' == $optionName) ? ' no' : '') . '"')
                        : '';
                    ?>
                >
                    <label>
                        <input type="radio" class="radio"
                            value="<?php echo $optionName; ?>"
                            id="<?php echo $this->element->getId() . "-$optionName"; ?>"
                            name="<?php echo $this->element->getBelongsTo() . '[' . $this->element->getName() . ']'; ?>"
                            <?php echo ($optionName == $this->element->getValue()) ? 'checked="checked"' : ''; ?>
                        />
                        <?php echo $optionTitle; ?>
                    </label>
                </span>
            <?php endforeach;?>
        <?php if (!$this->doNotRenderRow):?>
        </div>
        <?php endif?>
    </div>
<?php if (!$this->doNotRenderRow):?>
</div>
<?php endif?>