These functions in a controller:
@auth.requires_membership('tier1_manager')
def crud_nfa():
response.functionname='Manage nfa-gegevens'
db.nfa.bedrijf.writable=False
db.nfa.bedrijf.default=auth.user.bedrijf
form=create_form(db.nfa)
records=db((db.nfa.bedrijf==auth.user.bedrijf)&
(db.nfa.nfatype==db.nfatype.id))\
.select(db.nfa.ALL,db.nfatype.naam,orderby=db.nfa.nfatype)
return dict(form=form,records=records)
@auth.requires_membership('tier1_manager')
def update_nfa():
response.view='tier1/update.html'
db.nfa.bedrijf.writable=False
record=db.nfa[request.args[0]]
if not record or not record.bedrijf==auth.user.bedrijf:
redirect(URL(r=request,f='crud_nfa'))
form=update_form(db.nfa,record,'crud_nfa')
return dict(form=form)
... and this function in the model:
def update_form(table,rec,nxt):
form=crud.update(table,rec,next=(URL(r=request,f=nxt)))
form[0][-1][1].append(INPUT
(_type='button',_value='Cancel',_onclick='javascript:history.go(-1)'))
return form
... worked in web2py 1.64, in 1.65 they no longer do. When I check the
check to delete box and click submit the record isn't being deleted
and the function doesn't return to the previous page.
What changed between those versions? How do I get this to work again?
Kind regards,
Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---