From a18b9450d56727749a09c845204df2885a687fc2 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 12 Jan 2017 10:27:37 +0100 Subject: [PATCH] =?utf8?q?ChartPicker:=20Test-Seite=20um=20vorausgef=C3=BC?= =?utf8?q?llte=20Picker=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Chart.pm | 2 +- templates/webpages/chart/test_page.html | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Chart.pm b/SL/Controller/Chart.pm index 624a65b1d..bd77e3689 100644 --- a/SL/Controller/Chart.pm +++ b/SL/Controller/Chart.pm @@ -54,7 +54,7 @@ sub action_ajax_autocomplete { } sub action_test_page { - $_[0]->render('chart/test_page'); + $_[0]->render('chart/test_page', pre_filled_chart => SL::DB::Manager::Chart->get_first); } sub action_chart_picker_search { diff --git a/templates/webpages/chart/test_page.html b/templates/webpages/chart/test_page.html index 4fc46887d..8d95591d0 100644 --- a/templates/webpages/chart/test_page.html +++ b/templates/webpages/chart/test_page.html @@ -45,6 +45,11 @@ S [% i %]: [% L.chart_picker('credit_' _ i) %] -    H [% i %]: [% L.c [% END %]

+

+Pre-filled chart object: [% L.chart_picker('pre_filled_chart_object', pre_filled_chart, style=style) %]
+Pre-filled chart ID: [% L.chart_picker('pre_filled_chart_id', pre_filled_chart.id, style=style) %]
+

+ - -- 2.20.1