Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Incorrect plugin language when using PlaceholderField as a translated field #69

Merged
merged 2 commits into from

3 participants

@yakky

Django-CMS javascript code that calls add_plugin() view looks for a input field named after the current language.
django-hvad language tabs lacks such a input: plugins are thus created in the current interface language instead of the current hvad language.
Adding the input fixes the problem.

@travisbot

This pull request passes (merged 115a912 into da398f2).

@travisbot

This pull request passes (merged fd76e78 into da398f2).

@KristianOellegaard

Hey,

Thanks a lot for your pull request. I'm not very involved in the django-cms development, so I will pass this review on to Jonas, if he has the time to look at it.

Kind regards,

Kristian

@ojii can you have a look at this? I'm not sure about what the CMS needs exactly or/and if this is something we should do in hvad.

@KristianOellegaard KristianOellegaard merged commit b9e24f4 into KristianOellegaard:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 14, 2012
  1. @yakky

    Added hidden input field named after the current language code to cor…

    yakky authored
    …rectly set the plugin language upon creation
  2. @yakky
This page is out of date. Refresh to see the latest.
View
3  hvad/templates/admin/hvad/change_form.html
@@ -34,10 +34,11 @@
<div class="nani-language-tabs">
{% for url,name,code,status in language_tabs %}
{% if status == 'current' %}
+ <input type="hidden" class="language_button selected" name="{{ code }}" />
<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 %}
View
5 nani/templates/admin/nani/change_form.html
@@ -34,10 +34,11 @@
<div class="nani-language-tabs">
{% for url,name,code,status in language_tabs %}
{% if status == 'current' %}
- <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>
+ <input type="hidden" class="language_button selected" name="{{ code }}" />
+ <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 %}
Something went wrong with that request. Please try again.