Owen Leonard
10694092dd
This patch removes the use of event attributes in the markup in favor of attaching events in JavaScript. This patch also revises the SRU search fields mapping template considerably while correcting multiple HTML validation issues: - Corrected label/id pairs. - Corrected incorrect capitalization. - Removed redundant <legend> - Restructured form so that it displays in two columns. Also changed in the z3950 servers template: Replaced empty [% script_name %] variable with actual path. To test, apply the patch and go to Administration -> Z39.50/SRU servers/ - In the list of servers, select Actions -> Delete. You should be prompted to confirm your choice. Test both confirming and cancelling. - Create or edit an SRU server. - After entering text in the server name field, moving to the next field should trigger transformation of that text to upper case. - On the SRU Search fields mapping line, clicking the "Modify" button should trigger a popup. - In the "Modify SRU search fields mapping" popup: - The fields should display in two columns. - All labels should be correctly associated with corresponding inputs. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
98 lines
3.9 KiB
Text
98 lines
3.9 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › SRU search fields mapping</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(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>
|
|
</head>
|
|
|
|
<body id="admin_sru_modmapping" class="admin">
|
|
|
|
<div id="custom-doc" class="yui-t7">
|
|
|
|
<div id="bd">
|
|
<h1>Modify SRU search fields mapping</h1>
|
|
<form id="form01" method="post">
|
|
<fieldset class="rows">
|
|
<div class="yui-g">
|
|
<div class="yui-u first">
|
|
<ol>
|
|
<li>
|
|
<label for="title">Title: </label>
|
|
<input id="title" type="text" value="[% mapping.title %]" />
|
|
</li>
|
|
<li>
|
|
<label for="isbn">ISBN: </label>
|
|
<input id="isbn" type="text" value="[% mapping.isbn %]" />
|
|
</li>
|
|
<li>
|
|
<label for="lccall">LC call number: </label>
|
|
<input id="lccall" type="text" value="[% mapping.lccall %]" />
|
|
</li>
|
|
<li>
|
|
<label for="controlnumber">Control number: </label>
|
|
<input id="controlnumber" type="text" value="[% mapping.controlnumber %]" />
|
|
</li>
|
|
<li>
|
|
<label for="srchany">Any: </label>
|
|
<input id="srchany" type="text" value="[% mapping.srchany %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="yui-u">
|
|
<ol>
|
|
<li>
|
|
<label for="author">Author: </label>
|
|
<input id="author" type="text" value="[% mapping.author %]" />
|
|
</li>
|
|
<li>
|
|
<label for="issn">ISSN: </label>
|
|
<input id="issn" type="text" value="[% mapping.issn %]" />
|
|
</li>
|
|
<li>
|
|
<label for="subject">Subject: </label>
|
|
<input id="subject" type="text" value="[% mapping.subject %]" />
|
|
</li>
|
|
<li>
|
|
<label for="dewey">Dewey: </label>
|
|
<input id="dewey" type="text" value="[% mapping.dewey %]" />
|
|
</li>
|
|
<li>
|
|
<label for="stdid">Standard ID: </label>
|
|
<input id="stdid" type="text" value="[% mapping.stdid %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" value="Save" class="submit" />
|
|
<a class="close cancel" href="#">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|