From 9128a91e88f41ca61f763643a3bb7342e2f60938 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Thu, 7 Jan 2016 13:49:21 -0200 Subject: [PATCH] Refactor FormularioSimplificadoForm Fix #85 --- materia/views.py | 66 ++++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 47 deletions(-) diff --git a/materia/views.py b/materia/views.py index a8a59dbc7..61314e42d 100644 --- a/materia/views.py +++ b/materia/views.py @@ -267,59 +267,31 @@ class FormularioSimplificadoForm(ModelForm): 'texto_original'] def __init__(self, *args, **kwargs): + + row1 = sapl.layout.to_row( + [('tipo', 4), + ('numero', 4), + ('ano', 4)]) + + row2 = sapl.layout.to_row( + [('data_apresentacao', 4), + ('numero_protocolo', 4), + ('regime_tramitacao', 4)]) + + row3 = sapl.layout.to_row( + [('texto_original', 9), + ('em_tramitacao', 3)]) + + row4 = sapl.layout.to_row( + [('ementa', 12)]) + self.helper = FormHelper() self.helper.layout = Layout( Fieldset( 'Formulário Simplificado', Fieldset( 'Identificação Básica', - HTML( - ""), - HTML( - ""), - HTML( - ""), - HTML( - ""), - HTML( - ""), + row1, row2, row3, row4 ), ButtonHolder( Submit('submit', 'Salvar',