This patch removes event attributes from several tool-related templates.
Events are defined instead in the JavaScript.
To test, apply the patch and:
- Go to Tools -> Label creator -> Manage -> Layouts and edit any layout.
- In the "Font" setting, choose any font which includes the word
"italic" or "oblique" in the name. Doing so should disable the
"Oblique title" checkbox.
- Go to Tools -> Batch patron deletion/anonymization.
- Submit the form without making any changes. You should be prompted
to select an action.
- Go to Tools -> Inventory.
- Select a batch of barcodes to upload.
- Submit the form without selecting any filters. This should trigger a
warning.
- Also changed: Added Font Awesome icons to the "Select all" and
"Clear all" links on the inventory results view.
- Go to Tools -> Notices and Slips.
- Click "New notice"
- Change the selection under "Koha module." The page should reload
with the correct available message body fields. For instance,
selecting "Holds" should make available reserves.* columns.
- Go to Tools -> Upload.
- In the search form, enter a search term and click the 'Search'
button. The form should submit.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Event attributes removed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Label creator › Layouts › [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
- <script type="text/JavaScript" language="JavaScript">
+ <script type="text/JavaScript">
//<![CDATA[
$(document).ready(function() {
$("input[name='layout_choice']").change( function() { layout_method() } );
layout_method();
+ $("#font").on("change",function(){
+ checkOblique();
+ });
});
function layout_method() {
if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
</li>
<li>
<label for="font">Font: </label>
- <select name="font" id="font" onchange="checkOblique()">
+ <select name="font" id="font">
[% FOREACH font_type IN font_types %]
[% IF ( font_type.selected ) %]
<option value="[% font_type.type %]" selected="selected">[% font_type.name %]</option>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript">
-// <![CDATA[
+ $(document).ready(function(){
+ $("#delete_patrons_form").on("submit",function(){
+ return checkForm( this );
+ });
+ });
/**
* checkForm(form)
* This function check the form is correctly filled.
}
if((form.checkbox[1].checked)){
if(!(form.date2.value)){
- alert(_("please enter a date!"));
+ alert(_("Please enter a date!"));
return false;
}
}
}
return true;
}
-
- /**
- * checkForm2(form)
- * This function check the form2 is correctly filled.
- */
- function checkForm2(form) {
- return true;
- }
-
- $(document).ready(function() {
- $('#selectlibrary').find("input:submit").hide();
- $('#branch').change(function() {
- $('#selectlibrary').submit();
- });
- });
- // ]]>
</script>
</head>
<p>This tool allows you to delete patrons and anonymize checkout history. For deleting patrons, any combination of limits can be used.</p>
</div>
<div id="step1">
- <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
+ <form name="f1" id="delete_patrons_form" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
<fieldset>
<legend>Delete patrons</legend>
<h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Verify you want to delete patrons</label></h3>
[% IF step == 2 %]
<!-- STEP 2 START -->
<div id="step2">
- <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);">
+ <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
<fieldset>
<legend>Warnings</legend>
<ul>
$(".checkboxed").unCheckCheckboxes();
return false;
});
+ $("#inventory_form").on("submit",function(){
+ return checkForm();
+ });
});
//]]>
</script>
[% END %]
[% UNLESS op %]
<div class="yui-g">
- <form method="post" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data" onsubmit="return checkForm()">
+ <form method="post" id="inventory_form" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
<fieldset class="rows">
<legend>Use a barcode file</legend>
<ol>
<input type="hidden" name="datelastseen" value="[% datelastseen %]" />
[% UNLESS compareinv2barcd %]
- <div><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
+ <div><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div>
[% END %]
<table id="inventoryt">
</table>
<div class="spacer"></div>
[% UNLESS compareinv2barcd %]
- <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
+ <div style="padding : .3em 0"><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div>
<input type="submit" id="markseenandquit" value="Mark seen and quit" />
<input type="submit" value="Mark seen and continue >>" id="markseenandcontinuebutton" />
<input type="submit" value="Continue without marking >>" id="continuewithoutmarkingbutton" class="submit" />
});
[% END %]
+ $("#newmodule").on("change",function(){
+ if( $("#branch").val() == ""){
+ var branchcode = "*";
+ } else {
+ var branchcode = $("#branch").val();
+ }
+ window.location.href = "/cgi-bin/koha/tools/letter.pl?op=add_form&module=" + $(this).val() + "&branchcode=" + branchcode;
+ });
+
$("#submit_form").click( function(event) {
event.preventDefault();
var at_least_one_exists = 0;
<label for="module">Koha module:</label>
<input type="hidden" name="oldmodule" value="[% module %]" />
[% IF adding %]
- <select name="module" id="module" onchange="javascript:window.location.href = unescape(window.location.pathname)+'?op=add_form&module='+this.value+'&content='+window.document.forms['Aform'].elements['content'].value;">
+ <select name="module" id="newmodule">
[% ELSE %]
<select name="module" id="module">
[% END %]
[% BLOCK newsearch %]
<form id="newsearch">
<fieldset class="action">
- <button onclick="SubmitMe('new'); return false;">New search</button>
+ <button id="new_search">New search</button>
</fieldset>
</form>
[% IF plugin %]
var record_id = $(this).data("record-id");
DeleteEntry( record_id );
});
+ $("#new_search").on("click",function(e){
+ e.preventDefault();
+ SubmitMe('new');
+ });
});
//]]>
</script>