Commit
ade040c49e7fdf735779f6a8027ab470e9b7581f
Exists in
staging
and in
42 other branches
all_pending_tasks_api, api-articles-period, api_roles, caching-rails4, captcha_serpro_plugin, comments_permissions, content-manager-hostspot, elasticsearch, elasticsearch_api, elasticsearch_categories, elasticsearch_filter, elasticsearch_sort, elasticsearch_to_merge, elasticsearch_view, environment-exposes-api, export-comment-api, export-comment-paragraph, export_data, external_followers, federation-webfinger, federation_followers, federation_followers_backend, federation_oauth_provider, federation_webfinger, fix_event_date_issue, fix_notification_email, fix_string_downcase_and_upcase, follower_permition, json_cookie_serializer, login-captcha, master, master_profile_followers, oauth_external_login, oauth_login, private-scraps, private-scraps-rebase, production, production-vendorized, profile_api_improvements, tasks_keep_filter_params, user_mention, webfinger_server
ActionItem152: tentando fazer um gerador de forms...
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1250 3f533792-8f58-4932-b0fe-aaf55b0a4547
| @@ -7,6 +7,8 @@ module ApplicationHelper |
| @@ -7,6 +7,8 @@ module ApplicationHelper |
7
| include LightboxHelper |
7
| include LightboxHelper |
8
| |
8
| |
9
| include BoxesHelper |
9
| include BoxesHelper |
| |
10
| + |
| |
11
| + include FormsHelper |
10
| |
12
| |
11
| # Displays context help. You can pass the content of the help message as the |
13
| # Displays context help. You can pass the content of the help message as the |
12
| # first parameter or using template code inside a block passed to this |
14
| # first parameter or using template code inside a block passed to this |
| @@ -0,0 +1,13 @@ |
| @@ -0,0 +1,13 @@ |
| |
1
| +module FormsHelper |
| |
2
| + |
| |
3
| + def generate_form( name, obj, fields={} ) |
| |
4
| + |
| |
5
| + labelled_form_for name, obj do |f| |
| |
6
| + |
| |
7
| + f.text_field(:name) |
| |
8
| + |
| |
9
| + end |
| |
10
| + |
| |
11
| + end |
| |
12
| + |
| |
13
| +end |
| @@ -30,3 +30,5 @@ |
| @@ -30,3 +30,5 @@ |
30
| $('login').focus(); |
30
| $('login').focus(); |
31
| </script> |
31
| </script> |
32
| <% end %> |
32
| <% end %> |
| |
33
| + |
| |
34
| +<%# = generate_form :user, @user, {...} %> |
| @@ -14,3 +14,5 @@ |
| @@ -14,3 +14,5 @@ |
14
| <% end %> |
14
| <% end %> |
15
| |
15
| |
16
| <% end %> |
16
| <% end %> |
| |
17
| + |
| |
18
| +<%# = generate_form :info, @info, {...} %> |
| @@ -0,0 +1,4 @@ |
| @@ -0,0 +1,4 @@ |
| |
1
| +.profile_info th { |
| |
2
| + text-align: right; |
| |
3
| + padding-right: 20px; |
| |
4
| +} |