<% # 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: :post do |f| %> <%= hidden_field_tag :setting, "account" %>
<%= f.label :name, t("settings.account.fullname"), class: "form-label" %>
<%= f.text_field :name, class: "form-control #{form_is_invalid?(@user, :name)}", placeholder: t("settings.account.fullname"), readonly: !@user.greenlight_account? %>
<%= f.label :email, t("email"), class: "form-label" %>
<%= f.email_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", placeholder: t("email"), readonly: !@user.greenlight_account? %>
<%= f.label :provider, t("settings.account.provider"), class: "form-label" %> <%= f.text_field :provider, class: "form-control", readonly: "" %>
<%= f.label :language, t("settings.account.language"), class: "form-label" %> <%= f.select :language, language_options, {}, { class: "form-control custom-select" } %> <%= f.label :roles, t("settings.account.roles"), class: "form-label mt-5" %> <% if current_user.role.get_permission("can_manage_users") %> <%= f.hidden_field :role_id, id: "user_role_id", value: @user.role.id %> <% else %> " class="tag custom-role-tag"> <%= translated_role_name(@user.role) %> <% end %> <%= f.label :image, t("settings.account.image"), class: "form-label mt-5" %>
<% if @user.image.blank? || !valid_url?(@user.image) %> <%= @user.name.first %> <% else %> <%= image_tag(@user.image, class: "avatar avatar-xxl mr-5 mt-2") %> <% end %>
<%= f.text_field :image, class: "form-control #{form_is_invalid?(@user, :image)}", placeholder: t("settings.account.image_url") %>
<% end %>