Browse Source

Test layout in FormHelper

pull/11/merge
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
c8ee63dc6e
  1. 35
      materia/views.py

35
materia/views.py

@ -1,7 +1,7 @@
from datetime import date from datetime import date
from crispy_forms.helper import FormHelper from crispy_forms.helper import FormHelper
from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit, HTML
from django import forms from django import forms
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
@ -1262,16 +1262,47 @@ class TramitacaoForm(ModelForm):
self.helper = FormHelper() self.helper = FormHelper()
self.helper.layout = Layout( self.helper.layout = Layout(
Fieldset('Incluir Tramitação', Fieldset('Incluir Tramitação',
HTML("<ul class='small-block-grid-2 medium-block-grid-2 large-block-grid-2'>"),
HTML("<li>"),
'data_tramitacao', 'data_tramitacao',
HTML("</li>"),
HTML("<li>"),
'unidade_tramitacao_local', 'unidade_tramitacao_local',
HTML("</li>"),
HTML("</ul>"),
HTML("<ul class='small-block-grid-3 medium-block-grid-3 large-block-grid-3'>"),
HTML("<li>"),
'status', 'status',
HTML("</li>"),
HTML("<li>"),
'turno', 'turno',
HTML("</li>"),
HTML("<li>"),
'urgente', 'urgente',
HTML("</li>"),
HTML("</ul>"),
HTML("<ul class='small-block-grid-1 medium-block-grid-1 large-block-grid-1'>"),
HTML("<li>"),
'unidade_tramitacao_destino', 'unidade_tramitacao_destino',
HTML("</li>"),
HTML("</ul>"),
HTML("<ul class='small-block-grid-3 medium-block-grid-3 large-block-grid-3'>"),
HTML("<li>"),
'data_encaminhamento', 'data_encaminhamento',
HTML("</li>"),
HTML("<li>"),
'data_fim_prazo', 'data_fim_prazo',
HTML("</li>"),
HTML("<li>"),
'ultima', 'ultima',
'texto'), HTML("</li>"),
HTML("</ul>"),
HTML("<ul class='small-block-grid-1 medium-block-grid-1 large-block-grid-1'>"),
HTML("<li>"),
'texto',
HTML("</li>"),
HTML("</ul>"),
),
ButtonHolder( ButtonHolder(
Submit('submit', 'Salvar', Submit('submit', 'Salvar',
css_class='button primary') css_class='button primary')

Loading…
Cancel
Save