PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 5<?php if ($errors = validation_errors()): ?>
 6	<div class="error">
 7		<?php echo $errors; ?>
 8	</div>
 9<?php endif; ?>
10
11<form method="post" action="<?php echo $this->uri->uri_string(); ?>" class="default">
12
13		<label for="navName">Title:</label>
14		<?php echo @form_input('navName', $data['navName'], 'class="formelement" id="navName"'); ?>
15		<br class="clear" />
16
17		<label for="navPath">Path:</label>
18		<?php echo @form_input('uri', $data['uri'], 'class="formelement" id="uri"'); ?>
19		<br class="clear" />
20			
21		<label for="templateID">Parent:</label>
22		<?php
23		if ($parents):
24			$options = '';		
25			$options[0] = 'Top Level';		
26			foreach ($parents as $parent):
27				if ($parent['navID'] != @$data['navID']) $options[$parent['navID']] = $parent['navName'];
28			endforeach;
29			
30			echo @form_dropdown('parentID',$options,$data['parentID'],'id="parentID" class="formelement"');
31		endif;
32		?>	
33		<br class="clear" />
34		
35	<input type="submit" value="Save Changes" class="button nolabel" />
36	<input type="button" value="Cancel" id="cancel" class="button grey" />
37	
38</form>
39
40<br class="clear" />