From 03935b39626d423391842b7e9720dd97cbaaca29 Mon Sep 17 00:00:00 2001 From: Francisco Marcelo de Araújo Lima Júnior Date: Thu, 21 Aug 2014 18:35:01 -0300 Subject: [PATCH] add infra --- app/helpers/application_helper.rb | 15 ++------------- app/views/account/_signup_form.html.erb | 10 ++++++++-- public/stylesheets/application.css | 3 ++- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ce01d42..0d41a64 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1310,19 +1310,8 @@ module ApplicationHelper templates = environment.send(kind).templates return '' if templates.count == 0 return hidden_field_tag("#{field_name}[template_id]", templates.first.id) if templates.count == 1 - - counter = 0 - radios = templates.map do |template| - counter += 1 - content_tag('li', labelled_radio_button(link_to(template.name, template.url, :target => '_blank'), "#{field_name}[template_id]", template.id, counter==1)) - end.join("\n") - - content_tag('div', content_tag('label', _('Profile organization'), :for => 'template-options', :class => 'formlabel') + - content_tag('p', _('Your profile will be created according to the selected template. Click on the options to view them.'), :style => 'margin: 5px 15px;padding: 0px 10px;') + - content_tag('ul', radios, :style => 'list-style: none; padding-left: 20px; margin-top: 0.5em;'), - :id => 'template-options', - :style => 'margin-top: 1em' - ) + options = options_for_select(templates.collect{ |template| [template.name, template.id]}) + content_tag('div', content_tag('label', _('Profile organization'), :class => 'formlabel') + (select_tag 'profile_data[template_id]', options, :onchange => 'show_fields_for_template(this);')) end def expirable_content_reference(content, action, text, url, options = {}) diff --git a/app/views/account/_signup_form.html.erb b/app/views/account/_signup_form.html.erb index 74d1655..056c834 100644 --- a/app/views/account/_signup_form.html.erb +++ b/app/views/account/_signup_form.html.erb @@ -29,6 +29,14 @@
+ + + <%= template_options(:people, 'profile_data') %> +
<%= label(:user, :login, _('Username'), {:class => 'formlabel'}) %> <%= environment.default_hostname %>/ @@ -109,8 +117,6 @@ <%= @plugins.dispatch(:signup_extra_contents).collect { |content| instance_eval(&content) }.join("") %> - <%= template_options(:people, 'profile_data') %> - <% unless @terms_of_use.blank? %>
<%= labelled_check_box(_('I accept the %s') % link_to(_('terms of use'), {:controller => 'home', :action => 'terms'}, :target => '_blank'), 'user[terms_accepted]') %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 52f02e3..dd2eae9 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -6142,6 +6142,7 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img { -webkit-border-radius: 8px; margin: 60px auto 5px; position: relative; + width: 400px; } #signup-form input.invalid_input { @@ -6190,7 +6191,7 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img { #signup-form select { height: auto; padding-right: 3px; - width: 365px; + width: 100%; } #signup-form .select-birth-date select { -- libgit2 0.21.2