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>
(cherry picked from commit
63c5a813c994a4893eaef2cb87fcd26bc594c3e4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
[% 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>
$(document).ready(function(){
update_regex_block();
+ update_delete_links_visibility();
$("#split_routine").on("change", function(){
update_regex_block();
});