diff --git a/app/helpers/forms_helper.rb b/app/helpers/forms_helper.rb
index 81cb2d1..0068ac0 100644
--- a/app/helpers/forms_helper.rb
+++ b/app/helpers/forms_helper.rb
@@ -40,7 +40,8 @@ module FormsHelper
the_class << ' ' << html_options[:class]
end
- bt_submit = submit_tag(label, html_options.merge(:class => the_class))
+ # FIXME: should be in stylesheet
+ bt_submit = submit_tag(label, html_options.merge(:style => 'height:28px; cursor:pointer', :class => the_class))
bt_submit + bt_cancel
end
diff --git a/app/views/account/_signup_form.rhtml b/app/views/account/_signup_form.rhtml
index 360b1e1..6be4ad9 100644
--- a/app/views/account/_signup_form.rhtml
+++ b/app/views/account/_signup_form.rhtml
@@ -1,5 +1,3 @@
-
<%= _('Register') %>
-
<%= error_messages_for :user %>
<% labelled_form_for :user, @user,
:html => { :help=>_('Fill all this fields to join in this environment.' +
diff --git a/app/views/account/accept_terms.rhtml b/app/views/account/accept_terms.rhtml
index 2af87ab..d6ed685 100644
--- a/app/views/account/accept_terms.rhtml
+++ b/app/views/account/accept_terms.rhtml
@@ -1,8 +1,16 @@
-<%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %>
+
+
<%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %>
-
<%= @terms_of_enterprise_use %>
+
<%= @terms_of_enterprise_use %>
-<% button_bar do %>
- <%= link_to( _('I accept the terms'), { :action => 'activate_enterprise', :terms_accepted => true, :enterprise_code => params[:enterprise_code], :answer => params[:answer] } ) %>
- <%= link_to( _('I do NOT accept the terms'), { :controller => 'home', :action => 'index' } ) %>
-<% end %>
+ <% form_tag :action => 'activate_enterprise' do %>
+ <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
+ <%= hidden_field_tag :answer, params[:answer] %>
+
+ <%= labelled_check_box _('I read the terms of use and accepted them'), :terms_accepted %>
+ <% button_bar do %>
+ <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %>
+ <%= submit_button 'forward', _('Continue') %>
+ <% end %>
+ <% end %>
+
diff --git a/app/views/account/activate_enterprise.rhtml b/app/views/account/activate_enterprise.rhtml
index 57a1021..d02986b 100644
--- a/app/views/account/activate_enterprise.rhtml
+++ b/app/views/account/activate_enterprise.rhtml
@@ -1,12 +1,14 @@
+
<%= _('Enterprise activation - part 3 of 3') %>
-
<%= _('Well, now for you manage your enterprise you have to associate an individual account to the enterprise.') %>
-
<%= error_messages_for :user %>
+
<%= _('Well, now for you manage your enterprise you have to associate an individual account to the enterprise.') %>
+
<%= _('Do you have a user account?') %>
+
- <%= button_to_function 'login', _('I am already a registered user'), "$('enterprise-activation-create-user-form').hide(); $('enterprise-activation-login-form').show()" %>
- <%= button_to_function 'add', _('I want to register as an user now'), "$('enterprise-activation-login-form').hide(); $('enterprise-activation-create-user-form').show()" %>
+ <%= button_to_function 'login', _('Yes'), "$('enterprise-activation-create-user-form').hide(); $('enterprise-activation-login-form').show()" %>
+ <%= button_to_function 'add', _('No'), "$('enterprise-activation-login-form').hide(); $('enterprise-activation-create-user-form').show()" %>
@@ -14,6 +16,6 @@
-
<%= _('Login') %>
<%= render :partial => 'login_form' %>
+
diff --git a/app/views/account/activation_question.rhtml b/app/views/account/activation_question.rhtml
index 1c1cbdb..1c7f73d 100644
--- a/app/views/account/activation_question.rhtml
+++ b/app/views/account/activation_question.rhtml
@@ -1,12 +1,38 @@
-<%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %>
+
- <%= ApplicationHelper::NoosferoFormBuilder::output_field(@question == :foundation_year ? _('What year your enterprise was founded?') : _('What is the CNPJ of your enterprise?'), text_field_tag(:answer, nil,:help => help=_('We need to be sure that this is your enterprise'))) %>
+
+
<%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %>
+ <% form_tag( {:action => 'accept_terms'}, {:method => 'get', :onsubmit => (@question == :foundation_year ? 'return check_valid_year(this)' : 'return check_valid_cnpj(this)')}) do %>
- <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
+ <%= ApplicationHelper::NoosferoFormBuilder::output_field(@question == :foundation_year ? _('What year your enterprise was founded?') : _('What is the CNPJ of your enterprise?'), text_field_tag(:answer, nil, :id => 'enterprise-activation-answer', :help => help=_('We need to be sure that this is your enterprise'))) %>
- <% button_bar do %>
- <%= submit_button('answer', _('Answer'), :cancel => {:action => 'index'} ) %>
+ <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
+
+ <% button_bar do %>
+ <%= button 'cancel', _('Cancel'), :action => 'index' %>
+ <%= submit_button 'forward', _('Continue') %>
+ <% end %>
<% end %>
-<% end %>
+
diff --git a/app/views/account/signup.rhtml b/app/views/account/signup.rhtml
index bbf057d..4c409bf 100644
--- a/app/views/account/signup.rhtml
+++ b/app/views/account/signup.rhtml
@@ -1 +1,2 @@
-<%= render :partial => 'signup_form' %>
+<%= _('Signup') %>
+<%= render :partial => 'signup_form' %>
diff --git a/public/designs/icons/default/style.css b/public/designs/icons/default/style.css
index f860e94..5079c46 100644
--- a/public/designs/icons/default/style.css
+++ b/public/designs/icons/default/style.css
@@ -18,6 +18,7 @@
.icon-up { background-image: url(go-up-HC.gif) }
.icon-up-red { background-image: url(go-up-red-HC.gif) }
.icon-down { background-image: url(go-down-HC.gif) }
+.icon-forward { background-image: url(go-forward-HC.gif) }
.icon-search { background-image: url(search-HC.gif) }
.icon-ok { background-image: url(ok-HC.gif) }
.icon-login { background-image: url(key-HC.gif) }
diff --git a/public/designs/themes/ecosol/stylesheets/controller_account.css b/public/designs/themes/ecosol/stylesheets/controller_account.css
index 566aac5..c1c19df 100644
--- a/public/designs/themes/ecosol/stylesheets/controller_account.css
+++ b/public/designs/themes/ecosol/stylesheets/controller_account.css
@@ -1,10 +1,20 @@
-
.main-block form {
border: 2px solid #3465A4;
padding: 10px 5px 10px 20px;
background: #B8CFE7;
}
+.activation-box {
+ border: 2px solid #3465A4;
+ padding: 10px 5px 10px 20px;
+ background: #B8CFE7;
+}
+
+.activation-box form {
+ border: 0px;
+ padding: 0px 0px 0px 0px;
+}
+
.main-block label {
font-weight: bold;
}
--
libgit2 0.21.2