<%= @page_title %>
+How many times can this link be used to join the account?
++ <%= form.number_field :usage_limit, + required: true, + autofocus: true, + min: @join_code.usage_count, + class: "input center txt-large fit-content font-weight-black", + data: { action: "keydown.esc@document->form#cancel focus->form#select" } %> -
- How many times can this code be used to join the account? -
- <% end %> - - <%= form.number_field :usage_limit, - required: true, - autofocus: true, - min: @join_code.usage_count, - class: "input", - data: { action: "keydown.esc@document->form#cancel" } %> -- Current usage: <%= @join_code.usage_count %>. You can only increase the limit to allow more uses. -
-+ This code has been used <%= @join_code.usage_count %>/<%= @join_code.usage_limit %> times. +
<%= form.button type: :submit, class: "btn btn--link center txt-medium" do %> - Update join code + Save changes <% end %> <%= link_to "Go back", account_join_code_path, data: { form_target: "cancel" }, hidden: true %> diff --git a/app/views/account/join_codes/show.html.erb b/app/views/account/join_codes/show.html.erb index b33d283be..7a4b22129 100644 --- a/app/views/account/join_codes/show.html.erb +++ b/app/views/account/join_codes/show.html.erb @@ -1,87 +1,68 @@ -<% @page_title = "Join Code" %> +<% @page_title = "Add people" %> <% content_for :header do %> <%= render "filters/menu" %> -<%= @page_title %>
+
- <%= @join_code.code %>
-
- <% if @join_code.active? %>
- Active
- <% else %>
- Used up
+<%= @page_title %>
+Share the link below to invite people to this account
+- <%= @join_code.usage_count %> - of - <%= @join_code.usage_limit %> - uses - <% if @join_code.active? %> - ( - <%= @join_code.usage_limit - @join_code.usage_count %> - remaining) - <% end %> -
-