On the borrower record in Files, we store the patron registration form. If a member of staff accidentally hits the delete link, we would need to trace the originally scanned form at its' originating library to recover the file. To make user error more difficult, could Koha have a dialog box, 'Are you sure you want to delete this file', on the borrower record and file?
Created attachment 63691 [details] [review] Bug 18656 - Require confirmation of deletion of files from patron record This patch adds a JavaScript confirm to the deletion of files. It also styles the file deletion link as a Bootstrap button. To test, apply the patch and open the "Files" page for a patron who has files attached. - Verify that clicking any "delete" link prompts for a confirmation. - Verify that confirming the dialog triggers the deletion of the correct file. - Verify that canceling the confirmation dialog aborts the deletion. - Confirm that the "Delete" button looks correct.
Patch tested with a sandbox, by David Roberts <david.roberts@ptfs-europe.com>
Created attachment 63715 [details] [review] Bug 18571: Add default ES configuration to koha-conf-site.xml.in This patch adds a default configuration entry for elasticsearch. It will add localhost:9200 to the server subsection, and koha_instance (replacing instance for the corresponding instance name) for the namespace. To test: - Apply the patch - Copy the file to the /etc/koha dir: $ sudo cp kohaclone/debian/templates/koha-conf-site.xml.in /etc/koha - Create a new instance: $ sudo koha-create --create-db test => SUCCESS: /etc/koha/sites/test/koha-conf.xml includes the mentioned section: <elasticsearch> <server>localhost:9200</server> <index_name>koha_test</index_name> </elasticsearch> - Sign off :-D Note: As the use of ES is syspref driven, this default entry doesn't have any use until ES is installed and SearchEngine set to Elasticsearch. So it doesn't hurt but will help end users test the ES integration. Advanced users will take care of this config entry manually (pointing to external servers/clusters, etc). Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Created attachment 63716 [details] [review] Bug 18571: Add default ES configuration to koha-conf-site.xml.in This patch adds a default configuration entry for elasticsearch. It will add localhost:9200 to the server subsection, and koha_instance (replacing instance for the corresponding instance name) for the namespace. To test: - Apply the patch - Copy the file to the /etc/koha dir: $ sudo cp kohaclone/debian/templates/koha-conf-site.xml.in /etc/koha - Create a new instance: $ sudo koha-create --create-db test => SUCCESS: /etc/koha/sites/test/koha-conf.xml includes the mentioned section: <elasticsearch> <server>localhost:9200</server> <index_name>koha_test</index_name> </elasticsearch> - Sign off :-D Note: As the use of ES is syspref driven, this default entry doesn't have any use until ES is installed and SearchEngine set to Elasticsearch. So it doesn't hurt but will help end users test the ES integration. Advanced users will take care of this config entry manually (pointing to external servers/clusters, etc). Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: David Roberts <david.roberts@ptfs-europe.com> https://bugs.koha-community.org/show_bug.cgi?id=18656 Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Hi David, the wrong patch got attached, I am reverting this. Do you want to try again?
If it's not working from the sandboxes I can attach a patch with your sign-off line, just let me know.
Created attachment 63723 [details] [review] Bug 18656 - Require confirmation of deletion of files from patron record This patch adds a JavaScript confirm to the deletion of files. It also styles the file deletion link as a Bootstrap button. To test, apply the patch and open the "Files" page for a patron who has files attached. - Verify that clicking any "delete" link prompts for a confirmation. - Verify that confirming the dialog triggers the deletion of the correct file. - Verify that canceling the confirmation dialog aborts the deletion. - Confirm that the "Delete" button looks correct. Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Katrin, I hope that's working better now. No idea what went wrong last time.
String changes.
Owen, should not we prefer $(elt).on('click', function(){}); ?
Created attachment 64159 [details] [review] Bug 18656 - Require confirmation of deletion of files from patron record This patch adds a JavaScript confirm to the deletion of files. It also styles the file deletion link as a Bootstrap button. To test, apply the patch and open the "Files" page for a patron who has files attached. - Verify that clicking any "delete" link prompts for a confirmation. - Verify that confirming the dialog triggers the deletion of the correct file. - Verify that canceling the confirmation dialog aborts the deletion. - Confirm that the "Delete" button looks correct. Signed-off-by: David Roberts <david.roberts@ptfs-europe.com> Revision for QA: Replaced '.click(function' with '.on("click",function'
(In reply to Jonathan Druart from comment #12) > Owen, should not we prefer > $(elt).on('click', function(){}); Unless you need the additional parameters offered by on() it's mostly a stylistic question because they are functionally equivalent. However, I do prefer the on() syntax so it is worth correcting my cut-and-paste.
Created attachment 64201 [details] [review] Bug 18656 - Require confirmation of deletion of files from patron record This patch adds a JavaScript confirm to the deletion of files. It also styles the file deletion link as a Bootstrap button. To test, apply the patch and open the "Files" page for a patron who has files attached. - Verify that clicking any "delete" link prompts for a confirmation. - Verify that confirming the dialog triggers the deletion of the correct file. - Verify that canceling the confirmation dialog aborts the deletion. - Confirm that the "Delete" button looks correct. Signed-off-by: David Roberts <david.roberts@ptfs-europe.com> Revision for QA: Replaced '.click(function' with '.on("click",function' Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.01 Enable EnableBorrowerFiles to test. Looks like an enhancement but since it protects from loosing datas its a real bug.
This patch has been pushed to 16.11.x and will be in 16.11.09. Agree with Fridolin - this one makes sense in stable.
Pushed to 16.05.x, for 16.05.15 release