Created
November 12, 2012 21:33
-
-
Save cintrzyk/4062062 to your computer and use it in GitHub Desktop.
_form.html.erb (wallet new view)
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
<%= f.input :name, label: 'Expense name', class: 'control-label' %> | |
<%= f.input :amount, as: :currency, wrapper: 'prepend' %> |
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
<%= simple_form_for @wallet, url: create_budget_path, html: {class: "form-horizontal"} do |f| %> | |
<div class="control-group"> | |
<%= f.input :name, label: 'Budget name', class: 'control-label' %> | |
<%= f.input :amount, wrapper: :prepend, wrapper_html: {class: 'budget-amount'} do %> | |
<%= f.input_field :amount, as: :currency %> | |
<% end %> | |
<div id="plan-budget"> | |
<div id="plan-budget-expenses"> | |
<%= f.simple_fields_for :expenses do |builder| %> | |
<%= render 'expenses/expense_fields', f: builder %> | |
<% end %> | |
</div> | |
<%= link_to '+', '#', class: 'btn'%> | |
</div> | |
<div class="form-actions"> | |
<%= f.button :submit, 'Add budget', class: 'btn btn-primary' %> | |
<%= link_to 'Plan this budget', '#', class: 'btn btn-success'%> | |
</div> | |
</div> | |
<% end %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment