File indexing completed on 2025-05-04 05:29:17
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 ?> 0023 <div class="form-group"> 0024 <div class="col-sm-12"> 0025 <?php 0026 // force $value to array so we can compare multiple values to multiple 0027 // options; also ensure it's a string for comparison purposes. 0028 $value = array_map('strval', (array)$this->element->getValue()); 0029 $separator = $this->element->getSeparator(); 0030 foreach ($this->element->getMultiOptions() as $opt_value => $opt_label) { 0031 // checked? 0032 $opt = ''; 0033 if (in_array((string)$opt_value, $value)) { 0034 $opt .= ' checked="checked"'; 0035 } 0036 ?> 0037 <div class="col-sm-6"><label><input type="radio" 0038 style="margin-top: 15px;" <?= $opt ?> 0039 value="<?= $this->escape($opt_value) ?>" 0040 name="<?= $this->escape($this->element->getName()) ?>"><?= $this->escape($opt_label) ?> 0041 </label></div> 0042 <?php 0043 } 0044 ?> 0045 <?php if ($this->element->getMessages()) { 0046 $errorHtml = ''; 0047 foreach ($this->element->getMessages() as $currentError) { 0048 $errorHtml .= '<label id="<?=$this->escape($this->element->getName())?>-error" class="error" for="<?=$this->escape($this->element->getName())?>">' . $currentError . '</label>'; 0049 } 0050 ?> 0051 <?php echo $errorHtml ?> 0052 <?php } ?> 0053 </div> 0054 </div> 0055 <?php /* 0056 <label><input type="radio" value="yearly" id="amount_period-yearly" name="amount_period">yearly</label> <label><input type="radio" value="one-time" id="amount_period-one-time" name="amount_period">one-time</label> 0057 */