Beispiel #1
0
    def renderRegisterForm(self, form):
        html = HtmlLayout(isLogged=False)

        formView = FormRenderer()
        formView.addButton('Create account')
        formView.setRenderPanel()

        content = (
            T.div(class_="row")[
                T.div(class_="col-sm-4")[
                    T.h2['Register form'],
                ],
                T.div(class_="col-sm-4 text-right")[
                    T.h2[T.a(href=self.getUrl('index'))['Back']]
                ]
            ],

            T.div(class_="row")[
                T.div(class_="col-sm-8")[
                    formView.render(form)
                ]
            ]
        )

        html.setContent(content)

        return html
Beispiel #2
0
    def renderLoginForm(self, form, count):

        formView = FormRenderer()
        formView.addButton('Login')
        formView.setRenderPanel()

        content = [
            T.div(class_="row")[
                T.div(class_="col-sm-4")[
                    T.h2['Login form '],
                ],
                T.div(class_="col-sm-4 text-right")[
                    T.h2[T.a(href=self.getUrl('register'))['Register account']]
                ]
            ],

            T.div(class_="row")[
                T.div(class_="col-sm-8")[
                    formView.render(form)
                ]
            ],

        ]

        layout = HtmlLayout(isLogged=False)
        layout.setContent(content)
        return layout