| @@ -2,12 +2,12 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * @var Radio $radio |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -use UserAccessManager\Form\Element\Input; | |
| 7 | -use UserAccessManager\Form\Element\Radio; | |
| 8 | -use UserAccessManager\Form\Element\Select; | |
| 9 | -use UserAccessManager\Form\Element\Textarea; | |
| 6 | +use UserAccessManager\Form\Input; | |
| 7 | +use UserAccessManager\Form\Radio; | |
| 8 | +use UserAccessManager\Form\Select; | |
| 9 | +use UserAccessManager\Form\Textarea; | |
| 10 | 10 | |
| 11 | 11 | ?> |
| 12 | 12 | <th scope="row"><?php echo $radio->getLabel(); ?></th> |
| 13 | 13 | <td> |
| @@ -19,67 +19,63 @@ | ||
| 19 | 19 | $formValue = (is_bool($rawValue) === true) ? |
| 20 | 20 | (($rawValue === true) ? 'true' : 'false') : $rawValue; |
| 21 | 21 | |
| 22 | 22 | ?> |
| 23 | - <div class="uam_radio_option"> | |
| 24 | - <label for="uam_<?php echo $radio->getId() . '_' . $formValue; ?>"> | |
| 25 | - <input id="uam_<?php echo $radio->getId() . '_' . $formValue; ?>" | |
| 26 | - type="radio" | |
| 27 | - name="config_parameters[<?php echo $radio->getId(); ?>]" | |
| 28 | - value="<?php echo $formValue; ?>" | |
| 29 | - <?php | |
| 30 | - if ($radio->getValue() === $possibleValue->getValue()) { | |
| 31 | - echo 'checked="checked"'; | |
| 32 | - } | |
| 33 | - ?> | |
| 34 | - /> | |
| 35 | - <?php echo $possibleValue->getLabel(); ?> | |
| 36 | - </label> | |
| 37 | - <?php | |
| 38 | - $subElement = $possibleValue->getSubElement(); | |
| 23 | + <label for="uam_<?php echo $radio->getId() . '_' . $formValue; ?>"> | |
| 24 | + <input id="uam_<?php echo $radio->getId() . '_' . $formValue; ?>" | |
| 25 | + type="radio" | |
| 26 | + name="config_parameters[<?php echo $radio->getId(); ?>]" | |
| 27 | + value="<?php echo $formValue; ?>" | |
| 28 | + <?php | |
| 29 | + if ($radio->getValue() === $possibleValue->getValue()) { | |
| 30 | + echo 'checked="checked"'; | |
| 31 | + } | |
| 32 | + ?> | |
| 33 | + /> | |
| 34 | + <?php echo $possibleValue->getLabel(); ?> | |
| 35 | + </label> | |
| 36 | + <?php | |
| 37 | + $subElement = $possibleValue->getSubElement(); | |
| 39 | 38 | |
| 40 | - if ($subElement !== null) { | |
| 41 | - if ($subElement instanceof Input) { | |
| 42 | - ?> | |
| 43 | - <input id="uam_<?php echo $subElement->getId(); ?>" | |
| 44 | - type="text" | |
| 45 | - name="config_parameters[<?php echo $subElement->getId(); ?>]" | |
| 46 | - value="<?php echo $subElement->getValue(); ?>"/> | |
| 39 | + if ($subElement !== null) { | |
| 40 | + if ($subElement instanceof Input) { | |
| 41 | + ?> | |
| 42 | + <input id="uam_<?php echo $subElement->getId(); ?>" | |
| 43 | + name="config_parameters[<?php echo $subElement->getId(); ?>]" | |
| 44 | + value="<?php echo $subElement->getValue(); ?>"/> | |
| 45 | + <?php | |
| 46 | + } elseif ($subElement instanceof Textarea) { | |
| 47 | + ?> | |
| 48 | + <textarea id="uam_<?php echo $subElement->getId(); ?>" | |
| 49 | + style="width:100%;min-height:120px;" | |
| 50 | + name="config_parameters[<?php echo $subElement->getId(); ?>]"><?php | |
| 51 | + echo htmlentities($subElement->getValue()); | |
| 52 | + ?></textarea> | |
| 53 | + <?php | |
| 54 | + } elseif ($subElement instanceof Select) { | |
| 55 | + ?> | |
| 56 | + <select id="uam_<?php echo $subElement->getId(); ?>" | |
| 57 | + name="config_parameters[<?php echo $subElement->getId(); ?>]"> | |
| 47 | 58 | <?php |
| 48 | - } elseif ($subElement instanceof Textarea) { | |
| 49 | - ?> | |
| 50 | - <textarea id="uam_<?php echo $subElement->getId(); ?>" | |
| 51 | - class="uam_textarea" | |
| 52 | - name="config_parameters[<?php echo $subElement->getId(); ?>]"><?php | |
| 53 | - echo htmlentities($subElement->getValue()); | |
| 54 | - ?></textarea> | |
| 55 | - <?php | |
| 56 | - } elseif ($subElement instanceof Select) { | |
| 57 | - ?> | |
| 58 | - <select id="uam_<?php echo $subElement->getId(); ?>" | |
| 59 | - name="config_parameters[<?php echo $subElement->getId(); ?>]"> | |
| 60 | - <?php | |
| 61 | - $subPossibleValues = $subElement->getPossibleValues(); | |
| 59 | + $subPossibleValues = $subElement->getPossibleValues(); | |
| 62 | 60 | |
| 63 | - foreach ($subPossibleValues as $subPossibleValue) { | |
| 64 | - ?> | |
| 65 | - <option value="<?php echo $subPossibleValue->getValue(); ?>" <?php | |
| 66 | - if ($subElement->getValue() === $subPossibleValue->getValue()) { | |
| 67 | - echo 'selected="selected"'; | |
| 68 | - } | |
| 69 | - ?> > | |
| 70 | - <?php echo $subPossibleValue->getLabel(); ?> | |
| 71 | - </option> | |
| 72 | - <?php | |
| 61 | + foreach ($subPossibleValues as $subPossibleValue) { | |
| 62 | + ?> | |
| 63 | + <option value="<?php echo $subPossibleValue->getValue(); ?>" <?php | |
| 64 | + if ($subElement->getValue() === $subPossibleValue->getValue()) { | |
| 65 | + echo 'selected="selected"'; | |
| 73 | 66 | } |
| 74 | - ?> | |
| 75 | - </select> | |
| 76 | - <?php | |
| 77 | - } | |
| 67 | + ?> > | |
| 68 | + <?php echo $subPossibleValue->getLabel(); ?> | |
| 69 | + </option> | |
| 70 | + <?php | |
| 71 | + } | |
| 72 | + ?> | |
| 73 | + </select> | |
| 74 | + <?php | |
| 78 | 75 | } |
| 79 | - ?> | |
| 80 | - </div> | |
| 81 | - <?php | |
| 76 | + } | |
| 82 | 77 | } |
| 83 | 78 | ?> |
| 84 | - <p class="description"><?php echo $radio->getDescription(); ?></p> | |
| 79 | + <br/> | |
| 80 | + <p><?php echo $radio->getDescription(); ?></p> | |
| 85 | 81 | </td> |