diff --git a/protocoloadm/urls.py b/protocoloadm/urls.py index ebc09f795..8f64fefd2 100644 --- a/protocoloadm/urls.py +++ b/protocoloadm/urls.py @@ -1,5 +1,7 @@ from django.conf.urls import include, url -from protocoloadm.views import (ProtocoloPesquisaView, anular_protocolo_crud, +from protocoloadm.views import (ProtocoloPesquisaView, + #anular_protocolo_crud, + AnularProtocoloAdmView, documento_acessorio_administrativo_crud, documento_administrativo_crud, protocolo_documento_crud, @@ -21,8 +23,11 @@ urlpatterns = [ url(r'^protocoloadm/protocolo-doc/', include(protocolo_documento_crud.urls)), url(r'^protocoloadm/protocolo-mat/', include(protocolo_materia_crud.urls)), - url(r'^protocoloadm/anular-protocolo/', - include(anular_protocolo_crud.urls)), url(r'^protocoloadm/protocolo$', ProtocoloPesquisaView.as_view(), name='protocolo'), + + # url(r'^protocoloadm/anular-protocolo/', + # include(anular_protocolo_crud.urls), name='anular_protocolo'), + url(r'^protocoladm/anular-protocolo', AnularProtocoloAdmView.as_view(), name='anular_protocolo'), + ] diff --git a/protocoloadm/views.py b/protocoloadm/views.py index e5dfda2d6..dd5293bb3 100644 --- a/protocoloadm/views.py +++ b/protocoloadm/views.py @@ -3,9 +3,20 @@ from datetime import datetime from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ + from django.views.generic import ListView, TemplateView + +from django.views.generic import ListView +from django.views.generic import View +from django.views.generic.base import TemplateView +from django.views.generic.edit import UpdateView + from django.views.generic.edit import FormMixin +from django.core.exceptions import ObjectDoesNotExist + +from django.utils.html import strip_tags + from materia.models import TipoMateriaLegislativa from sapl.crud import build_crud @@ -85,13 +96,13 @@ protocolo_materia_crud = build_crud( [('observacao', 12)]], ]) -anular_protocolo_crud = build_crud( - Protocolo, '', [ +# anular_protocolo_crud = build_crud( +# Protocolo, '', [ - [_('Indentificação do Protocolo'), - [('numero', 6), ('ano', 6)], - [('justificativa_anulacao', 12)]], - ]) +# [_('Indentificação do Protocolo'), +# [('numero', 6), ('ano', 6)], +# [('justificativa_anulacao', 12)]], +# ]) class ProtocoloForm(forms.Form): @@ -107,7 +118,7 @@ class ProtocoloForm(forms.Form): interessado = forms.CharField(label='Interessado', required=False) tipo_materia = forms.CharField(label='Tipo de Matéria', required=False) autor = forms.CharField(label='Autor', required=False) - assunto = forms.CharField(label='Assunto {{ errors }}

+ {% endfor %} + {% endfor %} +{% endif %} + +
+ {% csrf_token %} +
+ Número / Ano + / + + +
+ Motivo da Anulação + +
+ +
+
+{% endblock detail_content %} \ No newline at end of file diff --git a/templates/protocoloadm/protocoloadm_detail.html b/templates/protocoloadm/protocoloadm_detail.html index f49c51727..46af820e6 100644 --- a/templates/protocoloadm/protocoloadm_detail.html +++ b/templates/protocoloadm/protocoloadm_detail.html @@ -6,6 +6,6 @@
{% trans 'Inicio' %}
{% trans 'Protocolar Documento' %}
{% trans 'Protocolar Matéria' %}
-
{% trans 'Anular Protocolo' %}
+
{% trans 'Anular Protocolo' %}
{% endblock sections_nav %}