Commit b2fad82fe0ad5554ca45032e0bfc292ba6308d4d
1 parent
b3dc4ef4
Exists in
master
and in
29 other branches
ActionItem251: more a little
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1604 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
29 additions
and
2 deletions
Show diff stats
app/views/shared/forms/example.yml
| ... | ... | @@ -15,6 +15,11 @@ |
| 15 | 15 | # values gave to the form generator method. |
| 16 | 16 | |
| 17 | 17 | form: |
| 18 | +- | |
| 19 | + action: bli.rb | |
| 20 | + method: post | |
| 21 | + id: registration_form | |
| 22 | + default_size: 25 | |
| 18 | 23 | |
| 19 | 24 | - name: { |
| 20 | 25 | _: Full Name, |
| ... | ... | @@ -23,6 +28,17 @@ form: |
| 23 | 28 | size: 40, |
| 24 | 29 | max_size: 255 |
| 25 | 30 | } |
| 31 | +- login: { | |
| 32 | + _: Login, | |
| 33 | + type: text, | |
| 34 | + mandatory: true, | |
| 35 | + max_size: 20, | |
| 36 | + validate: { | |
| 37 | + min_size: [ 3, "The minimal login size is 3" ], | |
| 38 | + regexp: [ "^[-_a-z0-9]+$", | |
| 39 | + "The login can only have lowercase letters, numbers hiphen and undescore. (no spaces!)" ] | |
| 40 | + } | |
| 41 | +} | |
| 26 | 42 | - paswd: { |
| 27 | 43 | _: Password, |
| 28 | 44 | type: password, |
| ... | ... | @@ -41,6 +57,17 @@ form: |
| 41 | 57 | _: Living Country, |
| 42 | 58 | type: select, |
| 43 | 59 | val: %COUNTRY_CODES%, |
| 44 | - val-h: %COUNTRY_NAMES% | |
| 45 | - selected: BR, | |
| 60 | + val-h: %COUNTRY_NAMES%, | |
| 61 | + selected: BR | |
| 46 | 62 | } |
| 63 | + | |
| 64 | +- butons: | |
| 65 | + - submit: { | |
| 66 | + _: Enter, | |
| 67 | + class: icon_enter | |
| 68 | + } | |
| 69 | + - reset: { | |
| 70 | + _: Reset, | |
| 71 | + class: icon_clear | |
| 72 | + } | |
| 73 | + | ... | ... |