Commit 84ebc4d1287a7ebc251874c564b669a371660487

Authored by Antonio Terceiro
2 parents 8973f0fc 0e61fdde

Merge commit '0e61fddebe2e8a89b5c384085e14a5c82cd0efc4' into v0.11.x

app/views/account/accept_terms.rhtml
  1 +<script type="text/javascript">
  2 + function toggle_submit_button(id, enabled) {
  3 + button = $(id)
  4 + if (enabled){
  5 + button.className = button.className.replace(/disabled/, '')
  6 + button.enable()
  7 + } else {
  8 + button.className += ' disabled'
  9 + button.disable()
  10 + }
  11 + }
  12 +</script>
1 13 <div class=activation-box>
2 14 <h2><%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %></h2>
3 15  
... ... @@ -7,10 +19,10 @@
7 19 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
8 20 <%= hidden_field_tag :answer, params[:answer] %>
9 21  
10   - <%= labelled_check_box _('I read the terms of use and accepted them'), :terms_accepted %>
  22 + <%= labelled_check_box _('I read the terms of use and accepted them'), :terms_accepted, '1', false, :onclick => 'toggle_submit_button("submit-accept-terms", this.checked)' %>
11 23 <% button_bar do %>
12 24 <%= button 'cancel', _('Cancel'), :controller => 'home', :action => 'index' %>
13   - <%= submit_button 'forward', _('Continue') %>
  25 + <%= submit_button 'forward', _('Continue'), {:disabled => true, :class => 'disabled', :id => 'submit-accept-terms'} %>
14 26 <% end %>
15 27 <% end %>
16 28 </div>
... ...
app/views/account/activate_enterprise.rhtml
... ... @@ -3,8 +3,8 @@
3 3  
4 4 <%= error_messages_for :user %>
5 5  
6   -<p><%= _('Well, now for you manage your enterprise you have to associate an individual account to the enterprise.') %></p>
7   -<p><%= _('Do you have a user account?') %></p>
  6 +<p><%= _('Now for you manage your enterprise you have to associate an individual account to the enterprise.') %></p>
  7 +<p><%= _('Do you have a personal user account in the system?') %></p>
8 8  
9 9 <div id="enterprise-activation-create-user-or-login-button">
10 10 <%= button_to_function 'login', _('Yes'), "$('enterprise-activation-create-user-form').hide(); $('enterprise-activation-login-form').show()" %>
... ... @@ -12,10 +12,17 @@
12 12 </div>
13 13  
14 14 <div id="enterprise-activation-create-user-form" style="display: none">
  15 + <h3><%= _('Personal signup form') %></h3>
15 16 <%= render :partial => 'signup_form' %>
  17 + <p><%= message = _('<b>Warning</b>: this form is for your personal information, not of your enterprise. So you will have a personal account that can manage your enterprise.') %></p>
16 18 </div>
17 19  
18 20 <div id="enterprise-activation-login-form" style="display: none">
  21 +
  22 + <h3><%= _('Enter you user name and password') %></h3>
19 23 <%= render :partial => 'login_form' %>
  24 + <p><%= message %></p>
20 25 </div>
  26 +
  27 +
21 28 </div>
... ...
app/views/account/activation_question.rhtml
... ... @@ -26,7 +26,11 @@
26 26 <h2><%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 1 of 2') : _('part 1 of 3')) %></h2>
27 27 <% form_tag( {:action => 'accept_terms'}, {:method => 'get', :onsubmit => (@question == :foundation_year ? 'return check_valid_year(this)' : 'return check_valid_cnpj(this)')}) do %>
28 28  
29   - <%= 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'))) %>
  29 + <p> <strong><%= _('Pay atention! You have only one chance!') %></strong> </p>
  30 +
  31 + <p><%= _("This is a question to know if you is really part of this enterprise. Pay atention because you has only one chance to answer rigth and activate your enterprise. If you answer wrong you will not be able to activate the enterprise automaticaly and must get in touch with the admins of %s by email or phone.") % environment.name %> </p>
  32 +
  33 + <%= 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'))) %>
30 34  
31 35 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
32 36  
... ...
public/stylesheets/controller_account.css 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +.button.disabled {
  2 + opacity: 0.5;
  3 +}
  4 +
  5 +#content .icon-forward.disabled {
  6 + background-image: url('/designs/icons/default/go-right-disabled-HC.gif');
  7 +}
... ...