| author | Production Moz <dev@sopinspace.com> |
| Mon, 05 Aug 2013 04:05:28 +0200 | |
| changeset 528 | cbe216651b19 |
| parent 484 | 5a8e83132898 |
| permissions | -rw-r--r-- |
| 63 | 1 |
{% extends "site/layout/base_text.html" %} |
2 |
{% load com %} |
|
3 |
{% load i18n %} |
|
4 |
{% load local_perms %} |
|
5 |
||
6 |
{% block title %} |
|
| 484 | 7 |
{% blocktrans %}Embed text{% endblocktrans %} |
| 63 | 8 |
{% endblock %} |
9 |
||
10 |
{% block main %} |
|
11 |
{% get_local_perm request can_manage_workspace as can_manage_workspace %} |
|
12 |
{% get_local_perm request can_view_unapproved_comment as can_view_unapproved_comment %} |
|
| 126 | 13 |
{% get_local_text_perm request text can_manage_text as can_manage_text %} |
| 63 | 14 |
|
15 |
<script type="text/javascript"> |
|
16 |
<!-- |
|
17 |
tb_conf['current_tab'] = 'embed'; |
|
| 484 | 18 |
$(document).ready(function(){ |
19 |
$("#embed_txt").focus(); |
|
20 |
$("#embed_txt").select(); |
|
21 |
}); |
|
| 63 | 22 |
--> |
23 |
</script> |
|
24 |
||
25 |
<div id="text_embed" class="tab-meta"> |
|
26 |
||
|
439
8994d24e4b2f
Reverts to changeset 435, and just add {% csrf_token %} to template forgot_pw.html, since CSRF protection seems to be only here (surely because of django.contrib.auth.views).
gibus
parents:
438
diff
changeset
|
27 |
<form id="embed" enctype="multipart/form-data" action="." method="post"> |
| 63 | 28 |
|
29 |
<h2 class="title_first">{% blocktrans %}Embed text{% endblocktrans %}</h2> |
|
| 484 | 30 |
<p>{% blocktrans %}Copy this code into your site to display text with comments.{% endblocktrans %} {% blocktrans %}Users will also be able to add comments from your site depending on anonymous users' roles.{% endblocktrans %} |
31 |
(<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>)</p> |
|
32 |
<input id="embed_txt" class="copy_link" size="{{ embed_code|length}}" style="width:auto;background-color:#DDDDDD;" value="{{ embed_code }}" type="text" readonly="true"></input> |
|
| 126 | 33 |
|
| 63 | 34 |
{% if not anonymous_can_view_text %} |
| 126 | 35 |
{% if can_manage_text %} |
| 484 | 36 |
<p><span style="color:#F00;">{% blocktrans %}Warning:{% endblocktrans %}</span>{% blocktrans %}You won't successfully embed the text before you give anonymous users a role allowing them to view the text.{% endblocktrans %}</span></p> |
| 63 | 37 |
{% endif %} |
| 126 | 38 |
{% endif %} |
| 63 | 39 |
</form> |
40 |
</div> |
|
41 |
||
42 |
||
43 |
{% endblock %} |
|
44 |