/halogy/application/modules/pages/views/admin/nav_form.php

https://bitbucket.org/haloweb/halogy-1.0/ · PHP · 40 lines · 31 code · 9 blank · 0 comment · 5 complexity · d7d617f4fd7ac248e553e65d5e981d16 MD5 · raw file

  1. <?php if (!$this->core->is_ajax()): ?>
  2. <h1><?php echo (preg_match('/edit/i', $this->uri->segment(3))) ? 'Edit' : 'Add'; ?> Navigation</h1>
  3. <?php endif; ?>
  4. <?php if ($errors = validation_errors()): ?>
  5. <div class="error">
  6. <?php echo $errors; ?>
  7. </div>
  8. <?php endif; ?>
  9. <form method="post" action="<?php echo $this->uri->uri_string(); ?>" class="default">
  10. <label for="navName">Title:</label>
  11. <?php echo @form_input('navName', $data['navName'], 'class="formelement" id="navName"'); ?>
  12. <br class="clear" />
  13. <label for="navPath">Path:</label>
  14. <?php echo @form_input('uri', $data['uri'], 'class="formelement" id="uri"'); ?>
  15. <br class="clear" />
  16. <label for="templateID">Parent:</label>
  17. <?php
  18. if ($parents):
  19. $options = '';
  20. $options[0] = 'Top Level';
  21. foreach ($parents as $parent):
  22. if ($parent['navID'] != @$data['navID']) $options[$parent['navID']] = $parent['navName'];
  23. endforeach;
  24. echo @form_dropdown('parentID',$options,$data['parentID'],'id="parentID" class="formelement"');
  25. endif;
  26. ?>
  27. <br class="clear" />
  28. <input type="submit" value="Save Changes" class="button nolabel" />
  29. <input type="button" value="Cancel" id="cancel" class="button grey" />
  30. </form>
  31. <br class="clear" />