|
1 |
| -<%= form_with(model: user) do |form| %> |
2 |
| - <% if user.errors.any? %> |
3 |
| - <div style="color: red"> |
4 |
| - <h2><%= pluralize(user.errors.count, "error") %> prohibited this user from being saved:</h2> |
5 |
| - |
6 |
| - <ul> |
7 |
| - <% user.errors.each do |error| %> |
8 |
| - <li><%= error.full_message %></li> |
9 |
| - <% end %> |
10 |
| - </ul> |
11 |
| - </div> |
12 |
| - <% end %> |
13 |
| - |
14 |
| - <div class="form-body"> |
15 |
| - <div class="row"> |
16 |
| - <div class="col-md-4"> |
17 |
| - <%= form.label :email_address, style: "display: block" %> |
| 1 | +<div class="card-content"> |
| 2 | + <div class="card-body"> |
| 3 | + <p>Regions should ... Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut |
| 4 | + labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip |
| 5 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla |
| 6 | + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est |
| 7 | + laborum.</p> |
| 8 | + <%= form_with(model: @user, local: true, class: "form") do |f| %> |
| 9 | + <div class="row"> |
| 10 | + <div class="col-md-12 col-12"> |
| 11 | + <div class="form-group"> |
| 12 | + <%= f.label :email_address, "Email Address" %> |
| 13 | + <%= f.text_field :email_address, class: "form-control", placeholder: "[email protected]" %> |
| 14 | + </div> |
18 | 15 | </div>
|
| 16 | + <div class="row"> |
| 17 | + <div class="col-md-4"> |
| 18 | + <%= f.label :provider_id, style: "display: block" %> |
| 19 | + </div> |
19 | 20 | <div class="col-md-8 form-group">
|
20 |
| - <%= form.text_field :email_address %> |
| 21 | + <%= f.collection_select(:provider_id, Provider.all, :id, :name, include_blank: "No provider (user must be an admin)") %> |
21 | 22 | </div>
|
22 | 23 | </div>
|
23 |
| - <% if @user.new_record? %> |
24 |
| - <div class="row"> |
25 |
| - <div class="col-md-4"> |
26 |
| - <%= form.label :password, style: "display: block" %> |
27 |
| - </div> |
28 |
| - <div class="col-md-8 form-group"> |
29 |
| - <%= form.text_field :password %> |
30 |
| - </div> |
31 |
| - </div> |
32 |
| - <% end %> |
33 | 24 | <div class="row">
|
34 | 25 | <div class="col-md-4">
|
35 |
| - <%= form.label :is_admin, style: "display: block" %> |
| 26 | + <%= f.label :is_admin, style: "display: block" %> |
36 | 27 | </div>
|
37 | 28 | <div class="col-md-8 form-group">
|
38 |
| - <%= form.checkbox :is_admin %> |
| 29 | + <%= f.checkbox :is_admin %> |
39 | 30 | </div>
|
40 | 31 | </div>
|
| 32 | + <div class="col-12 d-flex justify-content-end"> |
| 33 | + <%= submit_button(f) %> |
| 34 | + <%= link_to "Cancel", users_path, class: "btn btn-light-secondary me-1 mb-1" %> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + <% end %> |
| 38 | + </div> |
41 | 39 | </div>
|
42 |
| - |
43 |
| - |
44 |
| -<div class="col-sm-12 d-flex justify-content-end"> |
45 |
| - <%= form.submit class: "btn btn-primary me-1 mb-1" %> |
46 |
| -</div> |
47 |
| - |
48 |
| -<% end %> |
0 commit comments