combo.php 491 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * Combination of text box and check box. When the checkbox is checked, the
  4. * text field is cleared and disabled.
  5. *
  6. */
  7. $label = elgg_echo('install:label:combo:' . $vars['name']);
  8. $vars['class'] = "elgg-combo-text";
  9. echo elgg_view('input/text', $vars);
  10. $vars['class'] = "elgg-combo-checkbox";
  11. $vars['value'] = "{$vars['name']}-checkbox";
  12. echo elgg_view('input/checkbox', $vars);
  13. echo "<label class=\"elgg-combo-label\">$label</label>";
  14. echo '<div class="clearfloat"></div>';