thank you On Mar 3, 10:48 am, "mr.freeze" <[email protected]> wrote: > There were a few issues so I sent you a patch to your patch to my > patch :) > Just a couple small bugs and added the same functionality to crud that > you did to auth. > > On Mar 3, 4:49 am, mdipierro <[email protected]> wrote: > > > I applied most of your patch, but I left the syntax > > > auth.settings.captcha = Recaptcha(...) > > auth.settings.captcha.label = .... > > auth.settings.captcha.comment = .... > > > Please check it. > > > On Mar 2, 11:22 pm, "mr.freeze" <[email protected]> wrote: > > > > On second thought, how would you get captcha into a crud form that is > > > built using request.args without crud.settings.[...]_captcha?: > > > > def data(): > > > return dict(form=crud()) > > > > Same goes for auth. > > > > My patch included a label for auth and cleaned up the captcha code > > > also. > > > > On Mar 2, 11:15 pm, "mr.freeze" <[email protected]> wrote: > > > > > Sounds good to me. I was just mirroring what auth does. Should we > > > > change auth too? > > > > auth.login(captcha=...) > > > > If so, it should probably be added to SQLFORM constructor too. > > > > > On Mar 2, 11:04 pm, mdipierro <[email protected]> wrote: > > > > > > please check trunk. I have implemented something closer to Yarko's > > > > > proposal: > > > > > > crud.settings.create_captcha= Recaptcha(request,"...","...") > > > > > crud.settings.create_captcha.label = 'Recaptcha' > > > > > crud.settings.create_captcha.comment = 'Try get it right!' > > > > > > do we really need create_captcha and update_captcha? Why not only one? > > > > > wouldn't it be better to pass the Recaptcha object to > > > > > crud.create(....) or crud.update(....)? This is not a setting that > > > > > should apply to all create and/or all update forms. > > > > > > On Mar 2, 10:09 pm, "mr.freeze" <[email protected]> wrote: > > > > > > > Patch submitted. > > > > > > > On Mar 2, 8:33 pm, mdipierro <[email protected]> wrote: > > > > > > > > I agree > > > > > > > capcha is a class so it should be possible to add structure to it. > > > > > > > > Massimo > > > > > > > > On Mar 2, 8:21 pm, Yarko Tymciurak <[email protected]> > > > > > > > wrote: > > > > > > > > > On Mar 2, 6:01 pm, "mr.freeze" <[email protected]> wrote: > > > > > > > > > > How about this?: > > > > > > > > > > crud.settings.captcha_label > > > > > > > > > auth.settings.captcha_label > > > > > > > > > I think mr.freeze has the right idea: _make_ it an "option" > > > > > > > > --- it's > > > > > > > > not like this is a convenience, rather a requirement: people > > > > > > > > do not > > > > > > > > need to "figure out" what code is saying! > > > > > > > > > crud.settings.captcha - is this is an element, then it > > > > > > > > _behooves_ it > > > > > > > > to have the same regularity as one expected when captcha was > > > > > > > > just used > > > > > > > > from tables with a widget), that is: > > > > > > > > > captcha should have structure: > > > > > > > > > captcha, captcha.label, etc. > > > > > > > > > I like this. > > > > > > > > > > On Mar 2, 5:24 pm, mdipierro <[email protected]> wrote: > > > > > > > > > > > This > > > > > > > > > > db.mytable.captcha.label = "This is what I want to put here" > > > > > > > > > > is not an option because captcha is not field of mytable. > > > > > > > > > This is "how it was" a few revisions back - also, this is how > > > > > > > > developers _already_ think for forms, so that following the > > > > > > > > _same > > > > > > > > idiom_ within the framework makes good sense, and will make a > > > > > > > > developer's life easier. > > > > > > > > > > > This is the best I can think of assuming we give the id to > > > > > > > > > > the captcha > > > > > > > > > > row: > > > > > > > > > > > form.element(_id='captcha__row')[2].append(LABEL('Recaptcha')) > > > > > > > > > I much prefer the direction mr.freeze sees... but add a little > > > > > > > > structure.... > > > > > > > > more readable, easier to remember ("like" other label things > > > > > > > > people > > > > > > > > already use, e.g. table fields) > > > > > > > > > - Yarko > > > > > > > > > > > On Mar 2, 4:58 pm, Yarko Tymciurak > > > > > > > > > > <[email protected]> > > > > > > > > > > wrote: > > > > > > > > > > > > On Mar 2, 4:51 pm, "mr.freeze" <[email protected]> > > > > > > > > > > > wrote: > > > > > > > > > > > > > Or you can do this: > > > > > > > > > > > > > crud.settings.create_captcha= > > > > > > > > > > > > DIV(Recaptcha(request,recaptcha_public,recaptcha_private),_id='captcha- > > > > > > > > > > > > wrapper') > > > > > > > > > > > > form = crud.create(db.things) > > > > > > > > > > > > form.element(_id='captcha- > > > > > > > > > > > > wrapper').parent.sibling('td').append(LABEL('Recaptcha')) > > > > > > > > > > > > return dict(form=form) > > > > > > > > > > > > ugh! > > > > > > > > > > > > db.mytable.captcha.label = "This is what I want to put > > > > > > > > > > > here" > > > > > > > > > > > > is definitely more concise, less obtuse, and more > > > > > > > > > > > readable. > > > > > > > > > > > > I trust Massimo will arrive at a more direct, clear (and > > > > > > > > > > > less > > > > > > > > > > > "clever", obtuse) solution. > > > > > > > > > > > > - Yarko > > > > > > > > > > > > > On Mar 2, 3:41 pm, Yarko Tymciurak > > > > > > > > > > > > <[email protected]> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > On Mar 2, 1:28 pm, mdipierro > > > > > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > > > > > > The auth.settings.update_captcha was introduced in > > > > > > > > > > > > > > 1.76.1 and we > > > > > > > > > > > > > > forgot to add an id for the newly added row, > > > > > > > > > > > > > > therefore it cannot be > > > > > > > > > > > > > > referenced by name, only by position form[0][-2]. > > > > > > > > > > > > > > This will be fixed. > > > > > > > > > > > > > > Great - thanks! :-) > > > > > > > > > > > > > > > On Mar 2, 12:22 pm, Yarko Tymciurak > > > > > > > > > > > > > > <[email protected]> > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > On Tue, Mar 2, 2010 at 11:04 AM, szimszon > > > > > > > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > > > > > > > Okay it works like a charm: > > > > > > > > > > > > > > > > > form[0][-2][2].append(SPAN('comment...')) > > > > > > > > > > > > > > > > This is terrible: unreadable - can't tell what > > > > > > > > > > > > > > > it is / does... > > > > > > > > > > > > > > > > You were better off doing this _before_ calling > > > > > > > > > > > > > > > crud.create(), when you > > > > > > > > > > > > > > > created your own captcha widget... > > > > > > > > > > > > > > > > Isn't there a better way? > > > > > > > > > > > > > > > > *sigh* > > > > > > > > > > > > > > > - Yarko > > > > > > > > > > > > > > > > > To sum up: > > > > > > > > > > > > > > > > > form[0] is the TABLE element to hold the form > > > > > > > > > > > > > > > > (type: class > > > > > > > > > > > > > > > > 'gluon.html.TABLE') > > > > > > > > > > > > > > > > form[0][x] is the table's ROW to hold one of > > > > > > > > > > > > > > > > the input fields (type: > > > > > > > > > > > > > > > > class 'gluon.html.TR <http://gluon.html.tr/>') > > > > > > > > > > > > > > > > form[0][x][y] is the table ROW's element to > > > > > > > > > > > > > > > > hold the 0-label, 1- > > > > > > > > > > > > > > > > input field, 2-col3 (type: class 'gluon.html.TD > > > > > > > > > > > > > > > > <http://gluon.html.td/>') > > > > > > > > > > > > > > > > > All Okay. Tnx. > > > > > > > > > > > > > > > > > On márc. 2, 17:13, "mr.freeze" > > > > > > > > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > > > > > > > > crud.settings.create_captcha= > > > > > > > > > > > > > > > > > Recaptcha(request,"...","...") > > > > > > > > > > > > > > > > > form = crud.create(db.table) > > > > > > > > > > > > > > > > > form[0][-2][0].append(LABEL("ReCaptcha:")) > > > > > > > > > > > > > > > > > > On Mar 2, 8:17 am, szimszon > > > > > > > > > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > > > > > > > > > > Okay, I have gone to lamer counter > > > > > > > > > > > > > > > > > > (http://dawn.royalcomp.hu/~raas/<http://dawn.royalcomp.hu/%7Eraas/> > > > > > > > > > > > > > > > > > > lc.html). > > > > > > > > > > > > > > > > > > > Tnx a lot! > > > > > > > > > > > > > > > > > > > But another question :) > > > > > > > > > > > > > > > > > > > What if I would have to add a col3 comment > > > > > > > > > > > > > > > > > > to a new > > > > > > > > > > > > > > > > > > crud.settings.create_captcha ? :) > > > > > > > > > > > > > > > > > > > On márc. 2, 15:08, mdipierro > > > > > > > > > > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > > > > > > > > > > > Field(....,comment='some text') > > > > > > > > > > > > > > > > > > > > or > > > > > > > > > > > > > > > > > > > > Field(....,comment=SPAN('try ',A('click > > > > > > > > > > > > > > > > > > > here'))) > > > > > > > > > > > > > > > > > > > > On Mar 2, 7:47 am, szimszon > > > > > > > > > > > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > > > > > > > > > > > > Hello! > > > > > > > > > > > > > > > > > > > > > I know it's a beginner question but I > > > > > > > > > > > > > > > > > > > > can't google any answer to my > > > > > > > > > > > > > > > > > > > > question :( > > > > > > > > > > > > > > > > > > > > > I wonder if someone could help me. How > > > > > > > > > > > > > > > > > > > > can I add some text in crud > > > > > > > > > > > > > > > > > > > > form's col3? > > > > > > > > > > > > > > > > > > > > > Thank you! > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > You received this message because you are > > > > > > > > > > > > > > > > subscribed to the Google Groups > > > > > > > > > > > > > > > > "web2py-users" group. > > > > > > > > > > > > > > > > To post to this group, send email to > > > > > > > > > > > > > > > > [email protected]. > > > > > > > > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > > > > > > > > [email protected]<web2py%[email protected]> > > > > > > > > > > > > > > > > . > > > > > > > > > > > > > > > > For more options, visit this group at > > > > > > > > > > > > > > > >http://groups.google.com/group/web2py?hl=en.
-- You received this message because you are subscribed to the Google Groups "web2py-users" 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.

