summaryrefslogtreecommitdiff
path: root/app/views/registrations/new.html.erb
blob: deb52b85809c03d39cad0b2f7884dd4d4bedac69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<div class="container" data-autovue="registration-view">
  <div class="columns">
    <div class="column is-6 is-offset-3">
      <registration v-bind:usernames="usernames" inline-template>
      <%= form_for @user, url: registrations_path do |f| %>
        <p class="control has-icon has-icon-right">
          <%= f.text_field :username, placeholder: t('.username'), class: 'input is-large', required: 'required', "v-model.trim": "username", "v-bind:class": "{ 'is-danger': !validation.username, 'is-success': validation.username }" %>
          <span class="icon is-small">
            <i class="fa fa-envelope"></i>
          </span>
        </p>
        <p class="control has-icon has-icon-right">
          <%= f.email_field :email, placeholder: t('.email'), class: 'input is-large', required: 'required', "v-model.trim": "email", "v-bind:class": "{ 'is-danger': !validation.email, 'is-success': validation.email }"  %>
          <span class="icon is-small">
            <i class="fa fa-envelope"></i>
          </span>
        </p>
        <p class="control has-icon has-icon-right">
          <%= f.password_field :password, placeholder: t('.password'), class: 'input is-large', required: 'required', "v-model": "password", "v-bind:class": "{ 'is-danger': !validation.password, 'is-success': validation.password }"  %>
          <span class="icon is-small">
            <i class="fa fa-lock"></i>
          </span>
        </p>
        <%= f.label :terms_and_conditions do %>
          <%= f.check_box :terms_and_conditions, required: 'required', "v-model": "terms_and_conditions" %>
          <%= t('.terms_and_conditions') %>
        <% end %>
        <p class="control">
          <%= f.submit t('.register_button'), class: "button is-success is-large is-fullwidth", ":disabled": "!isValid"  %>
          <%= button_tag t('.terms_and_conditions_link'), type: :button, class: "button is-link is-pulled-left", data: { modal: ".modal" } %>
          <%= link_to t('.login_link'), new_session_path, class: "button is-link is-pulled-right" %>
        </p>
      <% end %>
      </registration>
    </div>
  </div>

  <div class="modal">
    <div class="modal-background"></div>
    <div class="modal-card">
      <header class="modal-card-head">
        <p class="modal-card-title"><%= t('.terms_and_conditions_link') %></p>
        <button class="delete close-modal"></button>
      </header>
      <section class="modal-card-body">
        <div class=content>
          <%= render 'layouts/terms_content' %>
        </div>
      </section>
      <footer class="modal-card-foot">
        <a class="button is-success close-modal">Okay</a>
      </footer>
    </div>
  </div>
</div>