student numbers
[ssproject1617.git] / testcms-final-anon / system / admin / theme / pages / add.php
1
2 <h1>Add a Page</h1>
3
4 <?php echo Notifications::read(); ?>
5
6 <section class="content">
7
8 <form method="post" action="<?php echo Url::current(); ?>" novalidate>
9 <fieldset>
10 <p>
11 <label for="name">Name:</label>
12 <input id="name" name="name" value="<?php echo Input::post('name'); ?>">
13
14 <em>The name of your page. This gets shown in the navigation.</em>
15 </p>
16
17 <p>
18 <label>Title:</label>
19 <input id="title" name="title" value="<?php echo Input::post('title'); ?>">
20
21 <em>The title of your page, which gets shown in the <code>&lt;title&gt;</code>.</em>
22 </p>
23
24 <p>
25 <label for="slug">Slug:</label>
26 <input id="slug" autocomplete="off" name="slug" value="<?php echo Input::post('slug'); ?>">
27
28 <em>The slug for your post (<code><?php echo $_SERVER['HTTP_HOST']; ?>/<span id="output">slug</span></code>).</em>
29 </p>
30
31 <p>
32 <label for="content">Content:</label>
33 <textarea id="content" name="content"><?php echo Input::post('content'); ?></textarea>
34
35 <em>Your page's content. Accepts valid HTML.</em>
36 </p>
37
38 <p>
39 <label>Status:</label>
40 <select id="status" name="status">
41 <?php foreach(array('draft', 'archived', 'published') as $status): ?>
42 <option value="<?php echo $status; ?>" <?php if(Input::post('status') == $status) echo 'selected'; ?>>
43 <?php echo ucwords($status); ?>
44 </option>
45 <?php endforeach; ?>
46 </select>
47
48 <em>Do you want your page to be live (published), pending (draft), or hidden (archived)?</em>
49 </p>
50 </fieldset>
51
52 <p class="buttons">
53 <button type="submit">Create</button>
54 <a href="<?php echo admin_url('pages'); ?>">Return to pages</a>
55 </p>
56 </form>
57
58 </section>
59
60 <script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.1/mootools-yui-compressed.js"></script>
61 <script>window.MooTools || document.write('<script src="<?php echo theme_url('assets/js/mootools.js'); ?>"><\/script>');</script>
62
63 <script src="<?php echo theme_url('assets/js/helpers.js'); ?>"></script>
64
65 <script>
66 (function() {
67 var slug = $('slug'), output = $('output');
68
69 // call the function to init the input text
70 formatSlug(slug, output);
71
72 // bind to input
73 slug.addEvent('keyup', function() {formatSlug(slug, output)});
74 }());
75 </script>
76
77