-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
8c5c1c3
commit 1f8ea95
Showing
2 changed files
with
30 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="row form-group"> | ||
<div class="col-md-6 col-md-offset-3"> | ||
<h1 class="center">New Expense</h1> | ||
<%= form_for(expense) do |f| %> | ||
<%= render 'shared/error_messages', object: expense %> | ||
<div class="field"> | ||
<%= f.label :title %><br /> | ||
<%= f.text_field :title, autofocus: true, class: "form-control" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :description%><br /> | ||
<%= f.text_area :description, class: "form-control" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :amount %> | ||
<%= f.number_field :amount, value: number_to_currency(f.object.amount.to_f, delimiter: '', unit: ''), step: 0.01, class: "form-control" %> | ||
</div> | ||
|
||
<br /> | ||
|
||
<div class="actions"> | ||
<%= f.submit "Submit", class: "btn btn-primary" %> | ||
</div> | ||
|
||
<% end %> | ||
</div> | ||
</div> |
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,29 +1 @@ | ||
<div class="row form-group"> | ||
<div class="col-md-6 col-md-offset-3"> | ||
<h1 class="center">New Expense</h1> | ||
<%= form_for(@expense) do |f| %> | ||
<%= render 'shared/error_messages', object: @expense %> | ||
<div class="field"> | ||
<%= f.label :title %><br /> | ||
<%= f.text_field :title, autofocus: true, class: "form-control" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :description%><br /> | ||
<%= f.text_area :description, class: "form-control" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :amount %> | ||
<%= f.number_field :amount, value: number_to_currency(f.object.amount.to_f, delimiter: '', unit: ''), step: 0.01, class: "form-control" %> | ||
</div> | ||
|
||
<br /> | ||
|
||
<div class="actions"> | ||
<%= f.submit "Submit", class: "btn btn-primary" %> | ||
</div> | ||
|
||
<% end %> | ||
</div> | ||
</div> | ||
<%= render 'form', expense: @expense %> |