challenges: fix up lists to use new list templates

This commit is contained in:
Tyler Renelle 2013-05-12 13:12:02 +01:00
parent 836787906d
commit 0a37637daf
2 changed files with 12 additions and 9 deletions

View file

@ -5,7 +5,7 @@ module.exports.app = (appExports, model) ->
model.set '_challenge.new',
name: ''
habits: []
dailies: []
daily: []
todos: []
rewards: []
assignees: 'party'

View file

@ -51,16 +51,19 @@
{#unless _challenge.creating}
<a x-bind='click:challengeCreate' class='btn btn-large btn-success'>Create New Challenge</a>
{else}
<form x-bind='submit:challengeSave' class=form-horizontal>
<input id='newChallengeName' type='text' value={_challenge.new.name} placeholder="Challenge Title" required/>
<input id='newChallengeName' type='text' value={_challenge.new.name} placeholder="Challenge Title" required/>
<div class="grid">
...
</div>
<div class="grid">
<app:tasks:task-lists
habits={_challenge.new.habits}
dailys={_challenge.new.dailys}
todos={_challenge.new.todos}
rewards={_challenge.new.rewards}
editable=true />
</div>
<input type='submit' class='btn btn-large btn-success' value='Save' />
<input type='button' x-bind='click:challengeDiscard' class='btn btn-large btn-danger' value=Discard />
</form>
<input type='submit' x-bind="click:submit:challengeSave" class='btn btn-large btn-success' value='Save' />
<input type='button' x-bind='click:challengeDiscard' class='btn btn-large btn-danger' value=Discard />
{/}
</div>