class UserController(EasyCrudRestController):
model = model.User
__form_options__ = {
'__base_widget_args__': {'submit':None}
}
Correctly worked for me in a EasyCrudRestController, doing the same
directly on the form should work too.
While to change the submit button text you would do something like:
__form_options__ = {
'__base_widget_args__': {'submit':SubmitButton(value='HI')}
}
On Fri, Jan 4, 2013 at 6:26 PM, Stuart Zurcher <[email protected]>wrote:
> Mengu,
> Javascript works. However, I was hoping for something to use in the form
> setup. It seems that something is happening behind the scenes in TG 2.2
> that prevents some of the examples which apparently works for others in
> manipulating the button like:
>
> __base_widget_args__ = {'submit_text':'Submit'}
>>
>
> On another form I had to change the "Save" to "Submit" in the
> tw2.forms.widget.py
>
> Again, I would prefer changing it in the class initiation rather than in
> the mako template or backend files.
>
> Any suggestions are appreciated.
>
> On Friday, January 4, 2013 4:07:22 AM UTC-6, Mengu wrote:
>>
>> what about a little bit of javascript? $
>> ('input[type="submit"]').hide(**);
>>
>> On Jan 3, 10:10 pm, Stuart Zurcher <[email protected]> wrote:
>> > I have tried many different ways to remove the button on a form while
>> using
>> > sprox on TG2 with tw2:
>> >
>> > Class userInfo(diabledForm):
>> >
>> > __model__ = User
>> >
>> > # following methods tried
>> >
>> > button = None
>> >
>> > class __sprox__(object):
>> >
>> > button = None
>> >
>> > __base_widget_args__ ={'button':None}
>> >
>> >
>> >
>> > I have also varied the name of button to submitButton, submit, Button,
>> etc
>> > Any ideas?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/EbgHHn43jYUJ.
>
> 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/turbogears?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.