Uh oh!
There was an error while loading. Please reload this page.
Marcel/submit with button - #94
Closed
fatboypunk wants to merge 3 commits into
Closed
Conversation
fatboypunk
commented
Oct 20, 2021
Uh oh!
There was an error while loading. Please reload this page.
fatboypunk
commented
Oct 20, 2021
Uh oh!
There was an error while loading. Please reload this page.
fatboypunk
commented
Oct 21, 2021
ContributorAuthor
fatboypunkforce-pushed
the
marcel/submit-form
branch
from
October 21, 2021 11:48
b5b10b5 to
a97db01Compare- This allows users to specify the button they want to submit the form with. - If the button that's submitted has a `name`it will show up in the params.
fatboypunkforce-pushed
the
marcel/submit-with-button
branch
from
October 21, 2021 11:49
834c5dc to
89cee46Comparecodecov-commenter
commented
Oct 21, 2021
Codecov Report
@@ Coverage Diff @@## marcel/submit-form #94 +/- ##
=======================================================
- Coverage 93.67% 78.53% -15.14%
=======================================================
Files 9 9 Lines 158 191 +33 =======================================================
+ Hits 148 150 +2 - Misses 10 41 +31
Continue to review full report at Codecov.
|
| def submit_form(conn, attrs, entity, test_selector), | ||
| do: dispatch_form(conn, attrs, entity, test_selector) | ||
| @spec submit_form(Plug.Conn.t(), %{}, binary()) :: Plug.Conn.t() |
Collaborator
There was a problem hiding this comment.
Suggested change
| @specsubmit_form(Plug.Conn.t(),%{},binary())::Plug.Conn.t() | |
| @specsubmit_with_button(Plug.Conn.t(),%{},binary())::Plug.Conn.t() |
| input_submit || button_submit | ||
| end | ||
| def text(html_tree), |
Collaborator
There was a problem hiding this comment.
Suggested change
| deftext(html_tree), | |
| defptext(html_tree), |
| def text(html_tree), | ||
| do: html_tree |> Floki.text() |> String.replace(~r/\s+/, " ") |> String.trim() | ||
| defp all_buttons(html_tree) do |
Collaborator
There was a problem hiding this comment.
Suggested change
| defpall_buttons(html_tree)do | |
| defpall_submit_controls(html_tree)do |
or something like it? :p
EasterPeanut
approved these changes
Oct 22, 2021
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.