Add html support to disclaimer body and enable during registration [SCI-8410][SCI-8407]

This commit is contained in:
Anton 2023-05-05 10:40:24 +02:00
parent f3d78dd4c8
commit 560ddca839
6 changed files with 18 additions and 6 deletions

View file

@ -14,4 +14,7 @@
initDisclaimer('.log-in-button', '#new_user');
initDisclaimer('.btn-okta', '#oktaForm');
initDisclaimer('.btn-azure-ad', '.azureAdForm');
initDisclaimer('.sign-up-button', '#sign-up-form');
initDisclaimer('.forgot-password-submit', '#forgot-password-form');
initDisclaimer('.invitation-submit', '#invitation-form');
}());

View file

@ -4,7 +4,7 @@
<h2><%= t 'devise.invitations.edit.header' %></h2>
<%= form_for (resource or :user), as: resource_name, url: invitation_path(resource_name), html: { method: :put } do |f| %>
<%= form_for (resource or :user), as: resource_name, url: invitation_path(resource_name), html: { method: :put, id: 'invitation-form' } do |f| %>
<%= f.hidden_field :invitation_token %>
@ -46,12 +46,15 @@
<%= recaptcha_input_tag %>
<div class="form-group" data-hook="confirm-invitation-form-submit">
<%= f.submit "Sign Up", class: "btn btn-primary" %>
<%= f.submit "Sign Up", class: "btn btn-primary invitation-submit" %>
</div>
<% end %>
</div>
<%= render partial: 'users/sessions/login_disclaimer'%>
<% if resource && resource.errors.present? %>
<script>
(function () {

View file

@ -3,7 +3,7 @@
<div class="center-block center-block-narrow">
<h2><%=t "devise.passwords.edit.title" %></h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, id: 'forgot-password-form' }) do |f| %>
<% if resource.errors.present? %>
<div class="alert alert-danger" id="alert-flash">
@ -28,9 +28,11 @@
</p>
<div class="form-group">
<%= f.button t("devise.passwords.edit.submit"), class: "btn btn-primary" %>
<%= f.button t("devise.passwords.edit.submit"), class: "btn btn-primary forgot-password-submit" %>
</div>
<% end %>
<%= render "users/shared/links" %>
</div>
<%= render partial: 'users/sessions/login_disclaimer'%>

View file

@ -27,3 +27,5 @@
</div>
</div>
</div>
<%= render partial: 'users/sessions/login_disclaimer'%>

View file

@ -61,6 +61,8 @@
</div>
</div>
<%= render partial: 'users/sessions/login_disclaimer'%>
<% if resource && resource.errors.present? %>
<script>
(function () {

View file

@ -5,11 +5,11 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="confirm-archive-modal-label">
<%= login_disclaimer["title"] %>
<%= login_disclaimer["title"]&.html_safe %>
</h4>
</div>
<div class="modal-body">
<%= login_disclaimer["body"] %>
<%= login_disclaimer["body"]&.html_safe %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t("general.cancel") %></button>