lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb in rodauth-rails-0.17.1 vs lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb in rodauth-rails-0.18.0
- old
+ new
@@ -1,4 +1,17 @@
-<%%= form_tag <%= rodauth %>.sms_confirm_path, method: :post do %>
- <%%= render "sms_code_field" %>
- <%%= render "submit", value: "Confirm SMS Backup Number" %>
-<%% end %>
+<% content_for :title, rodauth.sms_confirm_page_title %>
+
+<%= form_with url: rodauth.sms_confirm_path, method: :post do |form| %>
+ <div class="form-group mb-3">
+ <%= form.label "sms-code", rodauth.sms_code_label, class: "form-label" %>
+ <div class="row">
+ <div class="col-sm-3">
+ <%= form.text_field rodauth.sms_code_param, value: "", id: "sms-code", autocomplete: "one-time-code", inputmode: "numeric", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.sms_code_param)}", aria: ({ invalid: true, describedby: "sms-code_error_message" } if rodauth.field_error(rodauth.sms_code_param)) %>
+ <%= content_tag(:span, rodauth.field_error(rodauth.sms_code_param), class: "invalid-feedback", id: "sms-code_error_message") if rodauth.field_error(rodauth.sms_code_param) %>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group mb-3">
+ <%= form.submit rodauth.sms_confirm_button, class: "btn btn-primary" %>
+ </div>
+<% end %>