mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-02 15:59:39 +00:00
prettier edit form, & x-bind form instead of <a>
This commit is contained in:
parent
4c6bd8bc84
commit
57476d1e3f
1 changed files with 22 additions and 12 deletions
|
|
@ -133,19 +133,29 @@
|
||||||
<editPopover:>
|
<editPopover:>
|
||||||
<div style="display:none;" id={{:task.id}}-edit>
|
<div style="display:none;" id={{:task.id}}-edit>
|
||||||
<hr/>
|
<hr/>
|
||||||
<label>Text<input type=text value={:task.text} /></label>
|
<form x-bind=submit:toggleEdit data-selector="{{:task.id}}-edit">
|
||||||
<label>Notes<textarea rows=3>{:task.notes}</textarea></label>
|
<div class=control-group>
|
||||||
{#if equal(:task.type, 'habit')}
|
<label>Text</label><input type=text value={:task.text} />
|
||||||
<div class="control-group">
|
<label>Notes</label><textarea rows=3>{:task.notes}</textarea>
|
||||||
<label class="checkbox inline"><input type=checkbox checked={:task.up}>Up</label>
|
|
||||||
<label class="checkbox inline"><input type=checkbox checked={:task.down}>Down</label>
|
|
||||||
</div>
|
</div>
|
||||||
{/}
|
{#if equal(:task.type, 'habit')}
|
||||||
{#if equal(:task.type, 'reward')}
|
<div class="control-group">
|
||||||
<label>value<input type=text value={:task.value} /></label>
|
<label class="checkbox inline"><input type=checkbox checked={:task.up}>Up</label>
|
||||||
{/}
|
<label class="checkbox inline"><input type=checkbox checked={:task.down}>Down</label>
|
||||||
<a x-bind=click:toggleEdit data-selector="{{:task.id}}-edit" class="btn">Save</a>
|
</div>
|
||||||
<a x-bind=click:del class="btn btn-danger">Delete</a>
|
{/}
|
||||||
|
{#if equal(:task.type, 'reward')}
|
||||||
|
<div class=control-group>
|
||||||
|
<label>Price
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span2" size="16" type="text" value={:task.value}><span class="add-on">Gold</span>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
{/}
|
||||||
|
<button type=submit class="btn">Save</a>
|
||||||
|
<button x-bind=click:del class="btn btn-danger">Delete</a>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Footer:>
|
<Footer:>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue