Bug 18007: Interface updates to notices and notice previews
commit4c14c4998dc7eeb79a02911d8ed37db5393f3de8
authorOwen Leonard <oleonard@myacpl.org>
Fri, 13 Apr 2018 11:43:21 +0000 (13 11:43 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 Apr 2018 17:07:27 +0000 (16 14:07 -0300)
tree6b7fe1a95e6764ec095ba5998f3f6f925c7578ba
parent84fe9a2adeafb7d0393779bcfafdbd49e25736dd
Bug 18007: Interface updates to notices and notice previews

This patch makes changes to the form for adding and editing notices, and
to the template for viewing a rendered preview of notices.

- Preview now shows side-by-side comparisons
- JavaScript has been movied out of template into separate file
- Validation of the add/edit form improved through use of validation
  plugin

To test, apply the patch on top of those for Bug 17981

- Add a new notice.
  - Confirm that the form can't be submitted without data in the "code"
    and "name" fields.
  - Confirm that the form can't be submitted without filling in at least
    one message template (subject and body).
  - Confirm that you cannot submit the form while using an
    existing notice code.
  - Follow Bug 17981's test plan for testing the preview function.
    Confirm that the preview loads correctly and looks correct.
    - Test both with old syntax messages which require conversion and
      messages in template-toolkit syntax.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed conflicts caused by bug 20538.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt
koha-tmpl/intranet-tmpl/prog/js/letter.js [new file with mode: 0644]