Compare commits

...

4 Commits

Author SHA1 Message Date
David Taylor
d881ce3a96 Update login_embed.html 2019-06-20 00:04:47 +01:00
David Taylor
e3fd84c1b6 Change option 2019-06-19 22:28:14 +01:00
David Taylor
7683dc37ff Increase embed height
Scrolling is not allowed in Discourse oneboxes, so make sure all the content will fit
2019-06-19 22:23:41 +01:00
David Taylor
85a835ed0d Remove autofocus from embedded login form 2019-06-19 22:20:02 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -66,10 +66,10 @@ class EventOembed(generic.View):
full_url = "{0}://{1}{2}".format(request.scheme, request.META['HTTP_HOST'], embed_url) full_url = "{0}://{1}{2}".format(request.scheme, request.META['HTTP_HOST'], embed_url)
data = { data = {
'html': '<iframe src="{0}" frameborder="0" width="100%" height="250"></iframe>'.format(full_url), 'html': '<iframe src="{0}" frameborder="0" width="100%" height="350"></iframe>'.format(full_url),
'version': '1.0', 'version': '1.0',
'type': 'rich', 'type': 'rich',
'height': '250' 'height': '350'
} }
json = simplejson.JSONEncoderForHTML().encode(data) json = simplejson.JSONEncoderForHTML().encode(data)

View File

@@ -17,11 +17,11 @@
<form id="loginForm" action="" method="post" role="form" target="_self">{% csrf_token %} <form id="loginForm" action="" method="post" role="form" target="_self">{% csrf_token %}
<div class="form-group"> <div class="form-group">
<label for="id_username">{{ form.username.label }}</label> <label for="id_username">{{ form.username.label }}</label>
{% render_field form.username class+="form-control" placeholder=form.username.label %} {{ form.username }}
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="{{ form.password.id_for_label }}">{{ form.password.label }}</label> <label for="{{ form.password.id_for_label }}">{{ form.password.label }}</label>
{% render_field form.password class+="form-control" placeholder=form.password.label %} {{ form.password }}
</div> </div>
<div class="text-right"> <div class="text-right">
<input type="submit" value="Login" class="btn btn-primary"/> <input type="submit" value="Login" class="btn btn-primary"/>