mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00

The idea here is to isolate the call to findOne() so that it stops being reactive once data is found. The reason being that server scoring updates will 'change' the post, and meteor will overwrite the user's input, even if preserve is set. Kind of like {{#constant}}, except it waits for data.
24 lines
No EOL
947 B
HTML
24 lines
No EOL
947 B
HTML
<template name="post_edit">
|
|
<div class="grid submit">
|
|
{{#with post}}
|
|
<form class="grid-block form-horizontal">
|
|
<div class="control-group">
|
|
<label class="control-label">Title</label>
|
|
<div class="controls"><input id="title" type="text" value="{{headline}}" /></div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">URL</label>
|
|
<div class="controls"><input id="url" type="text" value="{{url}}" /></div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">Body</label>
|
|
<div class="controls" id="editor"><textarea id="body" value="" class="input-xlarge">{{body}}</textarea></div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<a class="delete-link" href="/posts/deleted">Delete Post</a>
|
|
<input type="submit" value="Submit" />
|
|
</div>
|
|
</form>
|
|
{{/with}}
|
|
</div>
|
|
</template> |