Permalink
Browse files

Hidden input on admin model editor, to allow django-cms placeholder p…

…lugin js editor to get current language
  • Loading branch information...
1 parent 4cb7c35 commit cf4be068f570c4cab3029a5921013f292d6a8ae5 @bercab bercab committed Apr 24, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 nani/templates/admin/nani/change_form.html
@@ -34,10 +34,12 @@
<div class="nani-language-tabs">
{% for url,name,code,status in language_tabs %}
{% if status == 'current' %}
+ <!-- input for django-cms plugin js editor to get current language -->
+ <div style="display: none;"><input type="hidden" name="language" value="{{code}}" id="id_language"/></div>
<span class="current">{{ name }}{% if current_is_translated and allow_deletion %}<a class="deletelink" href="./delete-translation/{{ code }}/" title="{% trans 'Delete Translation' %}">&nbsp;</a>{% endif %}</span>
{% else %}
<span class="{{ status }}"><a href="{{ url }}">{{ name }}</a> {% if status == 'available' and allow_deletion %}<a class="deletelink" href="./delete-translation/{{ code }}/" title="{% trans 'Delete Translation' %}">&nbsp;</a>{% endif %}</span>
{% endif %}
{% endfor %}
</div>
-{% endblock %}
+{% endblock %}

0 comments on commit cf4be06

Please sign in to comment.