[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-31 Thread mr.freeze
I think a better question is why would you not want it in sqlhtml ;)

On Jan 30, 12:58 am, mdipierro mdipie...@cs.depaul.edu wrote:
 Why do you want to put this in sqlhtml?

 In you controller you can do:

 form.custom.label['deletable'] = 'delete_label'

 On Jan 30, 12:53 am, weheh richard_gor...@verizon.net wrote:

  Yes, I see that. But URGH, do I really want to start leaving
  footprints in gluon? What happens when there's a new release. Do they
  get wiped out and then I have to do it over again? Seems like the
  deletable field label should be a permanent fixture, no?



-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-30 Thread mr.freeze
Because it seems like it should be in form.custom.label by default
like the rest of the labels that are present in the form. Shouldn't
form.custom let you get at every part of the form?

On Jan 30, 12:58 am, mdipierro mdipie...@cs.depaul.edu wrote:
 Why do you want to put this in sqlhtml?

 In you controller you can do:

 form.custom.label['deletable'] = 'delete_label'

 On Jan 30, 12:53 am, weheh richard_gor...@verizon.net wrote:

  Yes, I see that. But URGH, do I really want to start leaving
  footprints in gluon? What happens when there's a new release. Do they
  get wiped out and then I have to do it over again? Seems like the
  deletable field label should be a permanent fixture, no?



-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-30 Thread mr.freeze
I meant as a patch.

On Jan 30, 12:53 am, weheh richard_gor...@verizon.net wrote:
 Yes, I see that. But URGH, do I really want to start leaving
 footprints in gluon? What happens when there's a new release. Do they
 get wiped out and then I have to do it over again? Seems like the
 deletable field label should be a permanent fixture, no?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-30 Thread weheh
I think form.custom.label['deletable'] should be built in. It is
different from other labels in that during a create, it's hidden,
whereas during an update, it shows. This should be consistent with the
form.custom.deletable boolean field. What do you think Massimo?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [SOLVED]

2010-01-30 Thread weheh
I think form.custom.label['deletable'] should be built in. It is
different from other labels in that during a create, it's hidden,
whereas during an update, it shows. This should be consistent with
the
form.custom.deletable boolean field. What do you think Massimo?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox

2010-01-29 Thread mdipierro
I think

{{=form.custom.deletable}}

On Jan 29, 4:07 pm, weheh richard_gor...@verizon.net wrote:
 How to get the delete_record field to show on a custom form?

 I tried variants of form.custom.label['delete_record'] and
 form.custom.widget.delete_record in the case where controller has
 crud.update(...,deletable=True)

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
It works. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
Massimo, does it have a label?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread mdipierro
form = SQLFORM(,delete_label='')

or (works for crud too)

form.element(_for=form.FIELDKEY_DELETE_RECORD)[0]='delete label'


On Jan 29, 10:42 pm, weheh richard_gor...@verizon.net wrote:
 Massimo, does it have a label?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
I'm not sure I understood what you wrote, sorry. My question, really,
is what is the name of the key used to access the delete label in
form.custom.label[''] ='delete_label' doesn't work. 
='deletable' doesn't work, either.

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread mr.freeze
I don't think it's in there. You would need to add this at line 676 of
sqlhtml.py:
self.custom.label['deletable'] = delete_label

On Jan 29, 11:58 pm, weheh richard_gor...@verizon.net wrote:
 I'm not sure I understood what you wrote, sorry. My question, really,
 is what is the name of the key used to access the delete label in
 form.custom.label[''] ='delete_label' doesn't work. 
 ='deletable' doesn't work, either.

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
Yes, I see that. But URGH, do I really want to start leaving
footprints in gluon? What happens when there's a new release. Do they
get wiped out and then I have to do it over again? Seems like the
deletable field label should be a permanent fixture, no?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread mdipierro
Why do you want to put this in sqlhtml?

In you controller you can do:

form.custom.label['deletable'] = 'delete_label'

On Jan 30, 12:53 am, weheh richard_gor...@verizon.net wrote:
 Yes, I see that. But URGH, do I really want to start leaving
 footprints in gluon? What happens when there's a new release. Do they
 get wiped out and then I have to do it over again? Seems like the
 deletable field label should be a permanent fixture, no?

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.