-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uncap additional expenses and allow delete #5908
Changes from 2 commits
02ac44e
3005b58
3815b27
731fdba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, just saw this, will take those out |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<div class="nested-form-wrapper"> | ||
<li> | ||
<div class="expense-container row" data-index="<%= form.index %>"> | ||
<div class="input-style-1 col-sm-3"> | ||
<h5><%= form.label :additional_expense, "a. Expense amount" %></h5> | ||
<div class="input-group"> | ||
<span class="dollar-sign"> | ||
<%= form.number_field :other_expense_amount, | ||
placeholder: "0", | ||
class: "form-control other-expense-amount", | ||
min: "0", max: 1000, step: 0.01 %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @schoork added number_with_precision to the field, let me know if this display is ok: |
||
</span> | ||
</div> | ||
</div> | ||
<div class="input-style-1 col"> | ||
<h5><%= form.label :other_expenses_describe, "b. Expense details" %></h5> | ||
<%= form.text_field :other_expenses_describe, | ||
placeholder: "Enter additional details", | ||
class: "form-control other-expenses-describe" %> | ||
</div> | ||
<div class="input-style-1 col"> | ||
<button type="button" class="align-self-center main-btn danger-btn btn-hover btn-sm remove-expense-button mt-15" data-action="nested-form#remove"> Delete</button> | ||
</div> | ||
</div> | ||
</li> | ||
<%= form.hidden_field :_destroy %> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to access the nested form controller until I added this - not sure if there is a more standard way to do this. I realize the rest of the imports in here are all local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
court_order_form_controller.js
uses it, too. But it loads it directly. This is the right thing to do for your use case.