Bug 12740 - Data Validation followup
authorMark Tompsett <mtompset@hotmail.com>
Sat, 20 Sep 2014 12:01:36 +0000 (08:01 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Sat, 11 Oct 2014 14:52:07 +0000 (11:52 -0300)
commit0515c0698574418f6b53647094c0f59f28236104
treefd21741c831212c53c5694bb2b930750ac94eaee
parentef9a552023fde579a1c0aa8ea9d6bcb37b96f09f
Bug 12740 - Data Validation followup

Added server-side validation and feedback to Koha news.

TEST PLAN
---------
1) Log in to staff client as someone who can add news
2) Paste a variation of the ugly following URL into your
   address bar:

https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new=

   -- A blank news item is added without warning!
3) Apply patch
4) Repeat step 2
   -- "ERROR: Required news title missing!" is displayed
      and no blank news is added
5) run koha qa test tools

Followed test plan, Error message appears as expected, qa test tool: OK
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
tools/koha-news.pl