Bug 22389: (bug 15836 follow-up) Add Delete regex links on creating splitting source

The "Delete" link does not exist when the form is empty.

Test plan:
Create a new classification splitting source
Select "Regex" for routine
=> The delete link does not appear (you cannot remove if there is only
one input)
=> It a regex
=> The 2 delete links appear

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-02-21 13:42:30 -03:00 committed by Nick Clemens
parent ba7c3f51cc
commit 63c5a813c9
1 changed files with 2 additions and 0 deletions

View File

@ -254,6 +254,7 @@
[% ELSE %]
<div class="split_regex">
<input type="text" name="split_regex" id="split_regex" value="" />
<a href="#" title="Delete" class="del_regex"><i class="fa fa-fw fa-trash"></i>Delete</a>
</div>
[% END %]
</div>
@ -400,6 +401,7 @@
$(document).ready(function(){
update_regex_block();
update_delete_links_visibility();
$("#split_routine").on("change", function(){
update_regex_block();
});