Bug 16944 - Add "email" and "url" classes when edit or create a vendor
Summary: Add "email" and "url" classes when edit or create a vendor
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Héctor Eduardo Castro Avalos
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-19 20:56 UTC by Héctor Eduardo Castro Avalos
Modified: 2017-12-07 22:18 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16944: Add "email" and "url" classes when edit or create a vendor (3.02 KB, patch)
2016-07-19 21:15 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16944: Add "email" and "url" classes when edit or create a vendor (3.16 KB, patch)
2016-07-20 03:47 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 16944: Add "email" and "url" classes when edit or create a vendor (3.21 KB, patch)
2016-07-25 13:00 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Héctor Eduardo Castro Avalos 2016-07-19 20:56:21 UTC
When edit or create a new vendor the two fields email and website don't test if the data provided is right. When you add and direction like "koha-community.org" without the protocol "https" the program redirect to an 404 error.
Comment 1 Héctor Eduardo Castro Avalos 2016-07-19 21:15:53 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2016-07-20 03:47:56 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-07-25 13:00:34 UTC
Created attachment 53683 [details] [review]
Bug 16944: Add "email" and "url" classes when edit or create a vendor

When edit or create a new vendor the two fields "email" and "website" don't test
if the data provided is right. When you add a direction like
"koha-community.org" without the protocol "https" the program redirect to an
404 error.

To reproduce the issue:
1-Go to Acquisition and create a new Vendor
2-Fill the field Website with koha-community.org
3-Use an email without at sing (@)
4-Notice that there is no error
5-Save
6-Go to the vendor created (/cgi-bin/koha/acqui/supplier.pl?booksellerid=1)
7-Click in Website: koha-community.org -> redirect to an 404 error
8-Notice the bad mailto:

To test:
-Apply patch
-Reproduce step 1 to 8 with the same vendor or create a new one
-Enter multiple wrong and valid urls
-Enter urls with and without protocols http, https, ftp
-Enter wrong and valid emails

NOTE: The classes used are taken from 'branches.tt'
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
no longer allows entering of improper website urls or incomplete email addresses.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Kyle M Hall 2016-08-10 14:19:21 UTC
Pushed to master for 16.11, thanks Hector!
Comment 5 Frédéric Demians 2016-08-23 10:18:24 UTC
Pushed in 16.05. Will be in 16.05.03.
Comment 6 Julian Maurice 2016-08-24 10:01:40 UTC
Pushed to 3.22.x, will be in 3.22.10