-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cameron Hicks
committed
Jan 26, 2023
1 parent
25060f9
commit af9560b
Showing
8 changed files
with
74 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<%= form_with(model: fund) do |form| %> | ||
<% if fund.errors.any? %> | ||
<div style="color: red"> | ||
<h2><%= pluralize(fund.errors.count, "error") %> prohibited this fund from being saved:</h2> | ||
|
||
<ul> | ||
<% fund.errors.each do |error| %> | ||
<li><%= error.full_message %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
||
<div> | ||
<%= form.submit %> | ||
</div> | ||
<% end %> | ||
|
||
<%= bootstrap_form_with model: @fund, local: true do |f| %> | ||
<div class="row"> | ||
<div class="info-form-left col"> | ||
<%= f.text_field :name, autocomplete: 'off' %> | ||
<%= f.text_field :subdomain, autocomplete: 'off' %> | ||
<%= f.text_field :full_name, autocomplete: 'off' %> | ||
<%= f.text_field :site_domain, autocomplete: 'off' %> | ||
<%= f.text_field :phone, | ||
autocomplete: 'off', | ||
pattern: "[0-9]{10}|[0-9]{3}\.[0-9]{3}\.[0-9]{4}|[0-9]{3}[-][0-9]{3}[-][0-9]{4}" %> | ||
</div> | ||
|
||
<%= f.submit label, class: 'btn btn-primary btn-lg' %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
<p style="color: green"><%= notice %></p> | ||
<h1><%= t 'funds.index.title' %></h1> | ||
|
||
<h1>Funds</h1> | ||
<div class="fund-list"> | ||
<table class="table border-side table-hover top-spacer" id="funds_table"> | ||
<thead> | ||
<tr class="funds-table-header"> | ||
<th><!-- spacer --></th> | ||
<th><%= t 'activerecord.attributes.fund.name' %></th> | ||
<th><%= t 'activerecord.attributes.fund.subdomain' %></th> | ||
<th><%= t 'activerecord.attributes.fund.domain' %></th> | ||
<th><%= t 'activerecord.attributes.fund.full_name' %></th> | ||
<th><%= t 'activerecord.attributes.fund.site_domain' %></th> | ||
<th><%= t 'activerecord.attributes.fund.phone' %></th> | ||
</tr> | ||
</thead> | ||
|
||
<div id="funds"> | ||
<% @funds.each do |fund| %> | ||
<%= render fund %> | ||
<p> | ||
<%= link_to "Show this fund", fund %> | ||
</p> | ||
<% end %> | ||
<tbody> | ||
<% @funds.each do |fund| %> | ||
<tr class="funds-table-row"> | ||
<td><!-- spacer --></td> | ||
<td><%= link_to fund.name, edit_fund_path(fund) %></td> | ||
<td><%= fund.subdomain %></td> | ||
<td><%= fund.domain %></td> | ||
<td><%= fund.full_name %></td> | ||
<td><%= fund.site_domain %></td> | ||
<td><%= fund.phone %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<%= link_to "New fund", new_fund_path %> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.