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:
parent
6f3b78d609
commit
a2f8ba3112
1 changed files with 3 additions and 0 deletions
|
@ -395,15 +395,18 @@
|
||||||
$('a[name="field_regex"]').click(function() {
|
$('a[name="field_regex"]').click(function() {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var editor = $(this).parent().find("[name='field_value']");
|
var editor = $(this).parent().find("[name='field_value']");
|
||||||
|
var tag_editor = $(this).parent().find(".buttonDot");
|
||||||
var regex = $(this).parent().find("[name='regex_fields']");
|
var regex = $(this).parent().find("[name='regex_fields']");
|
||||||
var disable_input = $(this).parent().find("[name='disable_input']");
|
var disable_input = $(this).parent().find("[name='disable_input']");
|
||||||
if ($(this).html() == 'RegEx') {
|
if ($(this).html() == 'RegEx') {
|
||||||
$(editor).hide();
|
$(editor).hide();
|
||||||
$(regex).show();
|
$(regex).show();
|
||||||
|
$(tag_editor).hide();
|
||||||
$(this).html('Text');
|
$(this).html('Text');
|
||||||
$(disable_input).prop('disabled', true);
|
$(disable_input).prop('disabled', true);
|
||||||
} else {
|
} else {
|
||||||
$(editor).show();
|
$(editor).show();
|
||||||
|
$(tag_editor).show();
|
||||||
$(regex).hide();
|
$(regex).hide();
|
||||||
$(this).html('RegEx');
|
$(this).html('RegEx');
|
||||||
$(disable_input).prop('disabled', false);
|
$(disable_input).prop('disabled', false);
|
||||||
|
|
Loading…
Reference in a new issue