Esempio n. 1
0
 def valid_layout(self):
     value = self.cleaned_data["date"]
     self.helper.layout = Layout(
         Hidden("date_0", value.day),
         Hidden("date_1", value.month),
         Hidden("date_2", value.year),
         HTML.h2("You answered..."),
         HTML.table(None, [("Date:", value.strftime("%e %B %Y"))]),
         Button("continue", "Continue"),
     )
Esempio n. 2
0
 def valid_layout(self):
     name = self.cleaned_data["name"]
     email = self.cleaned_data["email"]
     phone = self.cleaned_data["phone"]
     self.helper.layout = Layout(
         Hidden("name", name),
         Hidden("email", email),
         Hidden("phone", phone),
         HTML.h2("You answered..."),
         HTML.table(None, [("Name:", name), ("Email:", email),
                           ("Phone:", phone)]),
         Button("continue", "Continue"),
     )
Esempio n. 3
0
 def valid_layout(self):
     name = self.cleaned_data["name"]
     method = self.cleaned_data["method"]
     self.helper.layout = Layout(
         Hidden("name", name),
         Hidden("method", method),
         HTML.h2("You answered..."),
         HTML.table(
             None,
             [
                 ("Name changed:", self.get_choice("name")),
                 ("Contact method:", self.get_choice("method")),
             ],
         ),
         Button("continue", "Continue"),
     )
Esempio n. 4
0
 def valid_layout(self):
     value = self.cleaned_data["description"]
     self.helper.layout = Layout(
         Hidden("description", value),
         HTML.h2("You answered..."),
         HTML.p(value),
         Button("continue", "Continue"),
     )
Esempio n. 5
0
 def valid_layout(self):
     value = self.cleaned_data["sort_by"]
     self.helper.layout = Layout(
         Hidden("sort_by", value),
         HTML.h2("You answered..."),
         HTML.table(None, [("Sort by:", self.get_choice("sort_by"))]),
         Button("continue", "Continue"),
     )