allow to pass hidden to crud.update

This commit is contained in:
mdipierro
2012-10-31 09:14:58 -05:00
parent c404db4a08
commit f62c8f6489
2 changed files with 5 additions and 3 deletions

View File

@@ -1 +1 @@
Version 2.2.1 (2012-10-30 11:09:19) stable
Version 2.2.1 (2012-10-31 09:14:53) stable

View File

@@ -3464,10 +3464,12 @@ class Crud(object):
deletable = self.settings.update_deletable
if message is DEFAULT:
message = self.messages.record_updated
if not 'hidden' in attributes:
attributes['hidden'] = {}
attributes['hidden']['_next'] = next
form = SQLFORM(
table,
record,
hidden=dict(_next=next),
showid=self.settings.showid,
submit_button=self.messages.submit_button,
delete_label=self.messages.delete_label,
@@ -3475,7 +3477,7 @@ class Crud(object):
upload=self.settings.download_url,
formstyle=self.settings.formstyle,
separator=self.settings.label_separator,
**attributes
**attributes # contains hidden
)
self.accepted = False
self.deleted = False