@@ -, +, @@
- 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
- There is now better visual feedback for AJAX form checks
- 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.
---
.../intranet-tmpl/prog/en/modules/tools/letter.tt | 273 +++------------------
.../prog/en/modules/tools/preview_letter.tt | 58 +++--
koha-tmpl/intranet-tmpl/prog/js/letter.js | 182 ++++++++++++++
3 files changed, 262 insertions(+), 251 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/js/letter.js
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
@@ -4,218 +4,26 @@
Koha › Tools › Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %]
[% INCLUDE 'doc-head-close.inc' %]
+
[% INCLUDE 'datatables.inc' %]
+ var no_op_set = '[% no_op_set %]';
+ var interface = '[% interface %]';
+ var theme = '[% theme %]';
+ var add_form = '[% add_form %]';
+ var copy_form = '[% copy_form %]';
+ var code = '[% code %]';
+ var new_lettercode = '[% new_lettercode %]';
+ var new_branchcode = '[% new_branchcode %]';
+ var MSG_CODE_EXISTS = _("A default letter with the code '%s' already exists.");
+ var MSG_CODE_EXISTS_FOR_LIBRARY = _("A letter with the code '%s' already exists for '%s'.");
+ var MSG_EMPTY_TITLE_AND_CONTENT = _("Please specify title and content for %s");
+ var MSG_EMPTY_TEMPLATES = _("Please fill at least one template.");
+ var MSG_LOADING = _("Loading");
+
+
[% INCLUDE 'header.inc' %]
@@ -244,8 +52,8 @@ $(document).ready(function() {
[% IF add_form or copy_form %]