checkbox.php 425 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Elgg checkbox input
  4. * Displays a checkbox input tag
  5. *
  6. * @uses $var['name']
  7. * @uses $vars['value']
  8. * @uses $vars['class']
  9. */
  10. if (isset($vars['class'])) {
  11. $id = "class=\"{$vars['class']}\"";
  12. } else {
  13. $id = '';
  14. }
  15. if (!isset($vars['value'])) {
  16. $vars['value'] = $vars['name'];
  17. }
  18. ?>
  19. <input type="checkbox" <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" />