Skip to content

Commit 65ea4ff

Browse files
committed
Reorder html entities generated by submit button
issue2551065: This allows styles to be applied. Thanks to Garth Jensen for the patch against release 1.6
1 parent 88c1a79 commit 65ea4ff

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ Features:
9999
endpoints. (John Rouillard)
100100
- issue2551062: roundup-admin security now validates all properties in
101101
permissions. It reports invalid properties. (John Rouillard)
102+
- issue2551065: Reorder html entities generated by submit button so that
103+
styles can be applied. Thanks to Garth Jensen for the patch against
104+
release 1.6 that was ported to upcoming 2.0 release (Ralf
105+
Schlatterbeck).
102106

103107
Fixed:
104108

doc/acknowledgements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ ideas and everything else that helped!
1010

1111
.. _`Announcement with changelog for current release.`: announcement.html
1212

13+
2.X
14+
---
15+
16+
Garth Jensen
1317

1418
1.6
1519
---

roundup/cgi/templating.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -776,12 +776,14 @@ def submit(self, label=''"Submit New Entry", action="new"):
776776
if not self.is_edit_ok():
777777
return ''
778778

779-
return self.input(type="hidden", name="@csrf",
780-
value=anti_csrf_nonce(self._client)) + \
779+
return \
780+
self.input(type="submit", name="submit_button",
781+
value=self._(label)) + \
781782
'\n' + \
782-
self.input(type="hidden", name="@action", value=action) + \
783+
self.input(type="hidden", name="@csrf",
784+
value=anti_csrf_nonce(self._client)) + \
783785
'\n' + \
784-
self.input(type="submit", name="submit_button", value=self._(label))
786+
self.input(type="hidden", name="@action", value=action)
785787

786788
def history(self):
787789
if not self.is_view_ok():
@@ -916,16 +918,17 @@ def submit(self, label=''"Submit Changes", action="edit"):
916918
917919
Also sneak in the lastactivity and action hidden elements.
918920
"""
919-
return self.input(type="hidden", name="@lastactivity",
920-
value=self.activity.local(0)) + \
921+
return \
922+
self.input(type="submit", name="submit_button",
923+
value=self._(label)) + \
924+
'\n' + \
925+
self.input(type="hidden", name="@lastactivity",
926+
value=self.activity.local(0)) + \
921927
'\n' + \
922928
self.input(type="hidden", name="@csrf",
923929
value=anti_csrf_nonce(self._client)) + \
924930
'\n' + \
925-
self.input(type="hidden", name="@action", value=action) + \
926-
'\n' + \
927-
self.input(type="submit", name="submit_button",
928-
value=self._(label))
931+
self.input(type="hidden", name="@action", value=action)
929932

930933
def journal(self, direction='descending'):
931934
""" Return a list of HTMLJournalEntry instances.

0 commit comments

Comments
 (0)