Allow users to set/update their display name in LDAP
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Râu Cao
2023-05-27 19:59:49 +02:00
parent 32d1992632
commit f74227fedb
9 changed files with 79 additions and 41 deletions

View File

@@ -34,7 +34,7 @@
<%= f.password_field :current_password, class: "w-full", required: true %>
</p>
<p class="mt-6">
<%= f.submit "Update", class: "btn-md btn-blue" %>
<%= f.submit "Update", class: "btn-md btn-blue w-full md:w-auto" %>
</p>
</div>
<% end %>

View File

@@ -21,10 +21,15 @@
<p class="text-sm text-gray-500">
Your user address for Chat and Lightning Network.
</p>
<%# <%= form_for(@user, as: "profile", url: settings_profile_path) do |f| %>
<%# <p class="mt-8">
<%# <%= f.submit "Save changes", class: 'btn-md btn-blue w-full sm:w-auto' %>
<%# </p>
<%# <% end %>
<%= form_for(@user, url: setting_path(:profile), html: { :method => :put }) do |f| %>
<%= render FormElements::FieldsetComponent.new(tag: "div", title: "Display name") do %>
<%= f.text_field :display_name, class: "w-full sm:w-3/5 mb-2" %>
<% if @validation_errors.present? && @validation_errors[:display_name].present? %>
<p class="error-msg"><%= @validation_errors[:display_name].first %></p>
<% end %>
<% end %>
<p class="mt-8 pt-6 border-t border-gray-200 text-right">
<%= f.submit 'Save', class: "btn-md btn-blue w-full md:w-auto" %>
</p>
<% end %>
</section>

View File

@@ -1,20 +1,20 @@
<%= render SidenavLinkComponent.new(
name: "Profile", path: setting_path(:profile), icon: "user",
active: current_page?(setting_path(:profile))
active: @settings_section.to_s == "profile"
) %>
<%= render SidenavLinkComponent.new(
name: "Account", path: setting_path(:account), icon: "key",
active: current_page?(setting_path(:account))
active: @settings_section.to_s == "account"
) %>
<% if Setting.ejabberd_enabled %>
<%= render SidenavLinkComponent.new(
name: "Chat", path: setting_path(:xmpp), icon: "message-circle",
active: current_page?(setting_path(:xmpp))
active: @settings_section.to_s == "xmpp"
) %>
<% end %>
<% if Setting.lndhub_enabled %>
<%= render SidenavLinkComponent.new(
name: "Lightning", path: setting_path(:lightning), icon: "zap",
active: current_page?(setting_path(:lightning))
active: @settings_section.to_s == "lightning"
) %>
<% end %>