<?php
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
?>
<div class='form-row'>
    <div class='field-name'>
        <?php
            if ($this->isNewMail) {
                $label = $this->elementPart($this->element->getElement($this->emailElementName))->label();
            }  else {
                $label = $this->legend;
            }
            echo $label;
        ?>
    </div>
    <div class='field-value'>
        <span>
            <?php
                if($this->isNewMail) {
                    $listName = $this->elementPart($this->element->getElement($this->emailElementName))->content();
                    if($this->domainName) {
                        $domainName = $this->domainName;
                    } else {
                        $domainName = $this->elementPart($this->element->getElement($this->domainElementName))->content();
                    }
                    echo $listName . '<b> @ ' . $domainName . '</b>';
                } else {
                    echo '<div class="text-value"><span>' . $this->listName . '@' . $this->domainName . '</span></div>';
                }
            ?>
        </span>
        <div class="field-errors" style="display: none;"></div>
    </div>
</div>