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"), )
def valid_layout(self): file = self.cleaned_data["file"] self.helper.layout = Layout( HTML.h2("You uploaded..."), HTML.p("File: %s" % file), HTML('<a class="govuk-button" href="%s">Continue</a>' % reverse("components:name", kwargs={"name": "file-upload"})), )
def valid_layout(self): self.fields["method"].widget = MultipleHiddenInput() self.helper.layout = Layout( "method", HTML.h2("You answered..."), HTML.table(None, [("Methods selected:", self.get_method())]), Button("continue", "Continue"), )
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"), )
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"), )
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"), )
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"), )