mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Add custom new forms
This commit is contained in:
parent
6a35667bb5
commit
ecb3f2726f
10 changed files with 10 additions and 0 deletions
|
@ -6,4 +6,8 @@ module ApplicationHelper
|
|||
def header_title(page_title)
|
||||
content_for(:header_title) { page_title }
|
||||
end
|
||||
|
||||
def permitted_accountable_partial(name)
|
||||
name.underscore
|
||||
end
|
||||
end
|
||||
|
|
0
app/views/accounts/account/_credit.html.erb
Normal file
0
app/views/accounts/account/_credit.html.erb
Normal file
4
app/views/accounts/account/_depository.html.erb
Normal file
4
app/views/accounts/account/_depository.html.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
|
||||
<label for="account_name" class="block text-sm font-medium opacity-50 focus-within:opacity-100">Type</label>
|
||||
<%= f.select :subtype, options_for_select([["Checking", "checking"], ["Savings", "savings"]], selected: ""), {}, class: "block w-full p-0 mt-1 bg-transparent border-none focus:outline-none focus:ring-0" %>
|
||||
</div>
|
0
app/views/accounts/account/_investment.html.erb
Normal file
0
app/views/accounts/account/_investment.html.erb
Normal file
0
app/views/accounts/account/_loan.html.erb
Normal file
0
app/views/accounts/account/_loan.html.erb
Normal file
0
app/views/accounts/account/_other_asset.html.erb
Normal file
0
app/views/accounts/account/_other_asset.html.erb
Normal file
0
app/views/accounts/account/_other_liability.html.erb
Normal file
0
app/views/accounts/account/_other_liability.html.erb
Normal file
0
app/views/accounts/account/_property.html.erb
Normal file
0
app/views/accounts/account/_property.html.erb
Normal file
0
app/views/accounts/account/_vehicle.html.erb
Normal file
0
app/views/accounts/account/_vehicle.html.erb
Normal file
|
@ -21,6 +21,8 @@
|
|||
<%= f.text_field :name, placeholder: "Account name", required: 'required', class: "p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
|
||||
</div>
|
||||
|
||||
<%= render "accounts/#{permitted_accountable_partial(@account.accountable_type)}", f: f %>
|
||||
|
||||
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
|
||||
<label for="account_name" class="block text-sm font-medium opacity-50 focus-within:opacity-100">Balance</label>
|
||||
<div class="flex">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue