diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4b0af03..6801154 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,6 +7,8 @@ module ApplicationHelper include LightboxHelper include BoxesHelper + + include FormsHelper # Displays context help. You can pass the content of the help message as the # first parameter or using template code inside a block passed to this diff --git a/app/helpers/forms_helper.rb b/app/helpers/forms_helper.rb new file mode 100644 index 0000000..aa1c879 --- /dev/null +++ b/app/helpers/forms_helper.rb @@ -0,0 +1,13 @@ +module FormsHelper + + def generate_form( name, obj, fields={} ) + + labelled_form_for name, obj do |f| + + f.text_field(:name) + + end + + end + +end diff --git a/app/views/account/login.rhtml b/app/views/account/login.rhtml index bfcddd4..9fd1ed9 100644 --- a/app/views/account/login.rhtml +++ b/app/views/account/login.rhtml @@ -30,3 +30,5 @@ $('login').focus(); <% end %> + +<%# = generate_form :user, @user, {...} %> diff --git a/app/views/profile_editor/person_info.rhtml b/app/views/profile_editor/person_info.rhtml index 447fc89..162ed9d 100644 --- a/app/views/profile_editor/person_info.rhtml +++ b/app/views/profile_editor/person_info.rhtml @@ -14,3 +14,5 @@ <% end %> <% end %> + +<%# = generate_form :info, @info, {...} %> diff --git a/public/stylesheets/controller_profile_editor.css b/public/stylesheets/controller_profile_editor.css new file mode 100644 index 0000000..c7dceeb --- /dev/null +++ b/public/stylesheets/controller_profile_editor.css @@ -0,0 +1,4 @@ +.profile_info th { + text-align: right; + padding-right: 20px; +} -- libgit2 0.21.2