Files
habitica/app/assets/javascripts/backbone/templates/habits/edit.jst.ejs
T
2012-02-11 16:30:27 -05:00

44 lines
1.2 KiB
Plaintext

<h1>Edit habit</h1>
<form id="edit-habit" name="habit">
<div class="field">
<label for="name">Name:</label>
<%= EJS.Helpers.prototype.text_field_tag("name", name) %>
</div>
<div class="field">
<label for="habit_type">Type:</label>
<%= EJS.Helpers.prototype.select_tag('habit_type', habit_type, [{value: 1, text: 'Habit' }, {value: 2, text: 'Daily'}, {value: 3, text: 'Todo'}, {value: 4, text: 'Reward'}]) %>
</div>
<div class="field">
<label for="notes">Notes:</label>
<%= EJS.Helpers.prototype.text_area_tag('notes', notes) %>
</div>
<% if (habit_type==1) { %>
<div class="field">
<label for="up">Vote Up:</label>
<input type="text" name="up" id="up" value="<%= up %>" >
</div>
<div class="field">
<label for="down">Vote Down:</label>
<input type="text" name="down" id="down" value="<%= down %>" >
</div>
<% } %>
<% if (habit_type==4) { %>
<div class="field">
<label for="score">Value:</label>
<%= EJS.Helpers.prototype.text_field_tag("score", score) %>
</div>
<% } %>
<div class="actions">
<input type="submit" value="Update Habit" />
</div>
</form>
<a href="#/index">Back</a>