developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#696 closed enhancement (fixed)

add a config option to specify default form builder

Reported by: bibo Owned by: bibo
Priority: normal Milestone: jelix 1.1
Component: jelix:forms Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

If one has its own form builder and wants to specify it once in his app, this new config option will do the trick :

[tplplugins] defaultJformsBuilder = myformbuilder

in jelix core, this one is set to : defaultJformsBuilder = html

Note: I didn't update @contributor lines in my patch nor credits, but will do of course, if the patch is given r+.

Attachments (1)

trunk-defaultformbuilder-#696.patch (8.2 KB) - added by bibo 12 years ago.

Download all attachments as: .zip

Change History (11)

Changed 12 years ago by bibo

comment:1 Changed 12 years ago by bibo

Patch attached does:

  • implement defaultJformsBuilder
  • trim arguments in form templates
  • s/errDecorator/errorDecorator in comments
  • suppress various spaces at EOL

comment:2 Changed 12 years ago by bibo

  • review set to review?
  • Status changed from new to assigned

comment:3 Changed 12 years ago by laurentj

  • Milestone set to Jelix 1.1 beta 2

comment:4 Changed 12 years ago by bibo

IMHO, this approach is not completely useful as you still have to give an argument in templates formfull or form if you redefine your own errorDecorator or helpDecorator.

Here, 2 solutions :

  • fuse the builder arguments with its options in an array => not really making sense.
  • go further in configuration by creating keys for default (error|help) decorator.

comment:5 follow-up: Changed 12 years ago by laurentj

for arguments : create your own builder which inherits from an other one, and which configure the builder as you want. Then you can put your builder name in the configuration.

comment:6 in reply to: ↑ 5 Changed 12 years ago by bibo

Replying to laurentj:

for arguments : create your own builder which inherits from an other one, and which configure the builder as you want. Then you can put your builder name in the configuration.

right. So i'll leave this patch as is.

comment:7 Changed 12 years ago by Julien

this patch seems good to me

comment:8 Changed 12 years ago by laurentj

  • Documentation needed set
  • review changed from review? to review+

ok

comment:9 Changed 12 years ago by bibo

  • Documentation needed unset
  • Resolution set to fixed
  • Status changed from assigned to closed

doc updated.

comment:10 Changed 12 years ago by laurentj

  • Milestone changed from Jelix 1.1 beta 2 to jelix 1.1

Milestone Jelix 1.1 beta 2 deleted

Note: See TracTickets for help on using tickets.