src/cm/templates/site/text_embed.html
changeset 484 5a8e83132898
parent 476 35a632ed9109
--- a/src/cm/templates/site/text_embed.html	Mon Jan 14 10:43:21 2013 +0100
+++ b/src/cm/templates/site/text_embed.html	Mon Jan 21 09:29:52 2013 +0100
@@ -4,7 +4,7 @@
 {% load local_perms %}
 
 {% block title %}
-{% blocktrans %}Text notifications{% endblocktrans %}
+{% blocktrans %}Embed text{% endblocktrans %}
 {% endblock %}
 
 {% block main %}
@@ -15,6 +15,10 @@
 <script type="text/javascript">
 <!--
 tb_conf['current_tab'] = 'embed';
+$(document).ready(function(){
+  $("#embed_txt").focus();
+  $("#embed_txt").select();
+});
 -->
 </script>
 
@@ -23,17 +27,13 @@
 <form id="embed" enctype="multipart/form-data" action="." method="post">
 
 <h2 class="title_first">{% blocktrans %}Embed text{% endblocktrans %}</h2>
-{% 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 %}
-(<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>)
-<br/>
-<br/>
-<input class="copy_link" style="width:100%;background-color:#DDDDDD;" value="{{ embed_code }}" type="text" readonly="true"></input>
-</textarea>
+<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 %}
+(<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>)</p>
+<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>
 
 {% if not anonymous_can_view_text %}
 {% if can_manage_text %}
-<br/>
-<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><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>
 {% endif %}
 {% endif %}
 </form>