Bug 27929: (QA follow-up) Hide tag editor on regex

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2021-06-11 17:44:01 +00:00 committed by Kyle M Hall
parent 6f3b78d609
commit a2f8ba3112

View file

@ -395,15 +395,18 @@
$('a[name="field_regex"]').click(function() {
var id = $(this).attr('id');
var editor = $(this).parent().find("[name='field_value']");
var tag_editor = $(this).parent().find(".buttonDot");
var regex = $(this).parent().find("[name='regex_fields']");
var disable_input = $(this).parent().find("[name='disable_input']");
if ($(this).html() == 'RegEx') {
$(editor).hide();
$(regex).show();
$(tag_editor).hide();
$(this).html('Text');
$(disable_input).prop('disabled', true);
} else {
$(editor).show();
$(tag_editor).show();
$(regex).hide();
$(this).html('RegEx');
$(disable_input).prop('disabled', false);