file.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Modbash Clean Elgg Theme
  4. *
  5. * Copyright (c) 2015 ModBash
  6. *
  7. * @author Shane Barron <admin@modbash.com>
  8. * @copyright 2015 SocialApparatus
  9. * @license GNU General Public License (GPL) version 2
  10. * @version 1
  11. * @link http://modbash.com
  12. */
  13. if (!empty($vars['value'])) {
  14. echo elgg_echo('fileexists') . "<br />";
  15. }
  16. if (isset($vars['class'])) {
  17. $vars['class'] = "elgg-input-file {$vars['class']}";
  18. } else {
  19. $vars['class'] = "elgg-input-file";
  20. }
  21. $defaults = array(
  22. 'disabled' => false,
  23. );
  24. $attrs = array_merge($defaults, $vars);
  25. ?>
  26. <div class="fileinput fileinput-new" data-provides="fileinput">
  27. <span class="btn btn-default btn-file"><span class="fileinput-new">Select file</span><span class="fileinput-exists">Change</span>
  28. <input type="file" <?php echo elgg_format_attributes($attrs); ?> />
  29. </span>
  30. <span class="fileinput-filename"></span>
  31. <a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
  32. </div>