]> git.parisson.com Git - teleforma.git/commitdiff
fix form
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 3 Feb 2016 18:34:34 +0000 (19:34 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 3 Feb 2016 18:34:34 +0000 (19:34 +0100)
teleforma/forms.py
teleforma/models/crfpa.py
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/registration/registration_form.html

index 511330db4ecb64b56d00707ea7915d567a5e3e11..66a253dd8fb986ab5afbd80efba62c3bf66adced 100644 (file)
@@ -8,13 +8,13 @@ from captcha.fields import CaptchaField
 
 
 class ConferenceForm(ModelForm):
+
     class Meta:
         model = Conference
 
 
 class UserForm(ModelForm):
-    # first_name = forms.CharField(_('First name'), required=True)
-    # last_name = forms.CharField(_('Last name'), required=True)
+
     captcha = CaptchaField()
 
     class Meta:
@@ -35,14 +35,6 @@ RegistrationForm.base_fields.update(ProfileForm.base_fields)
 
 class StudentForm(ModelForm):
 
-    def has_changed(self):
-        """
-        Overriding this, as the initial data passed to the form does not get noticed,
-        and so does not get saved, unless it actually changes
-        """
-        changed_data = super(ModelForm, self).has_changed()
-        return bool(self.initial or changed_data)
-
     class Meta:
         model = Student
         exclude = ['user', 'trainings', 'options']
index cee3f2dca5e200c416a1e134287b96c2adaaf140..eb436cb8936c54eef1064ef4854340dc7d9f741b 100644 (file)
@@ -131,7 +131,7 @@ class Student(Model):
                                         blank=True, null=True)
     period          = models.ForeignKey('Period', related_name='student', verbose_name=_('period'),
                                  blank=True, null=True, on_delete=models.SET_NULL)
-    platform_only   = models.BooleanField(_('platform only'), help_text="")
+    platform_only   = models.BooleanField(_('e-learning platform only'))
     application_fees = models.BooleanField(_('application fees'), blank=True)
     default_application_fees = 40
     subscription_fees = models.FloatField(_('subscription fees'), help_text='€', blank=True, null=True)
index d34c1283933360dcd793192807d1edecacea5807..77746eb99c09fdf7a5c39b6e192c7f0d98d95459 100644 (file)
@@ -1718,7 +1718,7 @@ input,textarea{
 }
 
 .register {
-    width: 40%;
+    width: 80%;
     font-size: 1.1em;
     margin-top: 1em;
     margin-bottom: 4em;
@@ -1733,4 +1733,3 @@ input,textarea{
 .register-error {
     color: #BB0000;
 }
-
index 78ef71ffc3353af4c1563ffb809dcaff73e04571..93322ca926f0267c5d393358913fe0ca956cd72c 100644 (file)
     <form class="register" id="_registerForm" method="post" action="" enctype="multipart/form-data" data-ajax="false">{% csrf_token %}
     <table>
         {{ form }}
+        <hr>
         {% for formset in inlines %}
           {{ formset.management_form }}
           {% for form in formset %}
+           <hr>
            {{form }}
           {% endfor %}
         {% endfor %}
@@ -22,5 +24,3 @@
     </form>
 </center>
 {% endblock %}
-
-