Fixed minor bugs and added strings to django.po
authorverrierj
Tue, 30 Aug 2011 16:57:03 +0200
changeset 160 123aa9bc55a7
parent 159 7a44c25db9a5
child 161 ec99af8284f5
Fixed minor bugs and added strings to django.po
src/ldt/ldt/ldt_utils/forms.py
src/ldt/ldt/static/ldt/js/projectscontents.js
src/ldt/ldt/user/templates/ldt/user/change_email.html
src/ldt/ldt/user/templates/ldt/user/change_language.html
src/ldt/ldt/user/templates/ldt/user/change_name.html
src/ldt/ldt/user/templates/ldt/user/change_password.html
src/ldt/ldt/user/views.py
web/ldtplatform/locale/fr/LC_MESSAGES/django.po
--- a/src/ldt/ldt/ldt_utils/forms.py	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/ldt_utils/forms.py	Tue Aug 30 16:57:03 2011 +0200
@@ -23,7 +23,7 @@
 
 class SearchForm(forms.Form):
     search = forms.CharField(label=_("Search"))
-    field = forms.ChoiceField([(u"all", u"all"), (u"title", u"title"), (u"abstract", u"resume"), (u"tags", u"tags")], label=_("Fields"))
+    field = forms.ChoiceField([(u"all", _("all")), (u"title", _("title")), (u"abstract", _("resume")), (u"tags", _("tags"))], label=_("Fields"))
     ldt_pres = forms.BooleanField(required=False, initial=True, label=_("Display the results in Lignes De Temps"))
 
 class AddProjectForm (forms.Form):
--- a/src/ldt/ldt/static/ldt/js/projectscontents.js	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/static/ldt/js/projectscontents.js	Tue Aug 30 16:57:03 2011 +0200
@@ -215,7 +215,7 @@
     
 }
 
-function init_modal_window (class_name, windowW, windowH, frameW, frameH, base_node) {
+function init_modal_window (class_name, windowW, windowH, frameW, frameH, base_node, searchprojectfilterurl) {
     $(class_name,base_node).each(function(i){
         $(this).attr("target","_iri");
     });
@@ -243,13 +243,12 @@
                 nm.store.iframe.width(frameW);
                 nm.store.iframe.height(frameH);
             },
+            afterClose: function(nm) {
+            	searchCallback($('#searchprojectsinput'), "#contentslistcontainer", searchprojectfilterurl);
+            },
             close: function(nm) {
                 // We don't do anything here, we hack the callback directly from the close function.
             },
-            afterClose: function(nm) {
-                // Can't do that because searchprojectfilterurl is not defined in init_events_base params
-                searchCallback($('#searchprojectsinput'), "#projectslistcontainer", searchprojectfilterurl, 0);
-            }
         }
     });
     
@@ -263,10 +262,9 @@
 
 function init_events_base_projects(base_node, embed_url, searchprojectfilterurl, publishprojecturl, unpublishprojecturl) {
 
-    // These are the functions called when we display a project in an LDT modal window
-    init_modal_window ('.ldt_link_open_ldt', 1025, 660, 1015, 650, base_node);
-    init_modal_window ('.ldt_link_create_project', 500, 520, 500, 510, base_node);
-    init_modal_window ('.ldt_link_copy_project', 500, 150, 500, 150, base_node);
+    init_modal_window ('.ldt_link_open_ldt', 1025, 660, 1015, 650, base_node, searchprojectfilterurl);
+    init_modal_window ('.ldt_link_create_project', 500, 520, 500, 510, base_node, searchprojectfilterurl);
+    init_modal_window ('.ldt_link_copy_project', 500, 150, 500, 150, base_node, searchprojectfilterurl);
 
      
     $('.publishedproject', base_node).click(function(e) {
--- a/src/ldt/ldt/user/templates/ldt/user/change_email.html	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/user/templates/ldt/user/change_email.html	Tue Aug 30 16:57:03 2011 +0200
@@ -27,7 +27,7 @@
     <table>
        <tr>
             <td>
-                <label for="id_email1">{% trans "email" %}:</label>
+                <label for="id_email1">{% trans "email" %}</label>
             </td>
             <td>
                 <input id="id_email1" type="text" maxlength="75" name="email1" class="required email"/>
@@ -36,7 +36,7 @@
         <tr>
         </tr>
             <td>
-                <label for="id_email2">{% trans "Confirmation de l'adresse émail" %}:</label>
+                <label for="id_email2">{% trans "Confirmation de l'adresse émail" %}</label>
             </td>
             <td>
                  <input id="id_email2" type="text" maxlength="75" name="email2" class="required email"/>
--- a/src/ldt/ldt/user/templates/ldt/user/change_language.html	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/user/templates/ldt/user/change_language.html	Tue Aug 30 16:57:03 2011 +0200
@@ -14,7 +14,7 @@
 {% block content %}
 {{ block.super }}
 <p>{% trans "Please change the language" %}</p>
-<form action="{{BASE_URL}}/ldtplatform/i18n/setlang/" method="post">
+<form action="{{ url_change_language }}" method="post">
 	{% csrf_token %}
 	<input name="next" type="hidden" value="" />
 	<label >{% trans "Language" %}&nbsp;: </label>
--- a/src/ldt/ldt/user/templates/ldt/user/change_name.html	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/user/templates/ldt/user/change_name.html	Tue Aug 30 16:57:03 2011 +0200
@@ -2,7 +2,7 @@
 {# form of name's change #}
 {% load i18n %}
 
-{% block content_title %}{% trans "Change user name" %} {% endblock %}
+{% block content_title %}{% trans "Name change" %} {% endblock %}
 
 {% block css_import %}
 {{ block.super }}
@@ -14,13 +14,13 @@
 {% block content %}
 {{ block.super }}
 {% if form %}
-<p>{% trans "Please modify your firstname or your lastname" %}</p>
+<p>{% trans "Please change your name" %}</p>
 <form action="" method="POST" id="change_name">
 {% csrf_token %}
     <table>
        <tr>
             <td>
-                <label for="id_first_name">{% trans "first name" %} :</label>
+                <label for="id_first_name">{% trans "first name" %}</label>
             </td>
             <td>
                 <input id="id_first_name" type="text" maxlength="30" name="first_name" value="{{ user.first_name }}"/>
@@ -28,13 +28,13 @@
         <tr>
         </tr>
             <td>
-                <label for="id_last_name">Last name :</label>
-            </td>
+                <label for="id_last_name">{% trans "name" %}</label>
+            </td> 
             <td>
                  <input id="id_last_name" type="text" maxlength="30" name="last_name" value="{{ user.last_name }}"/>
             </td>
         </tr>
-        <tr><th></th><td><input type="submit" class="button" name="submit" value="Change my name" /></td></tr>
+        <tr><th></th><td><input type="submit" class="button" name="submit" value="{% trans "Name change" %}" /></td></tr>
     </table>
 </form>
 {% else %}
--- a/src/ldt/ldt/user/templates/ldt/user/change_password.html	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/user/templates/ldt/user/change_password.html	Tue Aug 30 16:57:03 2011 +0200
@@ -17,10 +17,33 @@
 		accept-charset="utf-8">
 	{% csrf_token %}
 	<table>
-		{{ form.as_table }}
+		<tr>
+			<td>
+				<label for="id_old_password">{% trans "Old password" %}</label>
+			</td>
+			<td>
+				<input type="password" name="old_password" id="id_old_password" />
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<label for="id_new_password1">{% trans "New password" %}</label>
+			</td>
+			<td>
+				<input type="password" name="new_password1" id="id_new_password1" />
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<label for="id_new_password2">{% trans "New password confirmation" %}</label>
+			</td>
+			<td>
+				<input type="password" name="new_password2" id="id_new_password2" />
+			</td>
+		</tr>
+		<tr><td></td><td><input type="submit" class="button" name="submit" value="{% trans "Password change" %}" /></td></tr>
 	</table>
-	<input type="submit" class="search_submit" /></form>
-	</div>
+	</form>
 {% else %}
 <p>{% trans "Your new password has been saved." %}</p>
 {% endif %}
--- a/src/ldt/ldt/user/views.py	Tue Aug 30 16:32:12 2011 +0200
+++ b/src/ldt/ldt/user/views.py	Tue Aug 30 16:57:03 2011 +0200
@@ -1,6 +1,7 @@
 from django.contrib.auth import authenticate, login, logout
 from django.contrib.auth.decorators import login_required
 from django.contrib.auth.forms import PasswordChangeForm
+from django.core.urlresolvers import reverse
 from django.http import HttpResponse, HttpResponseRedirect
 from django.shortcuts import render_to_response
 from django.template import RequestContext, loader
@@ -79,5 +80,5 @@
 
 @login_required   
 def change_language(request):
-    return render_to_response('ldt/user/change_language.html', context_instance=RequestContext(request))
+    return render_to_response('ldt/user/change_language.html', { 'url_change_language' : reverse('django.views.i18n.set_language')}, context_instance=RequestContext(request))
 
--- a/web/ldtplatform/locale/fr/LC_MESSAGES/django.po	Tue Aug 30 16:32:12 2011 +0200
+++ b/web/ldtplatform/locale/fr/LC_MESSAGES/django.po	Tue Aug 30 16:57:03 2011 +0200
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-28 13:09+0200\n"
+"POT-Creation-Date: 2011-08-30 12:21+0200\n"
 "PO-Revision-Date: 2010-02-17 02:57+0100\n"
 "Last-Translator: Yves-Marie Haussonne <ymh.work@gmail.com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,7 +16,7 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Language: \n"
 
-#: .\settings.py:39
+#: .\settings.py:40
 msgid "French"
 msgstr "Français"