mirror of https://gitlab.com/brutaldon/brutaldon
Don't lose text or spoiler text when expanding toot form
This commit is contained in:
parent
66e53837cf
commit
bb65be3e8b
|
@ -33,6 +33,7 @@
|
|||
ic-get-from="{% url "toot" %}"
|
||||
ic-target="#post-form"
|
||||
ic-select-from-response="#post-form"
|
||||
ic-include="#id_status,#id_spoiler_text"
|
||||
title="Complete toot form (media, visibility, etc"
|
||||
class="fa fa-edit">
|
||||
<span class="is-hidden">Complete toot form (media, visibility etc)</span>
|
||||
|
|
|
@ -424,10 +424,12 @@ def toot(request, mention=None):
|
|||
if mention:
|
||||
if not mention.startswith('@'):
|
||||
mention = '@'+mention
|
||||
form = PostForm(initial={'visibility': request.session['user'].source.privacy,
|
||||
form = PostForm(request.GET, request.FILES,
|
||||
initial={'visibility': request.session['user'].source.privacy,
|
||||
'status': mention + '\n' })
|
||||
else:
|
||||
form = PostForm(initial={'visibility': request.session['user'].source.privacy})
|
||||
form = PostForm(request.GET, request.FILES,
|
||||
initial={'visibility': request.session['user'].source.privacy})
|
||||
return render(request, 'main/post.html',
|
||||
{'form': form,
|
||||
'own_acct': request.session['user'],
|
||||
|
|
Loading…
Reference in New Issue