biovision 0.0.200518.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +214 -0
- data/Rakefile +22 -0
- data/app/assets/config/biovision_manifest.js +1 -0
- data/app/assets/images/biovision/components/carousel/arrow-left.svg +4 -0
- data/app/assets/images/biovision/components/carousel/arrow-right.svg +4 -0
- data/app/assets/images/biovision/icons/breadcrumb-hover.svg +1 -0
- data/app/assets/images/biovision/icons/breadcrumb.svg +1 -0
- data/app/assets/images/biovision/icons/components/contact.svg +26 -0
- data/app/assets/images/biovision/icons/components/content.svg +20 -0
- data/app/assets/images/biovision/icons/components/users.svg +21 -0
- data/app/assets/images/biovision/icons/key.svg +16 -0
- data/app/assets/images/biovision/icons/log_in.svg +15 -0
- data/app/assets/images/biovision/icons/log_out.svg +15 -0
- data/app/assets/images/biovision/icons/messages/error.svg +14 -0
- data/app/assets/images/biovision/icons/messages/info.svg +8 -0
- data/app/assets/images/biovision/icons/messages/success.svg +12 -0
- data/app/assets/images/biovision/icons/messages/warning.svg +13 -0
- data/app/assets/images/biovision/icons/settings.svg +41 -0
- data/app/assets/images/biovision/placeholders/16x9.svg +11 -0
- data/app/assets/images/biovision/placeholders/1x1.svg +11 -0
- data/app/assets/images/biovision/placeholders/3x2.svg +11 -0
- data/app/assets/images/biovision/placeholders/user.svg +15 -0
- data/app/assets/stylesheets/biovision/admin.scss +6 -0
- data/app/assets/stylesheets/biovision/admin/components.scss +59 -0
- data/app/assets/stylesheets/biovision/admin/default.scss +57 -0
- data/app/assets/stylesheets/biovision/admin/layout.scss +95 -0
- data/app/assets/stylesheets/biovision/admin/vars.scss +56 -0
- data/app/assets/stylesheets/biovision/biovision.scss +134 -0
- data/app/assets/stylesheets/biovision/biovision/messages.scss +41 -0
- data/app/assets/stylesheets/biovision/components/carousel.scss +53 -0
- data/app/assets/stylesheets/biovision/components/forms.scss +85 -0
- data/app/assets/stylesheets/biovision/components/hamburger.scss +56 -0
- data/app/assets/stylesheets/biovision/components/lists.scss +91 -0
- data/app/assets/stylesheets/biovision/default.scss +57 -0
- data/app/assets/stylesheets/biovision/themes/default_theme.scss +2 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/components.scss +3 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout.scss +44 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout/footer.scss +0 -0
- data/app/assets/stylesheets/biovision/themes/default_theme/layout/header.scss +39 -0
- data/app/assets/stylesheets/biovision/vars.scss +53 -0
- data/app/controllers/admin/agents_controller.rb +15 -0
- data/app/controllers/admin/components_controller.rb +174 -0
- data/app/controllers/admin/index_controller.rb +11 -0
- data/app/controllers/admin/ip_addresses_controller.rb +15 -0
- data/app/controllers/admin_controller.rb +14 -0
- data/app/controllers/authentication_controller.rb +79 -0
- data/app/controllers/concerns/authentication.rb +45 -0
- data/app/controllers/index_controller.rb +8 -0
- data/app/controllers/my/confirmations_controller.rb +2 -0
- data/app/controllers/my/index_controller.rb +8 -0
- data/app/controllers/my/profiles_controller.rb +128 -0
- data/app/controllers/my/recoveries_controller.rb +2 -0
- data/app/helpers/biovision_components_helper.rb +14 -0
- data/app/helpers/users_helper.rb +11 -0
- data/app/lib/biovision/components/base_component.rb +177 -0
- data/app/lib/biovision/components/component_settings.rb +30 -0
- data/app/lib/biovision/components/privilege_handler.rb +77 -0
- data/app/lib/biovision/components/track_component.rb +9 -0
- data/app/lib/biovision/components/users/authentication.rb +47 -0
- data/app/lib/biovision/components/users/code_handler.rb +23 -0
- data/app/lib/biovision/components/users/profile_handler.rb +12 -0
- data/app/lib/biovision/components/users/registration_handler.rb +99 -0
- data/app/lib/biovision/components/users_component.rb +47 -0
- data/app/lib/biovision/notifiers/base_notifier.rb +69 -0
- data/app/lib/biovision/notifiers/socialization_notifier.rb +31 -0
- data/app/lib/biovision/notifiers/users_notifier.rb +15 -0
- data/app/models/agent.rb +35 -0
- data/app/models/biovision_component.rb +45 -0
- data/app/models/biovision_component_user.rb +21 -0
- data/app/models/browser.rb +34 -0
- data/app/models/code.rb +71 -0
- data/app/models/concerns/checkable.rb +22 -0
- data/app/models/concerns/flat_priority.rb +50 -0
- data/app/models/concerns/has_language.rb +10 -0
- data/app/models/concerns/has_owner.rb +22 -0
- data/app/models/concerns/has_simple_image.rb +18 -0
- data/app/models/concerns/has_track.rb +10 -0
- data/app/models/concerns/has_uuid.rb +12 -0
- data/app/models/concerns/meta_texts.rb +16 -0
- data/app/models/concerns/nested_priority.rb +58 -0
- data/app/models/concerns/required_unique_name.rb +16 -0
- data/app/models/concerns/required_unique_slug.rb +15 -0
- data/app/models/concerns/toggleable.rb +33 -0
- data/app/models/foreign_site.rb +34 -0
- data/app/models/foreign_user.rb +21 -0
- data/app/models/ip_address.rb +31 -0
- data/app/models/language.rb +31 -0
- data/app/models/login_attempt.rb +35 -0
- data/app/models/metric.rb +48 -0
- data/app/models/metric_value.rb +11 -0
- data/app/models/notification.rb +37 -0
- data/app/models/simple_image.rb +47 -0
- data/app/models/simple_image_tag.rb +30 -0
- data/app/models/simple_image_tag_image.rb +13 -0
- data/app/models/token.rb +96 -0
- data/app/models/user.rb +136 -0
- data/app/models/user_language.rb +15 -0
- data/app/uploaders/simple_image_uploader.rb +96 -0
- data/app/uploaders/user_image_uploader.rb +58 -0
- data/app/views/admin/agents/_nav_item.html.erb +6 -0
- data/app/views/admin/agents/entity/_in_list.html.erb +6 -0
- data/app/views/admin/agents/index.html.erb +13 -0
- data/app/views/admin/components/_list.html.erb +12 -0
- data/app/views/admin/components/entity/_links.html.erb +35 -0
- data/app/views/admin/components/entity/_section.html.erb +12 -0
- data/app/views/admin/components/index.html.erb +12 -0
- data/app/views/admin/components/links/_track.html.erb +2 -0
- data/app/views/admin/components/links/_users.html.erb +11 -0
- data/app/views/admin/components/privileges.html.erb +20 -0
- data/app/views/admin/components/privileges/_component_user.html.erb +17 -0
- data/app/views/admin/components/privileges/_links.html.erb +35 -0
- data/app/views/admin/components/privileges/_privilege_flag.html.erb +28 -0
- data/app/views/admin/components/privileges/_users.html.erb +23 -0
- data/app/views/admin/components/settings.html.erb +39 -0
- data/app/views/admin/components/settings/_new_parameter.html.erb +46 -0
- data/app/views/admin/components/settings/_parameters.html.erb +20 -0
- data/app/views/admin/components/settings/_setting.html.erb +18 -0
- data/app/views/admin/components/settings/_settings.html.erb +31 -0
- data/app/views/admin/components/show.html.erb +14 -0
- data/app/views/admin/index/index.html.erb +14 -0
- data/app/views/admin/ip_addresses/_nav_item.html.erb +6 -0
- data/app/views/admin/ip_addresses/entity/_in_list.html.erb +6 -0
- data/app/views/admin/ip_addresses/index.html.erb +13 -0
- data/app/views/admin/unauthorized.html.erb +19 -0
- data/app/views/authentication/_form.html.erb +40 -0
- data/app/views/authentication/failed.js.erb +3 -0
- data/app/views/authentication/new.html.erb +21 -0
- data/app/views/index/index.html.erb +0 -0
- data/app/views/layouts/admin.html.erb +23 -0
- data/app/views/layouts/admin/_breadcrumbs.html.erb +8 -0
- data/app/views/layouts/admin/_footer.html.erb +10 -0
- data/app/views/layouts/admin/_header.html.erb +18 -0
- data/app/views/layouts/admin/header/_logo.html.erb +3 -0
- data/app/views/layouts/application/_footer.html.erb +8 -0
- data/app/views/layouts/application/_header.html.erb +9 -0
- data/app/views/layouts/application/header/_authentication.html.erb +13 -0
- data/app/views/my/index/index.html.erb +0 -0
- data/app/views/my/profiles/closed.html.erb +12 -0
- data/app/views/my/profiles/new.html.erb +17 -0
- data/app/views/my/profiles/new/_form.html.erb +147 -0
- data/app/views/shared/_breadcrumbs.html.erb +8 -0
- data/app/views/shared/_cookie_notification.html.erb +4 -0
- data/app/views/shared/_flash_messages.html.erb +7 -0
- data/app/views/shared/_meta_texts.html.erb +31 -0
- data/app/views/shared/_nothing_found.html.erb +1 -0
- data/app/views/shared/_pagination.jbuilder +15 -0
- data/app/views/shared/admin/_list.html.erb +19 -0
- data/app/views/shared/admin/_list_with_priority.html.erb +19 -0
- data/app/views/shared/admin/_toggleable.html.erb +8 -0
- data/app/views/shared/entity/_list_of_errors.html.erb +7 -0
- data/app/views/shared/forms/errors.js.erb +5 -0
- data/config/initializers/carrierwave.rb +27 -0
- data/config/initializers/pluralization.rb +2 -0
- data/config/locales/biovision-ru.yml +90 -0
- data/config/locales/components-ru.yml +81 -0
- data/config/locales/track-ru.yml +40 -0
- data/config/locales/users-ru.yml +130 -0
- data/config/routes.rb +75 -0
- data/db/migrate/20191228000000_create_biovision_components.rb +72 -0
- data/db/migrate/20200224000000_create_track_component.rb +59 -0
- data/db/migrate/20200224000010_create_users_component.rb +189 -0
- data/db/migrate/20200404000000_create_simple_images.rb +54 -0
- data/lib/biovision.rb +9 -0
- data/lib/biovision/base_methods.rb +167 -0
- data/lib/biovision/engine.rb +40 -0
- data/lib/biovision/version.rb +5 -0
- data/lib/tasks/biovision_tasks.rake +4 -0
- metadata +392 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
<% content_for :meta_title, t('.title', slug: @handler.slug) %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= link_to(t('admin.components.index.nav_text'), admin_components_path) %>
|
4
|
+
<span><%= @handler.name %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<%=
|
9
|
+
render(
|
10
|
+
partial: 'admin/components/entity/section',
|
11
|
+
locals: { component: @handler.component, handler: @handler }
|
12
|
+
)
|
13
|
+
%>
|
14
|
+
</article>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :meta_title, t('.title', page: current_page) %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<%= admin_biovision_component_link(component_handler.component) %>
|
4
|
+
<span><%= t('admin.ip_addresses.nav_item.text') %></span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<article>
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<%= paginate @collection %>
|
11
|
+
<%= render partial: 'shared/admin/list', locals: { collection: @collection } %>
|
12
|
+
<%= paginate @collection %>
|
13
|
+
</article>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% content_for :meta_title, t('application.errors.unauthorized') %>
|
2
|
+
|
3
|
+
<article>
|
4
|
+
<h1><%= t('admin.errors.unauthorized.heading') %></h1>
|
5
|
+
|
6
|
+
<div class="message-box error">
|
7
|
+
<%= @message %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<%=
|
11
|
+
render(
|
12
|
+
partial: 'authentication/form',
|
13
|
+
locals: {
|
14
|
+
form_id: 'auth-form_admin',
|
15
|
+
from: url_for
|
16
|
+
}
|
17
|
+
)
|
18
|
+
%>
|
19
|
+
</article>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<%
|
2
|
+
component = Biovision::Components::UsersComponent[current_user]
|
3
|
+
form_id = local_assigns[:form_id]
|
4
|
+
from = local_assigns[:from]
|
5
|
+
%>
|
6
|
+
<%=
|
7
|
+
form_with(
|
8
|
+
url: login_path,
|
9
|
+
html: { class: 'authentication-form', id: form_id }
|
10
|
+
) do
|
11
|
+
%>
|
12
|
+
<dl class="fields">
|
13
|
+
<div>
|
14
|
+
<dt><%= label_tag :login, t('.login') %></dt>
|
15
|
+
<dd>
|
16
|
+
<%=
|
17
|
+
text_field_tag(:login, '', class: 'input-text', required: true)
|
18
|
+
%>
|
19
|
+
</dd>
|
20
|
+
</div>
|
21
|
+
<div>
|
22
|
+
<dt>
|
23
|
+
<%= label_tag :password, t('activerecord.attributes.user.password') %>
|
24
|
+
</dt>
|
25
|
+
<dd>
|
26
|
+
<%=
|
27
|
+
password_field_tag(:password, '', class: 'input-text', required: true)
|
28
|
+
%>
|
29
|
+
</dd>
|
30
|
+
</div>
|
31
|
+
</dl>
|
32
|
+
<div class="actions">
|
33
|
+
<%= hidden_field_tag :from, from unless from.blank? %>
|
34
|
+
<%= hidden_field_tag :form_id, form_id %>
|
35
|
+
<%= button_tag t('.log_in'), class: 'button-primary' %>
|
36
|
+
<% if component.settings['registration_open'] %>
|
37
|
+
<%= link_to t('my.profiles.new.title'), new_my_profile_path, class: 'button-nav' %>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<span><%= t('.nav_text') %></span>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<article>
|
7
|
+
<div class="content-wrapper">
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<%=
|
11
|
+
render(
|
12
|
+
partial: 'authentication/form',
|
13
|
+
locals: { form_id: 'authentication_form' }
|
14
|
+
)
|
15
|
+
%>
|
16
|
+
|
17
|
+
<nav>
|
18
|
+
<%= link_to t('my.recoveries.show.nav_text'), my_recovery_path, class: 'button-nav' %>
|
19
|
+
</nav>
|
20
|
+
</div>
|
21
|
+
</article>
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="<%= locale %>">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8"/>
|
5
|
+
<title><%= yield :meta_title %></title>
|
6
|
+
<%= stylesheet_link_tag 'admin', media: 'all' %>
|
7
|
+
<%= javascript_pack_tag 'application' %>
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<%= render 'layouts/admin/header' %>
|
13
|
+
|
14
|
+
<main id="main">
|
15
|
+
<%= render 'shared/flash_messages' %>
|
16
|
+
<%= render 'layouts/admin/breadcrumbs' %>
|
17
|
+
|
18
|
+
<%= yield %>
|
19
|
+
</main>
|
20
|
+
|
21
|
+
<%= render 'layouts/admin/footer' %>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<header class="main-header">
|
2
|
+
<%= render 'layouts/admin/header/logo' %>
|
3
|
+
<nav>
|
4
|
+
<% unless current_user.nil? %>
|
5
|
+
<ul>
|
6
|
+
<li><%= current_user.screen_name %></li>
|
7
|
+
<li>
|
8
|
+
<%=
|
9
|
+
link_to(
|
10
|
+
image_tag('biovision/icons/log_out.svg', alt: t(:log_out)),
|
11
|
+
logout_path, method: :delete
|
12
|
+
)
|
13
|
+
%>
|
14
|
+
</li>
|
15
|
+
</ul>
|
16
|
+
<% end %>
|
17
|
+
</nav>
|
18
|
+
</header>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<footer class="main-footer">
|
2
|
+
<div class="content-wrapper">
|
3
|
+
<div class="copyright">© <%= t(:copyright) %></div>
|
4
|
+
<% if Biovision::Components::BaseComponent.privileged?(current_user) %>
|
5
|
+
<%= link_to(t('admin.index.index.nav_text'), admin_path) %>
|
6
|
+
<% end %>
|
7
|
+
</div>
|
8
|
+
</footer>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<header class="main-header">
|
2
|
+
<div class="content-wrapper">
|
3
|
+
<figure class="logo">
|
4
|
+
<%= link_to(image_tag('biovision/placeholders/1x1.svg', alt: ''), root_path) %>
|
5
|
+
</figure>
|
6
|
+
<nav></nav>
|
7
|
+
<%= render partial: 'layouts/application/header/authentication' %>
|
8
|
+
</div>
|
9
|
+
</header>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="header-authentication">
|
2
|
+
<% if current_user.nil? %>
|
3
|
+
<%= link_to(image_tag('biovision/icons/log_in.svg', alt: t(:log_in)), login_path) %>
|
4
|
+
<% else %>
|
5
|
+
<%= link_to(user_image_tiny(current_user), my_path, class: 'avatar') %>
|
6
|
+
<%=
|
7
|
+
link_to(
|
8
|
+
image_tag('biovision/icons/log_out.svg', alt: t(:log_out)),
|
9
|
+
logout_path, method: :delete
|
10
|
+
)
|
11
|
+
%>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<span><%= t('my.profiles.new.nav_text') %></span>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<article>
|
7
|
+
<div class="content-wrapper">
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<div class="message-box alert"><%= t('.registration_is_closed') %></div>
|
11
|
+
</div>
|
12
|
+
</article>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for :meta_title, t('.title') %>
|
2
|
+
<% content_for :breadcrumbs do %>
|
3
|
+
<span><%= t('.nav_text') %></span>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<article>
|
7
|
+
<div class="content-wrapper">
|
8
|
+
<h1><%= t('.heading') %></h1>
|
9
|
+
|
10
|
+
<%= render partial: 'my/profiles/new/form', locals: { entity: @entity } %>
|
11
|
+
|
12
|
+
<nav>
|
13
|
+
<p><%= t('.already_joined') %></p>
|
14
|
+
<%= link_to(t('authentication.new.nav_text'), login_path, class: 'button-nav') %>
|
15
|
+
</nav>
|
16
|
+
</div>
|
17
|
+
</article>
|
@@ -0,0 +1,147 @@
|
|
1
|
+
<% model_name = entity.class.to_s.underscore %>
|
2
|
+
<%=
|
3
|
+
form_with(
|
4
|
+
model: entity,
|
5
|
+
scope: model_name,
|
6
|
+
url: my_profile_path,
|
7
|
+
class: 'users_registration-form',
|
8
|
+
id: "#{model_name}-form",
|
9
|
+
data: { check_url: check_my_profile_path }
|
10
|
+
) do |f|
|
11
|
+
%>
|
12
|
+
<%=
|
13
|
+
render(
|
14
|
+
partial: 'shared/entity/list_of_errors',
|
15
|
+
locals: { entity: entity }
|
16
|
+
)
|
17
|
+
%>
|
18
|
+
<dl class="fields">
|
19
|
+
<% unless component_handler.settings['email_as_login'] %>
|
20
|
+
<div>
|
21
|
+
<dt>
|
22
|
+
<%= f.label :screen_name, t('activerecord.attributes.user.screen_name') %>
|
23
|
+
</dt>
|
24
|
+
<dd>
|
25
|
+
<%=
|
26
|
+
f.text_field(
|
27
|
+
:screen_name,
|
28
|
+
class: 'input-text',
|
29
|
+
data: { check: :screen_name },
|
30
|
+
maxlength: 30,
|
31
|
+
pattern: '^[-_a-z0-9A-Z]+$',
|
32
|
+
required: true,
|
33
|
+
title: t('.guidelines.screen_name'),
|
34
|
+
)
|
35
|
+
%>
|
36
|
+
<div class="check-result-error" data-field="screen_name"></div>
|
37
|
+
<div class="guideline"><%= t('.guidelines.screen_name') %></div>
|
38
|
+
</dd>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<div>
|
43
|
+
<dt>
|
44
|
+
<%= f.label :email, t('activerecord.attributes.user.email') %>
|
45
|
+
</dt>
|
46
|
+
<dd>
|
47
|
+
<%=
|
48
|
+
f.email_field(
|
49
|
+
:email,
|
50
|
+
class: 'input-text',
|
51
|
+
data: { check: :email },
|
52
|
+
maxlength: User::EMAIL_LIMIT,
|
53
|
+
required: component_handler.settings['require_email'],
|
54
|
+
size: nil
|
55
|
+
)
|
56
|
+
%>
|
57
|
+
<div class="check-result-error" data-field="email"></div>
|
58
|
+
<% unless component_handler.settings['email_as_login'] %>
|
59
|
+
<div class="guideline"><%= t('.guidelines.email') %></div>
|
60
|
+
<% end %>
|
61
|
+
</dd>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<div>
|
65
|
+
<dt>
|
66
|
+
<%= f.label :password, t('activerecord.attributes.user.password') %>
|
67
|
+
</dt>
|
68
|
+
<dd>
|
69
|
+
<%=
|
70
|
+
f.password_field(
|
71
|
+
:password,
|
72
|
+
class: 'input-text',
|
73
|
+
data: { check: :password },
|
74
|
+
maxlength: 70,
|
75
|
+
required: true,
|
76
|
+
size: nil
|
77
|
+
)
|
78
|
+
%>
|
79
|
+
<div class="check-result-error" data-field="password"></div>
|
80
|
+
<div class="guideline"><%= t('.guidelines.password') %></div>
|
81
|
+
</dd>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
<div>
|
85
|
+
<dt>
|
86
|
+
<%= f.label :password_confirmation, t('activerecord.attributes.user.password_confirmation') %>
|
87
|
+
</dt>
|
88
|
+
<dd>
|
89
|
+
<%=
|
90
|
+
f.password_field(
|
91
|
+
:password_confirmation,
|
92
|
+
class: 'input-text',
|
93
|
+
data: { check: :password_confirmation },
|
94
|
+
maxlength: 70,
|
95
|
+
required: true,
|
96
|
+
size: nil
|
97
|
+
)
|
98
|
+
%>
|
99
|
+
<div class="check-result-error" data-field="password_confirmation"></div>
|
100
|
+
<div class="guideline"><%= t('.guidelines.password_confirmation') %></div>
|
101
|
+
</dd>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<% if component_handler.settings['use_invites'] %>
|
105
|
+
<div>
|
106
|
+
<dt>
|
107
|
+
<%= label_tag :code, t('.invitation_code') %>
|
108
|
+
</dt>
|
109
|
+
<dd>
|
110
|
+
<%=
|
111
|
+
text_field_tag(
|
112
|
+
:code,
|
113
|
+
param_from_request(:code),
|
114
|
+
class: 'input-text',
|
115
|
+
data: { check: :code },
|
116
|
+
maxlength: Code::BODY_LIMIT,
|
117
|
+
required: component_handler.settings['invite_only'],
|
118
|
+
size: nil
|
119
|
+
)
|
120
|
+
%>
|
121
|
+
<div class="check-result-error" data-field="code"></div>
|
122
|
+
</dd>
|
123
|
+
</div>
|
124
|
+
<% end %>
|
125
|
+
</dl>
|
126
|
+
|
127
|
+
<ul class="flags">
|
128
|
+
<li>
|
129
|
+
<%= f.check_box :consent, id: "#{model_name}_consent", required: true %>
|
130
|
+
<%= f.label :consent, t('.consent') %>
|
131
|
+
</li>
|
132
|
+
<li>
|
133
|
+
<%= f.check_box :allow_mail, id: :user_allow_mail %>
|
134
|
+
<%= f.label :allow_mail, t('activerecord.attributes.user.allow_mail') %>
|
135
|
+
</li>
|
136
|
+
</ul>
|
137
|
+
|
138
|
+
<div class="visually-hidden">
|
139
|
+
<%= check_box_tag :agree, '1', false, tabindex: '-1' %>
|
140
|
+
<%= label_tag :agree, t('.i_am_bot') %>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div class="actions">
|
144
|
+
<%= button_tag t('.join'), type: :submit, class: 'button-primary' %>
|
145
|
+
<%#= link_to t('authentication.nav_item.log_in'), login_path, class: 'button-nav' %>
|
146
|
+
</div>
|
147
|
+
<% end %>
|