msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-14 15:09+0100\n"
+"POT-Creation-Date: 2012-12-15 23:08+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
"Language-Team: LANGUAGE <lists@parisson.com>\n"
msgid "Write"
msgstr ""
-#: templates/teleforma/answer_form.html:21
+#: templates/teleforma/answer_form.html:46
msgid "Answer to the following question"
-msgstr "Réalisez les consultations fictives suivantes"
+msgstr "Réalisez la consultation fictive suivante"
-#: templates/teleforma/answer_form.html:35
+#: templates/teleforma/answer_form.html:46
+msgid "with"
+msgstr "en"
+
+#: templates/teleforma/answer_form.html:46
+msgid "words"
+msgstr "mots"
+
+#: templates/teleforma/answer_form.html:60
msgid "Save"
msgstr ""
-#: templates/teleforma/answer_form.html:39
+#: templates/teleforma/answer_form.html:63
msgid "Submit it"
msgstr "Soumettre"
"Merci de vous connecter ou bien contactez l'administateur du site pour "
"obtenir un accès privé."
+#: views/pro.py:212
+msgid "You have successfully saved your answer"
+msgstr "Vous avez enregistré votre reponse avec succès"
+
+#: views/pro.py:214
+msgid "You have successfully submitted your answer"
+msgstr "Vous avez soumis votre reponse avec succès"
+
#~ msgid "Respond to the following question"
#~ msgstr "Réalisez la consultation fictive suivante"
#~ msgid "Respond to the following questions"
#~ msgstr "Réalisez les consultations fictives suivantes"
-#~ msgid "keywords"
-#~ msgstr "mots clés"
-
#~ msgid "testimonial template"
#~ msgstr "modèlé d'attestation"
msgid "Close"
msgstr "Fermer"
+
+msgid "You must reach the required number of characters."
+msgstr "Vous devez atteindre le nombre de caractères requis."
+
+msgid "Characters"
+msgstr "Caractères"
};
this.each(function() {
- $(this).after('</span><'+ options.counterElement +' class="' + options.css + '">'+ options.counterText +'</'+ options.counterElement +'>');
+ $(this).after('<'+ options.counterElement +' id="counter" class="' + options.css + '">'+ options.counterText +'</'+ options.counterElement +'>');
calculate(this);
$(this).keyup(function(){calculate(this)});
$(this).change(function(){calculate(this)});
$(document).ready(function(){
$('#id_answer').live("paste",function(e) {
e.preventDefault();
- new Messi(gettext('Sorry, it is not allowed to paste text here.'), {buttons: [{id: 0, label: gettext('Close'), val: 'X'}], modal: true});
+ new Messi(gettext('Sorry, it is not allowed to paste text here.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true});
});
});
//default usage
$("#id_answer").charCount({
necessary: {{question.min_nchar}},
- counterText: gettext('Characters ')+' : ',
+ counterText: gettext('Characters')+' : ',
});
});
+$(document).ready(function(){
+ var b = $('#submit_button');
+ var c = $('#counter')
+ b.unbind('click').click(function() {
+ if (c.hasClass('deceed')){
+ new Messi(gettext('You must reach the required number of characters.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true});
+ }
+ if (c.hasClass('exceed')){
+ $('#id_status').value=3;
+ $('#_AnswerForm').submit();
+ }
+ });
+ });
+
</script>
{% endblock extra_javascript %}
<div class="course_content">
<div class="course_subtitle">
- <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Answer to the following question" %}</h3>
+ <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Answer to the following question" %} {% trans "with" %} {{question.min_nchar}} {% trans "words" %}</h3>
</div>
<div style="text-align: justify;">
{{ question.question|safe }}
<br />
<a href="#" class="component_icon button icon_save"
- onclick="document.getElementById('_AnswerForm').submit(); return false;">{% trans "Save" %}</a>
+ onclick="document.getElementById('_AnswerForm').submit();">{% trans "Save" %}</a>
-<a href="#" class="component_icon button icon_ok"
- onclick="document.getElementById('id_status').value=3;
- document.getElementById('_AnswerForm').submit(); return false;">{% trans "Submit it" %}</a>
+<a href="#" id="submit_button" class="component_icon button icon_ok"
+">{% trans "Submit it" %}</a>
{% endblock course_content %}
{% endif %}
{% endblock status %}
-
-
</div>
{% endblock content %}
from teleforma.views.core import *
-
+from django.utils.translation import ugettext_lazy as _
def get_seminars(user):
seminars = []
answer.question = self.question
answer.save()
if answer.status <= 2:
- messages.info(self.request, "You have successfully saved your answer")
+ messages.info(self.request, _("You have successfully saved your answer"))
elif answer.status == 3:
- messages.info(self.request, "You have successfully submitted your answer")
+ messages.info(self.request, _("You have successfully submitted your answer"))
return super(AnswerView, self).form_valid(form)
def form_invalid(self, form):