-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
# Form | ||
|
||
|
||
| Option | value | | | ||
|---------|------------|--------------------------------------| | ||
| method | GET/POST | HTTP method (default POST) | | ||
| csrf | true/false | add csrf input hidden (default true) | | ||
| error | true/false | show errors message (default true) | | ||
| Option | value | | | ||
|-------------------|--------------|--------------------------------------| | ||
| method | GET/POST | HTTP method (default POST) | | ||
| csrf | true/false | add csrf input hidden (default true) | | ||
| error | true/false | show errors message (default true) | | ||
| translator | object | config for translate | | ||
| translator.prefix | property | prefix translator | | ||
| translator.t | property | function translate | | ||
|
||
## Translator AdonisJS | ||
|
||
``` | ||
{ | ||
prefix: 'user.', | ||
t: (key) => t(key) | ||
} | ||
@jrmc.form({ translator: { prefix: 'user.', t: (key) => t(key) }}) | ||
@jrmc.form.control({ name: 'name' }) | ||
@!jrmc.form.input({ class: 'input-bordered' }) | ||
@end | ||
@end | ||
=> exec i18n helper Adonis t('user.name') | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters