Skip to content

Commit c8011a0

Browse files
committed
feat(admin): Add timezone select to users form
If the user has a timezone column we show a select to let admins set the preferred time zone of the user.
1 parent 867121f commit c8011a0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

admin/app/components/solidus_admin/users/edit/component.html.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
<div class="py-1.5">
3030
<%= f.text_field(:password_confirmation) %>
3131
</div>
32+
<% if @user.respond_to?(:timezone) %>
33+
<div class="py-1.5">
34+
<%= f.select :timezone, ActiveSupport::TimeZone.all.map { |t| [t.name, t.to_s] }, include_blank: t("spree.none") %>
35+
</div>
36+
<% end %>
3237
<div class="py-1.5">
3338
<%= f.checkbox_row(:spree_role_ids, options: role_options, row_title: "Roles", layout: :subsection) %>
3439
</div>

0 commit comments

Comments
 (0)