Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
fail-fast: false
matrix:
alchemy_branch:
- "8.1-stable"
Comment thread
tvdeyen marked this conversation as resolved.
- "8.2-stable"
ruby:
- "3.3"
Expand All @@ -27,9 +26,6 @@ jobs:
- mysql
- postgresql
- sqlite
exclude:
- alchemy_branch: "8.0-stable"
rails: "8.1"

env:
DB: ${{ matrix.database }}
Expand Down
2 changes: 1 addition & 1 deletion alchemy-devise.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|

s.files = Dir["{app,config,db,lib}/**/*", "LICENSE", "CHANGELOG.md", "README.md"]

s.add_dependency "alchemy_cms", [">= 8.1.0.a", "< 9.0"]
s.add_dependency "alchemy_cms", [">= 8.2.0", "< 9.0"]
s.add_dependency "devise", ">= 4.9", "< 6.0"
s.add_dependency "flickwerk", ["~> 0.3.6"]

Expand Down
10 changes: 5 additions & 5 deletions app/views/alchemy/admin/users/_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= f.input :firstname, input_html: {autocomplete: "given-name"} %>
<%= f.input :lastname, input_html: {autocomplete: "family-name"} %>
<%= f.input :login, autofocus: true, required: @user.login_required?, input_html: {autocomplete: "username"} %>
<%= f.input :email, required: @user.email_required?, input_html: {autocomplete: "email"} %>
<%= f.input :login, autofocus: true, required: f.object.login_required?, input_html: {autocomplete: "username"} %>
<%= f.input :email, required: f.object.email_required?, input_html: {autocomplete: "email"} %>
<% if Alchemy::I18n.available_locales.many? %>
<div class="input select">
<%= f.label(:language) %>
Expand All @@ -16,9 +16,9 @@
is: "alchemy-select",
data: {allow_clear: true}
} %>
<% if can_update_role? %>
<% if local_assigns[:user_roles] && can_update_role? %>
<%= f.input :alchemy_roles,
collection: @user_roles,
collection: user_roles,
input_html: {
multiple: true,
is: 'alchemy-select',
Expand All @@ -32,7 +32,7 @@
<%= f.label :tag_list %>
<%= render 'alchemy/admin/partials/autocomplete_tag_list',
f: f,
object: @user %>
object: f.object %>
</div>
<% end %>
<%= f.input :send_credentials, as: 'boolean' %>
Expand Down
23 changes: 21 additions & 2 deletions app/views/alchemy/admin/users/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<%= alchemy_form_for [:admin, @user] do |f| %>
<%= render 'fields', f: f %>
<% if request.xhr? || turbo_frame_request? %>
<%= alchemy_form_for [:admin, @user] do |f| %>
<%= render "fields", f: f, user_roles: @user_roles %>
<% end %>
<% else %>
<%= content_for :toolbar do %>
<sl-tooltip content="<%= Alchemy.t(:back) %>">
<%= link_to request.referer || alchemy.admin_dashboard_path, class: "icon_button" do %>
<alchemy-icon name="arrow-left-s"></alchemy-icon>
<% end %>
</sl-tooltip>
<% end %>

<div class="panel">
<alchemy-message type="info">
<%= Alchemy.t(:edit_user) %>
</alchemy-message>
<%= alchemy_form_for [:admin, @user] do |f| %>
<%= render "fields", f: f, user_roles: @user_roles %>
<% end %>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/users/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= alchemy_form_for [:admin, @user] do |f| %>
<%= render 'fields', f: f %>
<%= render 'fields', f: f, user_roles: @user_roles %>
<% end %>
1 change: 1 addition & 0 deletions config/initializers/alchemy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
Alchemy.config.login_path = "/admin/login"
Alchemy.config.logout_path = "/admin/logout"
Alchemy.config.logout_method = Devise.sign_out_via.to_s
Alchemy.config.edit_user_path = "/admin/users/:id/edit"
end
Loading