diff --git a/parlamentares/views.py b/parlamentares/views.py index 28e8d677b..bb5fd9caf 100644 --- a/parlamentares/views.py +++ b/parlamentares/views.py @@ -458,7 +458,7 @@ class ParlamentaresEditarView(FormMixin, GenericView): form = ParlamentaresEditForm(request.POST, instance=parlamentar) if form.is_valid(): - if 'save' in request.POST: + if 'salvar' in request.POST: parlamentar = form.save(commit=False) if 'fotografia' in request.FILES: parlamentar.fotografia = request.FILES['fotografia'] @@ -604,7 +604,7 @@ class ParlamentaresDependentesEditView(FormMixin, GenericView): parlamentar = Parlamentar.objects.get(id=kwargs['pk']) if form.is_valid(): - if 'Salvar' in request.POST: + if 'salvar' in request.POST: dependente.save() elif 'Excluir' in request.POST: dependente.delete() @@ -991,7 +991,7 @@ class FiliacaoEditView(FormMixin, GenericView): mensagem, request) - if 'Salvar' in request.POST: + if 'salvar' in request.POST: filiacao.save() elif 'Excluir' in request.POST: filiacao.delete() @@ -1122,7 +1122,7 @@ class MandatoEditView(FormMixin, GenericView): parlamentar = Parlamentar.objects.get(id=kwargs['pk']) if form.is_valid(): - if 'Salvar' in request.POST: + if 'salvar' in request.POST: mandato.save() elif 'Excluir' in request.POST: mandato.delete() diff --git a/sapl/layout.py b/sapl/layout.py index ba9b43544..a779b20e5 100644 --- a/sapl/layout.py +++ b/sapl/layout.py @@ -23,7 +23,7 @@ def to_fieldsets(fields): def form_actions(more=[], save_label=_('Salvar')): - return FormActions(Submit('save', save_label), *more) + return FormActions(Submit('salvar', save_label), *more) class SaplFormLayout(Layout):