forked from datananda/Project2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts-form.handlebars
49 lines (49 loc) · 2.38 KB
/
posts-form.handlebars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{{> navbar}}
<div class="container">
<div class="row">
<div class="col s12">
{{#if post.edit}}
<h2>Edit Post</h2>
{{else}}
<h2>New Post</h2>
{{/if}}
</div>
<div class="row">
<form>
<div class="input-field col s12 m7">
<input id="post-title-input" type="text" value="{{post.title}}">
<label for="post-title-input">Title</label>
</div>
<div class="col s12 m5">
<a id="post-category-dropdown-button" class="dropdown-trigger btn-flat waves-effect waves-orange" href="#" data-target="post-category-dropdown">
<i class="material-icons right">arrow_drop_down</i>{{#if post.edit}}{{post.category}}{{else}}Post Category{{/if}}</a>
<ul id="post-category-dropdown" class="dropdown-content">
<li>
<a href="#" class="post-category-dropdown-option orange-text">
<i class="material-icons">attach_money</i>For Sale</a>
</li>
<li>
<a href="#" class="post-category-dropdown-option orange-text">
<i class="material-icons">announcement</i>Announcement</a>
</li>
<li>
<a href="#" class="post-category-dropdown-option orange-text">
<i class="material-icons">help</i>Question</a>
</li>
</ul>
</div>
<div class="input-field col s12">
<textarea id="post-body-input" class="materialize-textarea">{{post.body}}</textarea>
<label for="post-body-input">Message</label>
<br>
<br>
{{#if post.edit}}
<button class="btn orange darken-3 waves-effect waves-orange" type="submit" id="update-post-button" data-id={{post.id}}>Update Post</button>
{{else}}
<button class="btn orange darken-3 waves-effect waves-orange" type="submit" id="new-post-button">Submit Post</button>
{{/if}}
</div>
</form>
</div>
</div>
</div>