forked from External/greenlight
GRN2-196: Fixed issues that scrutinizer is complaining about (#765)
* Refactored code to improve scrutinizer score * Bug fixes
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= update_room_path(room_uid: room_uid_from_bbb(recording[:meetingID])) %>">
|
||||
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
|
||||
<text id='recording-text'>
|
||||
<% if recording[:metadata][:name] %>
|
||||
<%= recording[:metadata][:name] %>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<div class="container">
|
||||
<div class="row pt-9">
|
||||
<div class="col-lg-8 col-sm-12">
|
||||
<div id="room-title" class="display-3 form-inline <%= 'edit_hover_class' if current_user.main_room != @room %>">
|
||||
<div id="room-title" class="display-3 form-inline <%= 'edit_hover_class' if current_user.main_room != @room %>" data-path="<%= update_settings_path(@room) %>">
|
||||
<% if current_user.main_room == @room %>
|
||||
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= t("home_room") %></h1>
|
||||
<a class="disable-click"><i class="fas fa-home align-top home-indicator ml-2"></i></a>
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= update_room_path(room_uid: room_uid_from_bbb(recording[:meetingID])) %>">
|
||||
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
|
||||
<text>
|
||||
<% if recording[:metadata][:name] %>
|
||||
<%= recording[:metadata][:name] %>
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= update_room_path(room_uid: room_uid_from_bbb(recording[:meetingID])) %>">
|
||||
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
|
||||
<text id='recording-text'>
|
||||
<% if recording[:metadata][:name] %>
|
||||
<%= recording[:metadata][:name] %>
|
||||
|
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-8">
|
||||
<% if invite_registration %>
|
||||
<% if admin_invite_registration %>
|
||||
<div id="invite-user" class="d-inline-block float-right ml-3">
|
||||
<%= link_to "#inviteModal", :class => "btn btn-primary", "data-toggle": "modal" do %>
|
||||
<%= t("administrator.users.invite") %> <i class="fas fa-paper-plane ml-1"></i>
|
||||
|
@ -18,6 +18,15 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-3 mb-4">
|
||||
<%= render "users/components/menu_buttons" %>
|
||||
|
||||
<% if @user.errors.any? %>
|
||||
<h5 class="mt-8"><%= t("errors.title") %>:</h5>
|
||||
<ul>
|
||||
<% @user.errors.full_messages.each do |err| %>
|
||||
<li class="text-danger"><%= err %>.</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-lg-9">
|
||||
<%= render "users/components/setting_view", setting_id: "password", setting_title: t("settings.password.subtitle") %>
|
||||
|
@ -17,8 +17,10 @@
|
||||
<%= link_to edit_user_path, class: "list-group-item list-group-item-action dropdown-item #{"active" if active_page == "edit"}" do %>
|
||||
<span class="icon mr-3"><i class="fas fa-user"></i></span><%= t("settings.account.title") %>
|
||||
<% end %>
|
||||
<%= link_to change_password_path, class: "list-group-item list-group-item-action dropdown-item #{"active" if active_page == "change_password"}" do %>
|
||||
<span class="icon mr-3"><i class="fas fa-key"></i></span><%= t("settings.password.title") %>
|
||||
<% if current_user.greenlight_account? %>
|
||||
<%= link_to change_password_path, class: "list-group-item list-group-item-action dropdown-item #{"active" if active_page == "change_password"}" do %>
|
||||
<span class="icon mr-3"><i class="fas fa-key"></i></span><%= t("settings.password.title") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to delete_account_path, class: "list-group-item list-group-item-action dropdown-item #{"active" if active_page == "delete_account"}" do %>
|
||||
<span class="icon mr-3"><i class="fas fa-trash-alt"></i></span><%= t("settings.delete.title") %>
|
||||
|
@ -19,13 +19,13 @@
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<%= f.label :password, t("settings.password.old"), class: "form-label" %>
|
||||
<%= f.password_field :password, class: "form-control #{form_is_invalid?(@user, :password)}" %>
|
||||
<%= f.password_field :password, class: "form-control #{form_is_invalid?(@user, :password)}", autocomplete: :off, required: true %>
|
||||
<br>
|
||||
<%= f.label :new_password, t("settings.password.new"), class: "form-label" %>
|
||||
<%= f.password_field :new_password, class: "form-control #{form_is_invalid?(@user, :password)}" %>
|
||||
<%= f.password_field :new_password, class: "form-control #{form_is_invalid?(@user, :password)}", autocomplete: :off, required: true %>
|
||||
<br>
|
||||
<%= f.label :password_confirmation, t("settings.password.confirmation"), class: "form-label" %>
|
||||
<%= f.password_field :password_confirmation, class: "form-control #{form_is_invalid?(@user, :password_confirmation)}" %>
|
||||
<%= f.password_field :password_confirmation, class: "form-control #{form_is_invalid?(@user, :password_confirmation)}", autocomplete: :off, required: true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user