<td colspan="2" align="center">
    <h2>{$params_tpl['title']}{$params_tpl['help']}</h2>
    <div style="display: flex; flex-direction: column;">{$tpl_types['cur_field']}</div>
    <div style="display: flex; flex-direction: column;">{$tpl_types['filter']}</div>
    <div style="display: flex; flex-direction: column;">{$tpl_types['record']}</div>
    <div style="display: flex; flex-direction: column;">{$tpl_types['gen_field']}</div>
    <div style="display: flex; flex-direction: column;">{$tpl_types['add_value']}</div>
    <div style="display: flex; flex-direction: column;" id="add_delim">{$tpl_types['add_delim']}</div>
</td>
<script>
(function() {
    var curField = $('[name="calc_params[{$tpl_num}][cur_field]"]');
    function curFieldChange() {
        var fieldType = curField.children('option[value="' + curField.val() + '"]').attr('data-type');
        $('#add_delim').toggle(fieldType != 6);
        if (fieldType == 6) {
            $('[name="calc_params[{$tpl_num}][add_delim]"]').val('\\r\\n');
        }
    }
    $(document).ready(curFieldChange);
    curField.change(curFieldChange);
})();
</script>