Bug 33624: Hide the "list" tab if authority is selected
The "Select a list of records" should only be available for biblio records. But if the page is accessed using the back button of the browser it will be displayed for authorities as well. Test plan: - Make sure you have at least one template for MARC Modification - Also make sure you have at least one list of biblio records - navigate to Cataloging -> Batch record modification - Check the "Authorities" radio button - Select your template and continue - No records were modified -> use your browser's Back button to go back one page - The "Authorities" radio button should still be selected => Without this patch you see the tab "Select a list of records" => With this patch applied it's hidden when the page is loaded Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
4ad0e757d8
commit
c87b1bba1b
1 changed files with 12 additions and 7 deletions
|
@ -285,16 +285,21 @@
|
|||
[% INCLUDE 'datatables.inc' %]
|
||||
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
|
||||
<script>
|
||||
function update_tab_display(){
|
||||
let selected_type = $('input[name="recordtype"]:checked').val();
|
||||
if (selected_type == 'authority') {
|
||||
$("a[href='#shelves_tab_panel']").parent().hide();
|
||||
$("a[href='#uploadfile_tab_panel']").tab("show");
|
||||
} else if (selected_type == 'biblio') {
|
||||
$("a[href='#shelves_tab_panel']").parent().show();
|
||||
$("a[href='#uploadfile_tab_panel']").tab("show");
|
||||
}
|
||||
}
|
||||
$(document).ready(function() {
|
||||
|
||||
update_tab_display();
|
||||
$("input[type='radio']").click(function() {
|
||||
if ($(this).attr('id') == 'authority_type') {
|
||||
$("a[href='#shelves_tab_panel']").parent().hide();
|
||||
$("a[href='#uploadfile_tab_panel']").tab("show");
|
||||
} else if ($(this).attr('id') == 'biblio_type') {
|
||||
$("a[href='#shelves_tab_panel']").parent().show();
|
||||
$("a[href='#uploadfile_tab_panel']").tab("show");
|
||||
}
|
||||
update_tab_display();
|
||||
});
|
||||
|
||||
$("#selectall").click(function(e){
|
||||
|
|
Loading…
Reference in a new issue