Merge pull request #17554 from pokemaobr/REMOVING_GET_DISPLAY_FIELD_FUNCTION_ON_TWIG
Removing get display field function on twig template
This commit is contained in:
commit
f182bb1131
@ -167,6 +167,7 @@ final class RelationController extends AbstractController
|
||||
'dbi' => $this->dbi,
|
||||
'default_sliders_state' => $GLOBALS['cfg']['InitialSlidersState'],
|
||||
'route' => $route,
|
||||
'display_field' => $this->relation->getDisplayField($GLOBALS['db'], $GLOBALS['table']),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -20,11 +20,6 @@ class RelationExtension extends AbstractExtension
|
||||
$relation = new Relation($GLOBALS['dbi']);
|
||||
|
||||
return [
|
||||
new TwigFunction(
|
||||
'get_display_field',
|
||||
[$relation, 'getDisplayField'],
|
||||
['is_safe' => ['html']]
|
||||
),
|
||||
new TwigFunction(
|
||||
'get_foreign_data',
|
||||
[$relation, 'getForeignData']
|
||||
|
||||
@ -203,14 +203,13 @@
|
||||
{% endif %}
|
||||
|
||||
{% if relation_parameters.displayFeature is not null %}
|
||||
{% set disp = get_display_field(db, table) %}
|
||||
<fieldset class="pma-fieldset">
|
||||
<label>{% trans 'Choose column to display:' %}</label>
|
||||
<select name="display_field">
|
||||
<option value="">---</option>
|
||||
{% for row in save_row %}
|
||||
<option value="{{ row['Field'] }}"
|
||||
{%- if disp is defined and row['Field'] == disp %}
|
||||
{%- if display_field is defined and row['Field'] == display_field %}
|
||||
selected="selected"
|
||||
{%- endif %}>
|
||||
{{ row['Field'] }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user