Commit
ade040c49e7fdf735779f6a8027ab470e9b7581f
Exists in
master
and in
29 other branches
add_member_task_reject_details, admin_visible_profile, article-list-template, community_notifications, contact_admin_translation, event_fixes, fix_comments_pagination, fix_rails4_organization_ratings, fix_sign_up_form, follow_step_fix, forum_topic_creation, mirror_block_improvements, multi_env_on_remote_user, new_security, noosfero_spb_ci, organization_ratings_improvements, organization_ratings_link_to_profile_stable-spb-1.3, organization_ratings_translations_fix, profile_api_improvements, ratings_minor_fixes, remote_user_fix, send_email_to_admins, stable-spb-1.3, stable-spb-1.3-fixes, stable-spb-1.4, stable-spb-1.5, suggest_rejected_value, web_steps_improvements, xss_terminate_custom_options
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
| +} |