| @@ -1,14 +1,22 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @var Radio $radio | |
| 3 | + * Radio.php | |
| 4 | + * | |
| 5 | + * Radio button form field. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <[email protected]> | |
| 10 | + * @copyright 2008-2017 Alexander Schneider | |
| 11 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 | |
| 12 | + * @version SVN: $id$ | |
| 13 | + * @link http://wordpress.org/extend/plugins/user-access-manager/ | |
| 4 | 14 | */ |
| 5 | 15 | |
| 6 | -use UserAccessManager\Form\Input; | |
| 7 | -use UserAccessManager\Form\Radio; | |
| 8 | -use UserAccessManager\Form\Select; | |
| 9 | -use UserAccessManager\Form\Textarea; | |
| 10 | - | |
| 16 | +/** | |
| 17 | + * @var \UserAccessManager\Form\Radio $radio | |
| 18 | + */ | |
| 11 | 19 | ?> |
| 12 | 20 | <th scope="row"><?php echo $radio->getLabel(); ?></th> |
| 13 | 21 | <td> |
| 14 | 22 | <?php |
| @@ -19,10 +27,10 @@ | ||
| 19 | 27 | $formValue = (is_bool($rawValue) === true) ? |
| 20 | 28 | (($rawValue === true) ? 'true' : 'false') : $rawValue; |
| 21 | 29 | |
| 22 | 30 | ?> |
| 23 | - <label for="uam_<?php echo $radio->getId() . '_' . $formValue; ?>"> | |
| 24 | - <input id="uam_<?php echo $radio->getId() . '_' . $formValue; ?>" | |
| 31 | + <label for="uam_<?php echo $radio->getId().'_'.$formValue; ?>"> | |
| 32 | + <input id="uam_<?php echo $radio->getId().'_'.$formValue; ?>" | |
| 25 | 33 | type="radio" |
| 26 | 34 | name="config_parameters[<?php echo $radio->getId(); ?>]" |
| 27 | 35 | value="<?php echo $formValue; ?>" |
| 28 | 36 | <?php |
| @@ -36,23 +44,23 @@ | ||
| 36 | 44 | <?php |
| 37 | 45 | $subElement = $possibleValue->getSubElement(); |
| 38 | 46 | |
| 39 | 47 | if ($subElement !== null) { |
| 40 | - if ($subElement instanceof Input) { | |
| 48 | + if ($subElement instanceof \UserAccessManager\Form\Input) { | |
| 41 | 49 | ?> |
| 42 | 50 | <input id="uam_<?php echo $subElement->getId(); ?>" |
| 43 | 51 | name="config_parameters[<?php echo $subElement->getId(); ?>]" |
| 44 | 52 | value="<?php echo $subElement->getValue(); ?>"/> |
| 45 | 53 | <?php |
| 46 | - } elseif ($subElement instanceof Textarea) { | |
| 54 | + } elseif ($subElement instanceof \UserAccessManager\Form\Textarea) { | |
| 47 | 55 | ?> |
| 48 | 56 | <textarea id="uam_<?php echo $subElement->getId(); ?>" |
| 49 | 57 | style="width:100%;min-height:120px;" |
| 50 | 58 | name="config_parameters[<?php echo $subElement->getId(); ?>]"><?php |
| 51 | 59 | echo htmlentities($subElement->getValue()); |
| 52 | - ?></textarea> | |
| 60 | + ?></textarea> | |
| 53 | 61 | <?php |
| 54 | - } elseif ($subElement instanceof Select) { | |
| 62 | + } elseif ($subElement instanceof \UserAccessManager\Form\Select) { | |
| 55 | 63 | ?> |
| 56 | 64 | <select id="uam_<?php echo $subElement->getId(); ?>" |
| 57 | 65 | name="config_parameters[<?php echo $subElement->getId(); ?>]"> |
| 58 | 66 | <?php |