D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
plib
/
modules
/
git
/
views
/
scripts
/
partials
/
forms
/
Filename :
radio-mode-selector.phtml
back
Copy
<?php // Copyright 1999-2023. Plesk International GmbH. All rights reserved. ?> <div class="form-row" id="<?php echo $this->id ? $this->id : $this->element->getId() . '-form-row'; ?>"> <div class="field-name"><label for="<?php echo $this->element->getId(); ?>"> <?php echo $this->element->getLabel(); ?> <?php if ($this->element->isRequired()): ?> <span class="required">*</span> <?php endif; ?></label></div> <div class="field-value"> <div class="<?php echo $this->cssPrefix; ?>mode-selector"> <?php foreach ($this->element->getMultiOptions() as $optionName => $optionTitle): ?> <div class="<?php echo $this->cssPrefix; ?>mode-selector-item"> <label class="<?php echo $this->cssPrefix; ?>mode-selector-radio <?php echo ($optionName == $this->element->getValue()) ? 'checked' : ''; ?>"> <input type="radio" id="<?php echo $this->element->getId() . "-$optionName"; ?>" name="<?php echo $this->element->getBelongsTo() ? $this->element->getBelongsTo() . '[' . $this->element->getName() . ']' : $this->element->getName(); ?>" class="<?php echo $this->cssPrefix; ?>mode-selector-radio-input" <?php echo ($optionName == $this->element->getValue()) ? 'checked="checked"' : ''; ?> <?php echo ($this->element->disable === true || (is_array($this->element->disable) && in_array($optionName, $this->element->disable))) ? 'disabled="disabled"' : ''; ?> value="<?php echo $optionName; ?>"> <span class="<?php echo $this->cssPrefix; ?>mode-selector-radio-label"><i class="<?php echo $this->cssPrefix . $this->classes[$optionName]; ?>"></i><?php echo false === $this->element->escape ? $optionTitle : $this->escape($optionTitle); ?></span> </label> </div> <?php endforeach;?> </div> </div> </div> <script type="text/javascript"> Jsw.onReady(function() { $$('.<?php echo $this->cssPrefix; ?>mode-selector-radio input').invoke('observe', 'change', function(e) { $$('.<?php echo $this->cssPrefix; ?>mode-selector-radio').invoke('removeClassName', 'checked'); e.target.up('.<?php echo $this->cssPrefix; ?>mode-selector-radio').addClassName('checked'); }); }); </script>