<% # BigBlueButton open source conferencing system - http://www.bigbluebutton.org/. # Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below). # This program is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 3.0 of the License, or (at your option) any later # version. # # BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License along # with BigBlueButton; if not, see . %> <%= form_for @user, url: update_user_path, method: :patch do |f| %> <%= hidden_field_tag :setting, "account" %>
<%= f.label t("settings.account.fullname"), class: "form-label" %>
<%= f.text_field :name, class: "form-control #{form_is_invalid?(@user, :name)}", placeholder: t("settings.account.fullname") %>
<%= f.label t("email"), class: "form-label" %>
<%= f.text_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", placeholder: t("email"), readonly: !@user.greenlight_account? %>

<%= f.label t("settings.account.provider"), class: "form-label" %> <%= f.text_field :provider, class: "form-control", readonly: "" %>
<%= f.label t("settings.account.language"), class: "form-label" %> <%= f.select :language, language_options, {}, { class: "form-control custom-select" } %> <% current_user_role = current_user.highest_priority_role %>

<%= f.label t("settings.account.roles"), class: "form-label" %>
<% @user.roles.by_priority.each do |role| %> " style="<%= "background-color: #{role_colour(role)};border-color: #{role_colour(role)};" %>" class="tag user-role-tag"> <%= translated_role_name(role) %> <% if (current_user_role.can_manage_users || current_user_role.name == "super_admin") && (role.priority > current_user_role.priority || current_user_role.name == "admin") %> <% end %> <% end %>
<% if current_user_role.can_manage_users || current_user_role.name == "super_admin" %> <% provider = Rails.configuration.loadbalanced_configuration ? current_user.provider : "greenlight" %> <%= f.select :roles, Role.editable_roles(@user_domain).map{|role| [translated_role_name(role), role.id, {'data-colour' => role_colour(role)}]}.unshift(["", nil, {'data-colour' => nil}]), {disabled: disabled_roles(@user)}, { class: "form-control custom-select", id: "role-select-dropdown" } %> <% end %> <%= f.hidden_field :role_ids, id: "user_role_ids", value: @user.roles.by_priority.pluck(:id) %> <%= f.label t("settings.account.image"), class: "form-label mt-5" %>
<% if @user.image.blank? %> <%= @user.name.first %> <% else %> <% end %>
<%= f.text_field :image, class: "form-control #{form_is_invalid?(@user, :image)}", placeholder: t("settings.account.image_url") %>
<% end %>