Browse Source

Put back the floors and roof fields

Jocelyn Delande 9 years ago
parent
commit
b8cac18e38

+ 4 - 0
wifiwithme/apps/contribmap/forms.py

@@ -40,6 +40,10 @@ class PublicContribForm(forms.ModelForm):
             'connect_local': forms.CheckboxInput,
             'connect_internet': forms.CheckboxInput,
             'comment': forms.Textarea({'rows': 3}),
+            'floor': forms.TextInput(
+                attrs={'placeholder': "Étage (0 pour RDC)"}),
+            'floor_total': forms.TextInput(
+                attrs={'placeholder': "Nb. d'étages du bâtiment"}),
         }
     # Widget rendering is managed by hand in template for orientions.
     orientations = forms.MultipleChoiceField(choices=ORIENTATIONS)

+ 16 - 1
wifiwithme/apps/contribmap/templates/contribmap/wifi-form.html

@@ -160,8 +160,23 @@ pourraient être intéressantes.
       {{label}}
     </label>
 {% endfor %}
+
     {{ form.orientations.errors }}
-    </label>
+
+    <div class="form-group">
+      <label for="roof">Je peux accéder à mon toit
+        {{ form.roof|formcontrol }}
+      {{ form.roof.errors }}
+      </label>
+    </div>
+    <div class="form-inline col-md-6">
+      <label for="floor">Mon étage</label>
+      {{ form.floor }}
+      {{ form.phone.errors }}
+      /
+      {{ form.floor_total }}
+      {{ form.floor_total.errors }}
+    </div>
 
     <h2>Remarque/commentaire</h2>
     {{ form.comment|formcontrol }}