Remove columns_definitions/column_type template

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2020-09-13 12:25:16 -03:00
parent c31f55b3f9
commit 9d8e066e5c
4 changed files with 15 additions and 39 deletions

View File

@ -18,15 +18,11 @@
{% set ci = ci + 1 %}
</td>
<td class="text-center">
{# column type #}
{% include 'columns_definitions/column_type.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'type_upper': type_upper
} only %}
{% set ci = ci + 1 %}
<select class="column_type" name="field_type[{{ column_number }}]" id="field_{{ column_number }}_{{ ci - ci_offset }}"
{{- column_meta['column_status'] is defined and not column_meta['column_status']['isEditable'] ? ' disabled' }}>
{{ get_supported_datatypes(true, type_upper) }}
</select>
{% set ci = ci + 1 %}
</td>
<td class="text-center">
{# column length #}

View File

@ -1,8 +0,0 @@
<select class="column_type"
name="field_type[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
{%- if column_meta['column_status'] is defined and not column_meta['column_status']['isEditable'] -%}
disabled="disabled"
{%- endif %}>
{{ get_supported_datatypes(true, type_upper) }}
</select>

View File

@ -12,13 +12,9 @@
</td>
<td name="col_type" class="nowrap">
{% include 'columns_definitions/column_type.twig' with {
'column_number': row_num,
'ci': 1,
'ci_offset': 0,
'column_meta': [],
'type_upper': row['col_type']|upper
} only %}
<select class="column_type" name="field_type[{{ row_num }}]" id="field_{{ row_num }}_1">
{{ get_supported_datatypes(true, row['col_type']|upper) }}
</select>
</td>
<td class="nowrap" name="col_length">

View File

@ -63,13 +63,9 @@
} only %}
</td>
<td name="col_type" class="nowrap">
{% include 'columns_definitions/column_type.twig' with {
'column_number': 0,
'ci': 1,
'ci_offset': 0,
'type_upper': '',
'column_meta': {}
} only %}
<select class="column_type" name="field_type[0]" id="field_0_1">
{{ get_supported_datatypes(true) }}
</select>
</td>
<td class="nowrap" name="col_length">
{% include 'columns_definitions/column_length.twig' with {
@ -299,14 +295,10 @@
} only %}
</td>
<td name = "col_type" class="nowrap">
<span>{{ row['col_type'] }}</span>
{% include 'columns_definitions/column_type.twig' with {
'column_number': row_num,
'ci': 1,
'ci_offset': 0,
'type_upper': types_upper[row_num],
'column_meta': {}
} only %}
<span>{{ row['col_type'] }}</span>
<select class="column_type" name="field_type[{{ row_num }}]" id="field_{{ row_num }}_1">
{{ get_supported_datatypes(true, types_upper[row_num]) }}
</select>
</td>
<td class="nowrap" name="col_length">
<span>{{ (row['col_length']?(row['col_length']):'') }}</span>