Skip to content

Commit

Permalink
fix: change a balise to button balise on create or update button
Browse files Browse the repository at this point in the history
  • Loading branch information
juggler31 committed Jul 29, 2024
1 parent e7ddc35 commit a568f68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CHANGELOG
8.9.2+dev (XXXX-XX-XX)
-----------------------

**Bug fixes**

- Add contraint to click only once on create buttons


8.9.2 (2024-07-15)
Expand Down
7 changes: 4 additions & 3 deletions mapentity/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,12 @@ def populate_fields(self):
class SubmitButton(HTML):

def __init__(self, div_id, label):
# onclik is here to bypass html5 validation
content = ("""
<a id="{0}" class="btn btn-success"
onclick="javascript:$(this).parents('form').submit();">
<button type="submit" id="{0}" class="btn btn-success"
onclick="this.form.submit();">
<i class="bi bi-check-circle-fill"></i> {1}
</a>""".format(div_id, label))
</button>""".format(div_id, label))
super().__init__(content)


Expand Down

0 comments on commit a568f68

Please sign in to comment.