@@ -, +, @@ errors and messages - Create a record in both the cataloging and authorities editors which will trigger a duplicate warning. - Click the link to the existing record. A separate window should pop up. - In both editors try each option: - Confirm the duplicate and go to the existing record. - Deny that the record is duplicate and continue to save. --- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 9 ++- .../prog/en/modules/authorities/authorities.tt | 80 +++++++++++--------- .../prog/en/modules/cataloguing/addbiblio.tt | 2 +- 3 files changed, 52 insertions(+), 39 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -101,4 +101,11 @@ jQuery.fn.preventDoubleFormSubmit = function() { else this.beenSubmitted = true; }); -}; +}; + +function openWindow(link,name,width,height) { + name = (typeof name == "undefined")?'popup':name; + width = (typeof width == "undefined")?'600':width; + height = (typeof height == "undefined")?'400':height; + var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); +} --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -520,6 +520,31 @@ function searchauthority() { opacity: 0.8 }); })(); + $(document).ready(function() { + yuiToolbar(); + $("#addauthc,#action").empty(); + }); + // YUI Toolbar Functions + function yuiToolbar() { + var addauthButton = new YAHOO.widget.Button({ + id: "addauth", + type: "button", + label: "Save", + container: "addauthc", + onclick: {fn: Check } + }); + var addauthButton2 = new YAHOO.widget.Button({ + id: "addauth2", + type: "button", + label: "Save", + container: "action", + onclick: {fn: Check } + }); + } + function confirmnotdup(redirect){ + $("#confirm_not_duplicate").attr("value","1"); + Check(); + } //]]> [% INCLUDE 'header.inc' %] @@ -536,53 +561,34 @@ function searchauthority() {

Modify authority #[% authid %] [% authtypetext %]

[% ELSE %]

Adding authority [% authtypetext %]

-[% END %] +[% END %] + +[% IF ( duplicateauthid ) %] +
+

Duplicate record suspected

+

Is this a duplicate of [% duplicateauthvalue %]?

+ +
+ + +
+
+ +
+
+[% END %] +
+
-
-[% IF ( duplicateauthid ) %] -
-

Duplicate suspected with [% duplicateauthvalue %]

-

You must either :

- -
-[% END %] -