Bug 16944: Add "email" and "url" classes when edit or create a vendor
authorHector Castro <hector.hecaxmmx@gmail.com>
Tue, 19 Jul 2016 20:58:58 +0000 (14:58 -0600)
committerFrédéric Demians <f.demians@tamil.fr>
Tue, 23 Aug 2016 10:25:19 +0000 (12:25 +0200)
commit3b4564001d571304490fe81dbd92e656fc9ad53e
tree59db39a8446fe091fb5e070613cd7b501f0c71ee
parente091cab5031a21a7a85dc32a52e9ae89fcc74caa
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 71d20a8c3b48a4dd1c7fb569b3baf2352d9757ac)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt