PluginProbe
User Access Manager / 2.3.4
User Access Manager v2.3.4
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/View/AdminForm/Radio.php +55 -59 trunk2.3.4 View file →
@@ -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>&nbsp;&nbsp;&nbsp;
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>