This module help site builder or developer to add "Custom JS confirm box" to form
used within site, when user fills form and without complete it want redirect from
that page, Shows the confirm box with warns to save form or leave the page.
Project home page : JS confirm Pop Up
Git clone command:
1. git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sandipauti11/2680965.git js_confirm_pop_up
2. cd js_confirm_pop_up
Manual review of other projects:
1. https://www.drupal.org/node/2701911#comment-11085529
2. https://www.drupal.org/node/2686277#comment-10982283
3. https://www.drupal.org/node/2654016#comment-10982153
4. https://www.drupal.org/node/2668878#comment-10949585
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | drupalcs-js_confirm_pop_up.txt | 3.87 KB | leanderl |
Comments
Comment #2
PA robot commentedGit clone command for the sandbox is missing in the issue summary, please add it.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
sandipauti commentedAdding Git clone command and project home Page
Comment #4
sandipauti commentedComment #5
sandipauti commentedComment #6
sandipauti commentedComment #7
sandipauti commentedComment #8
sandipauti commentedComment #9
sandipauti commentedComment #10
sandipauti commentedComment #11
sourabhutani commentedManual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #12
sandipauti commented@sourabhutani
Thanks for your review, I will look into it.
Comment #13
sandipauti commentedDone with all the required changes.
1. Format source code according to Drupal coding standard
2. Replace variable to avoid name collision.
Thanks,
Comment #14
abhiklpm commentedPlease add configuration link in the module listing page, otherwise we will not be able to navigate to the config page with out url.
eg: configure = admin/config/user-interface/jsconfirmpopup in your info file
Comment #15
sandipauti commentedHey abhiklpm,
Fix added configuration link to info file.
Comment #16
sandipauti commentedComment #17
sandipauti commentedComment #18
marabak commentedHi,
1 - I don't understand why in your settings form you have two fields with two variables set :
js_confirm_pop_up_confirm_form_id and js_confirm_pop_up_actual_form_id
As i read your main function in your module :
i think the first variable is for the php and the second for the javascript - but it is unnesessary. You should have only one variable js_confirm_pop_up_confirm_form_id and in your form_alter function you should for instance add a special class to your form tag in order to make it detectable by your script :
Then in your javascript you just need to detect any form with the ''js-confirm-pop-up' class.
2 - I think you should check if the form really changed. If i edit a field in the form and then cancel my changes by typing exactly the same i still have the popup displayed.
Maybe you should store in the attach function all the inputs state and then compare it to the form state when the user is leaving.
Comment #19
marabak commentedYou have also an encoding problem in your README.txt file
Comment #20
harish b commentedEDIT: removed long pareview.sh dump, see http://pareview.sh/
Comment #21
leanderl commentedThis is a manual review...
Manual Review
No particluar issues were found. Issues identified by @sourabhutani in comment #11 seem to have been solved.
This review uses the Project Application Review Template.
Comment #22
klausiMinor coding standard errors are not application blockers. Anything else that you found or should this be RTBC instead?
Comment #23
leanderl commented@klausi – are you asking me? If so, I would have wished for slightly clearer instructions on how to try it out and how to find the form #ID's. Had to fiddle around for a while before I got it to "kick in". It also seems the comma separated list of form #ID's doesn't tolerate spaces like:
my_form_id1, my_form_id2this has to be
my_form_id1,my_form_id2Perhaps a trim function or similar could be added when grabbing the variables to allow for space after comma.
Comment #24
harish b commentedEDIT: removed long pareview.sh dump, see http://pareview.sh/
Comment #25
klausiMinor coding standard errors are not application blockers, please do a real manual review.
Comment #26
sandipauti commented@leanderl - You should add comma(,) separated form id's here.
Comment #27
leanderl commented@sandipauti Yes, it works very well, but it may be even nicer if one could also have a blank space after the comma like this:
form_id2, form_id2, form_id3when I tried the module it would only work if formated it like this:
form_id2,form_id2,form_id3The reason is simply that I'm used to adding a blank space after a comma. So it is more an ease-of-use question and not a major thing...
Comment #28
sandipauti commented@marabak,
Thanks for review, I have optimize js_confirm_pop_up_form_alter() function, So now only one field to add js_confirm_pop_up_actual_form_id
Added JS directory for JS file.
Comment #29
sandipauti commented@marabak
Fix "README.txt" encoding problem, review.
Thanks
Comment #30
leanderl commentedAutomated review
See attached file for formatting errors drupalcs-js_confirm_pop_up.txt
Manual review
The js-file doesn't load correctly:
GET http://loc.drupal7.dev/sites/all/modules/js_confirm_pop_up/js_confirm_pop_up.js?o44kzr 404 (Not Found)This is due to line 43 in js_confirm_pop_up.module not having the correct path.
drupal_add_js(drupal_get_path('module', 'js_confirm_pop_up') . '/js_confirm_pop_up.js');Should be
drupal_add_js(drupal_get_path('module', 'js_confirm_pop_up') . '/js/js_confirm_pop_up.js');Either that or the js-file should be moved into the module's root directory
Comment #31
sandipauti commented@leanderl,
Thanks for review, I have updated same for in my code.
Comment #32
abu-zakham commentedHello sandipauti,
I didn't find any bug in your module, just you need to fix automated review report errors.
http://pareview.sh/pareview/httpgitdrupalorgsandboxsandipauti112680965git
Regards
Comment #33
sandipauti commented@Abdulla Abu-Zakham
Thanks for your review, Done with all automated review fixes.
Regards,
Comment #34
sandipauti commentedComment #35
klausiPlease don't RTBC your won issues, see the workflow: https://www.drupal.org/node/532400
Comment #36
sandipauti commented@klausi,
Thanks for information, It is done by mistake.
Regards
Comment #37
sandipauti commentedComment #38
sandipauti commentedComment #39
th_tushar commentedHi @sandipauti,
I have manually reviewed your code, Below are the findings,
package= Customcan be removed as it would be a contrib module after promoting to full project.There are a lot of examples available on https://www.drupal.org/node/1182224.
Removed the review bonus tag as you have not manually reviewed the modules.
Comment #40
sandipauti commentedHey th_tushar,
Thanks for your manual review, I had fixed all the stuff you mentioned above, Please review.
Thanks
Comment #41
sandipauti commentedComment #42
th_tushar commentedHi sandipauti,
As per comment #39, please don't remove the single project promote tag.
Comment #43
th_tushar commentedAs you also not reviewed other project application, removing the review bonus tag. Please review three other projects in the issue queue and update them in your issue description.
Comment #44
th_tushar commentedAdding the proper single project promotion tag.
Comment #45
sandipauti commentedComment #46
braindrift commentedHi sandipauti,
very nice module, thanks.
In your js_confirm_pop_up_form_alter() you check for the existance of
$form['#attributes']['class']and then you are setting$form['#attributes'] = array('class' => array('js-confirm-pop-up'));. What happens if only the class attribute is not set but other attributes? You are deleting all the other attributes that might exist.Best regards
Comment #47
braindrift commentedComment #48
sandipauti commentedHi @braindrift,
Thanks for review, I had updated my code as per your comment.
Thanks,
Comment #49
sandipauti commentedComment #50
sandipauti commentedHi Team,
When i can promote this as single project
Comment #51
sandipauti commentedHi Team,
When i can promote this as single project
Comment #52
sandipauti commentedHey team what is actual status of this project, As per th_tushar comment when i can promote this as single project or not else need to close this issue ?
Comment #53
sandipauti commentedComment #54
asiby commentedHow is this module different from the following:
Node Edit Protection (either for D6 or D7).
SaveGuard (either for D6 or D7).
Dirty Forms (only an official release for D6, though for D7 there seems to be a trustworthy patch available also).
Source: http://drupal.stackexchange.com/a/160002/11723
Comment #55
th_tushar commented@sandipauti, please don't remove the tags already added.
Comment #56
ashwinshHello Sandip,
Your module looks good. But there are some minor errors reported by automated review tools, did you check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxsandipauti112680965git
Regards,
Comment #57
naveenvalechaAutomated Review :
http://pareview.sh/pareview/httpgitdrupalorgsandboxsandipauti112680965gi...
Manual Review :
Drupal.js_confirm_pop_up = {};Why you need this variable ? where are you using it ?Wrong file doc.it should be Main module file.
Nothing blocker found. Looks good to me.
Assigning to klausi to give it a second look when he will get time.
Comment #58
sandipauti commentedHey @naveenvalecha, @ashwin.shaharkar
Thanks for reviewing my module, As you both mentioned i had fix all bugs
Automated preview here:
http://pareview.sh/pareview/httpgitdrupalorgsandboxsandipauti112680965gi...
Thanks
Comment #59
klausiThank you for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).
manual review:
Otherwise looks good to me. I think with the javascript this is just about our code limit, so I think we can approve you.
Thanks for your contribution, Sandip!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #60
sandipauti commentedThank you klausi, All project reviewer for there guidence...thank you all
Comment #61
sandipauti commentedHey @klausi,
I had promote my sandbox project to full project but it still not showing download packages on project home page.
It show following error
Packaging error messages
Git clone failed:
fatal: remote error: access denied or repository not exported: /project/2680965.git
Initialized empty Git repository in /tmp/drush_tmp_1464858840_574ff8d8255f7/clone/.git/
It will great if some one help me to solve out this git issue.
Thanks
Comment #62
klausiAh, that problem again, see #2726599: Sandbox repositories are occasionally not fully promoted & Git events are sometimes not recorded.
Comment #63
sandipauti commented@klausi,
Thanks for quick response.