diff --git a/materia/views.py b/materia/views.py index 4ed1beb0b..9dc0d6dab 100644 --- a/materia/views.py +++ b/materia/views.py @@ -299,7 +299,32 @@ class FormularioSimplificadoForm(forms.Form): widget=forms.TextInput( attrs={'disabled': 'True'})) - # form.fields['otherFields'].widget.attrs['enabled'] = True + def __init__(self, *args, **kwargs): + self.helper = FormHelper() + self.helper.layout = Layout( + Fieldset( + 'Formulário Simplificado', + Fieldset( + 'Identificação Básica', + 'tipo_materia', + 'numero_materia', + 'ano_materia', + 'data_materia', + 'numero_protocolo', + 'regime_tramitacao', + 'em_tramitacao', + 'ementa', + 'texto_original', + 'arquivo', + 'proposicao' + ), + ButtonHolder( + Submit('submit', 'Salvar', + css_class='button primary') + ) + ) + ) + super(FormularioSimplificadoForm, self).__init__(*args, **kwargs) class FormularioCadastroForm(ModelForm): diff --git a/templates/crud/list.html b/templates/crud/list.html index 46ca1e643..97a1aa34b 100644 --- a/templates/crud/list.html +++ b/templates/crud/list.html @@ -8,6 +8,10 @@
{% blocktrans with verbose_name=view.verbose_name %} Adicionar {{ verbose_name }} {% endblocktrans %}
+ + {% block more_buttons %} + {% endblock more_buttons %} + {% if not rows %} diff --git a/templates/materia/formulario_simplificado.html b/templates/materia/formulario_simplificado.html index 7cd133c49..2dd659486 100644 --- a/templates/materia/formulario_simplificado.html +++ b/templates/materia/formulario_simplificado.html @@ -7,6 +7,5 @@ {% csrf_token %} {% crispy form %}
- {% endblock %} \ No newline at end of file diff --git a/templates/materia/materialegislativa_list.html b/templates/materia/materialegislativa_list.html new file mode 100644 index 000000000..2c67afaa0 --- /dev/null +++ b/templates/materia/materialegislativa_list.html @@ -0,0 +1,8 @@ +{% extends "crud/list.html" %} +{% load i18n %} + +{% block more_buttons %} +
+ {% blocktrans with verbose_name=view.verbose_name %} Formulário Simplificado {% endblocktrans %} +
+{% endblock more_buttons %}