|
@ -26,16 +26,13 @@ import sapl |
|
|
from sapl.base.models import Autor |
|
|
from sapl.base.models import Autor |
|
|
from sapl.comissoes.models import Comissao |
|
|
from sapl.comissoes.models import Comissao |
|
|
from sapl.compilacao.models import (STATUS_TA_IMMUTABLE_PUBLIC, |
|
|
from sapl.compilacao.models import (STATUS_TA_IMMUTABLE_PUBLIC, |
|
|
STATUS_TA_PRIVATE, STATUS_TA_PUBLIC, |
|
|
STATUS_TA_PRIVATE) |
|
|
PerfilEstruturalTextoArticulado, |
|
|
|
|
|
TextoArticulado) |
|
|
|
|
|
from sapl.crispy_layout_mixin import (SaplFormLayout, form_actions, to_column, |
|
|
from sapl.crispy_layout_mixin import (SaplFormLayout, form_actions, to_column, |
|
|
to_row) |
|
|
to_row) |
|
|
from sapl.materia.models import (MateriaLegislativa, RegimeTramitacao, |
|
|
from sapl.materia.models import (MateriaLegislativa, RegimeTramitacao, |
|
|
TipoDocumento, TipoProposicao) |
|
|
TipoDocumento, TipoProposicao) |
|
|
from sapl.norma.models import (LegislacaoCitada, NormaJuridica, |
|
|
from sapl.norma.models import (LegislacaoCitada, NormaJuridica, |
|
|
TipoNormaJuridica) |
|
|
TipoNormaJuridica) |
|
|
from sapl.parlamentares.models import Parlamentar |
|
|
|
|
|
from sapl.protocoloadm.models import Protocolo |
|
|
from sapl.protocoloadm.models import Protocolo |
|
|
from sapl.settings import MAX_DOC_UPLOAD_SIZE |
|
|
from sapl.settings import MAX_DOC_UPLOAD_SIZE |
|
|
from sapl.utils import (RANGE_ANOS, YES_NO_CHOICES, |
|
|
from sapl.utils import (RANGE_ANOS, YES_NO_CHOICES, |
|
@ -780,7 +777,8 @@ class TipoProposicaoForm(ModelForm): |
|
|
|
|
|
|
|
|
tipo_select = Fieldset(TipoProposicao._meta.verbose_name, |
|
|
tipo_select = Fieldset(TipoProposicao._meta.verbose_name, |
|
|
Div(to_column(('descricao', 5)), |
|
|
Div(to_column(('descricao', 5)), |
|
|
to_column(('content_type', 7)), css_class='clearfix'), |
|
|
to_column(('content_type', 7)), |
|
|
|
|
|
css_class='clearfix'), |
|
|
to_column(('tipo_conteudo_related_radio', 6)), |
|
|
to_column(('tipo_conteudo_related_radio', 6)), |
|
|
|
|
|
|
|
|
to_column(('perfis', 6))) |
|
|
to_column(('perfis', 6))) |
|
@ -847,11 +845,12 @@ class TipoProposicaoSelect(Select): |
|
|
selected_choices.remove(option_value) |
|
|
selected_choices.remove(option_value) |
|
|
else: |
|
|
else: |
|
|
selected_html = '' |
|
|
selected_html = '' |
|
|
return format_html('<option value="{}"{} data-has-perfil={}>{}</option>', |
|
|
return format_html( |
|
|
option_value, |
|
|
'<option value="{}"{} data-has-perfil={}>{}</option>', |
|
|
selected_html, |
|
|
option_value, |
|
|
str(data_has_perfil), |
|
|
selected_html, |
|
|
force_text(option_label)) |
|
|
str(data_has_perfil), |
|
|
|
|
|
force_text(option_label)) |
|
|
|
|
|
|
|
|
def render_options(self, choices, selected_choices): |
|
|
def render_options(self, choices, selected_choices): |
|
|
# Normalize to strings. |
|
|
# Normalize to strings. |
|
|