Owen Leonard
6cb78c4d61
This patch updates a few more pop-up window templates to standardize the markup of footer controls. The patch also updates the way catalog.js triggers the "Add to list" pop-up so that it uses the same window-opening JS function that similar pages do, since the default gives us consistent popup features. To test, apply the patch and perform a catalog search in the staff interface which will return multiple results. - Check the box next to one or more results. - Click the "Add to list" button. - Test the various options here: Add to an existing list, a new list, or choose "More lists." - In each case the pop-up window which appears should have a consistent fixed footer with "Save" and "Cancel" buttons. - Confirm that these controls can be navigated to using the tab key. - Confirm that each one works correctly. - Go to Administration -> Z39.50/SRU servers -> New SRU server. - Click the "Modify" button by the "SRU Search fields mapping" field. - Inspect and test the resulting pop-up window. - Switch the "Record type" dropdown to "Authority," click the "Modify" button again, and test this version of the pop-up window too. Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
114 lines
5 KiB
Text
114 lines
5 KiB
Text
[% PROCESS 'i18n.inc' %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% FILTER collapse %]
|
|
[% t("SRU search field mapping for authorities") | html %] ›
|
|
[% t("Z39.50/SRU servers") | html %] ›
|
|
[% t("Administration") | html %] ›
|
|
[% t("Koha") | html %]
|
|
[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="admin_sru_modmapping" class="admin">
|
|
|
|
<div class="main container-fluid">
|
|
|
|
<main>
|
|
<h1>SRU search field mapping for authorities</h1>
|
|
<form id="form01" method="post">
|
|
<fieldset class="rows">
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<ol>
|
|
<li>
|
|
<label for="srchany">Keyword (any): </label>
|
|
<input id="srchany" type="text" value="[% mapping.srchany | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="nameany">Name (any): </label>
|
|
<input id="nameany" type="text" value="[% mapping.nameany | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authorany">Author (any): </label>
|
|
<input id="authorany" type="text" value="[% mapping.authorany | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authorpersonal">Author (personal): </label>
|
|
<input id="authorpersonal" type="text" value="[% mapping.authorpersonal | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authorcorp">Author (corporate): </label>
|
|
<input id="authorcorp" type="text" value="[% mapping.authorcorp | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="authormeetingcon">Author (meeting/conference): </label>
|
|
<input id="authormeetingcon" type="text" value="[% mapping.authormeetingcon | html %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<ol>
|
|
<li>
|
|
<label for="controlnumber">Control number: </label>
|
|
<input id="controlnumber" type="text" value="[% mapping.controlnumber | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="subject">Subject heading: </label>
|
|
<input id="subject" type="text" value="[% mapping.subject | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="subjectsubdiv">Subject sub-division: </label>
|
|
<input id="subjectsubdiv" type="text" value="[% mapping.subjectsubdiv | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="title">Title (any): </label>
|
|
<input id="title" type="text" value="[% mapping.title | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="uniformtitle">Title (uniform): </label>
|
|
<input id="uniformtitle" type="text" value="[% mapping.uniformtitle | html %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<nav class="navbar navbar-default navbar-fixed-bottom">
|
|
<div class="container-fluid">
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-primary" value="Save" />
|
|
<button class="btn btn-default close_window">Cancel</button>
|
|
</fieldset>
|
|
</div>
|
|
</nav>
|
|
</form>
|
|
|
|
</main>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#form01").submit(function(event) {
|
|
if(window.opener) {
|
|
var newmap=allInputs();
|
|
window.opener.$('#show_sru_fields').val(newmap);
|
|
window.close();
|
|
} else {
|
|
// In this case not called as a popup. Just do nothing.
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
});
|
|
function allInputs () {
|
|
var aInput= new Array();
|
|
$("form :input").each(function() {
|
|
if( this.id && $(this).val() ) {
|
|
aInput.push(this.id+'='+$(this).val());
|
|
}
|
|
});
|
|
return aInput.join(',');
|
|
}
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|