Skip to content
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

feature/Alert user when leaving page with un submit form. #705

Merged
merged 6 commits into from
May 10, 2019

Conversation

ibelar
Copy link
Contributor

@ibelar ibelar commented May 10, 2019

Alert user when leaving page with un submit form data.

$app->add(['Form', 'canLeave' => false]);

Screen Shot 2019-05-09 at 8 33 42 PM

@romaninsh
Copy link
Member

romaninsh commented May 10, 2019

does this also apply on regular as well as multi-line form?

Copy link
Member

@romaninsh romaninsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@romaninsh
Copy link
Member

@ibelar this breaks test-scripts.. ..

Copy link
Member

@romaninsh romaninsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaks selenium...

@codecov
Copy link

codecov bot commented May 10, 2019

Codecov Report

Merging #705 into develop will decrease coverage by 25.46%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff               @@
##             develop     #705       +/-   ##
==============================================
- Coverage      68.75%   43.28%   -25.47%     
- Complexity      2046     2051        +5     
==============================================
  Files            106      106               
  Lines           4813     4969      +156     
==============================================
- Hits            3309     2151     -1158     
- Misses          1504     2818     +1314
Impacted Files Coverage Δ Complexity Δ
src/Form.php 68.34% <ø> (-6.48%) 66 <0> (+1)
src/FormField/Generic.php 45.83% <0%> (-49.63%) 11 <2> (ø)
src/AccordionSection.php 0% <0%> (-100%) 3% <0%> (ø)
src/HelloWorld.php 0% <0%> (-100%) 1% <0%> (ø)
src/Layout/Centered.php 0% <0%> (-100%) 1% <0%> (ø)
src/FormField/Radio.php 0% <0%> (-100%) 16% <0%> (ø)
src/FormField/Money.php 0% <0%> (-100%) 6% <0%> (ø)
src/Columns.php 0% <0%> (-100%) 10% <0%> (ø)
src/TableColumn/Password.php 0% <0%> (-100%) 1% <0%> (ø)
src/FormLayout/Section/Generic.php 0% <0%> (-100%) 1% <0%> (ø)
... and 73 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4e73ce...60dfa31. Read the comment docs.

@codecov
Copy link

codecov bot commented May 10, 2019

Codecov Report

Merging #705 into develop will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop     #705     +/-   ##
============================================
+ Coverage      68.75%   68.85%   +0.1%     
- Complexity      2046     2047      +1     
============================================
  Files            106      106             
  Lines           4813     4819      +6     
============================================
+ Hits            3309     3318      +9     
+ Misses          1504     1501      -3
Impacted Files Coverage Δ Complexity Δ
src/Form.php 74.82% <ø> (ø) 66 <0> (+1) ⬆️
src/FormField/Radio.php 100% <100%> (ø) 16 <2> (ø) ⬇️
src/FormField/Generic.php 95.83% <100%> (+0.37%) 11 <2> (ø) ⬇️
src/FormField/Calendar.php 84.61% <100%> (+1.28%) 10 <3> (ø) ⬇️
src/TableColumn/Status.php 82.35% <0%> (+8.82%) 12% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4e73ce...a04dd21. Read the comment docs.

ibelar and others added 2 commits May 9, 2019 21:35
update onChange declaration
@ibelar ibelar requested a review from romaninsh May 10, 2019 01:48
@ibelar
Copy link
Contributor Author

ibelar commented May 10, 2019

@romaninsh - I added change to fix test. Yes, may be used on all form. Form using Calendar field might not detect changed on these field.

@romaninsh romaninsh merged commit 66a0284 into develop May 10, 2019
@romaninsh romaninsh deleted the feature/form-unload branch May 10, 2019 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants