From ad235ff50085fe4c710f8e7f3729c2e46fd5c6f6 Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Fri, 17 Jun 2022 17:44:44 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20libera=20bot=C3=B5es=20duplo=20cliqu?= =?UTF-8?q?e=20em=20bot=C3=B5es=20'Pesquisar'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/crispy_layout_mixin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 8c9763eef..ea92ce09f 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -6,6 +6,7 @@ from crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit from django import template from django.urls import reverse, reverse_lazy from django.utils import formats +from django.utils.encoding import force_text from django.utils.translation import ugettext as _ import yaml @@ -38,7 +39,7 @@ def form_actions(more=[Div(css_class='clearfix')], label=_('Salvar'), name='salvar', css_class='float-right', disabled=True): - if disabled: + if disabled and force_text(label) != 'Pesquisar': doubleclick = 'this.form.submit();this.disabled=true;' else: doubleclick = 'return true;'