From 10c5bcd8845b264febd0c7bfd1a690e287703b54 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 10 Nov 2021 14:42:55 +0100 Subject: [PATCH] Benutzerdef. Var. als HTML-Feld: Pflichtenhefte --- SL/Controller/RequirementSpec.pm | 4 +++- .../requirement_spec/_show_basic_settings.html | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index 6ba1c4e74..afbe2bba6 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -87,6 +87,7 @@ sub action_ajax_edit { $self->js ->hide('#basic_settings') ->after('#basic_settings', $html) + ->reinit_widgets ->render; } @@ -333,7 +334,8 @@ sub setup { $::auth->assert('requirement_spec_edit'); $::request->{layout}->use_stylesheet("${_}.css") for qw(jquery.contextMenu requirement_spec); - $::request->{layout}->use_javascript("${_}.js") for qw(jquery.jstree jquery/jquery.contextMenu jquery/jquery.hotkeys requirement_spec ckeditor/ckeditor ckeditor/adapters/jquery kivi.Part kivi.CustomerVendor); + $::request->{layout}->use_javascript("${_}.js") for qw(jquery.jstree jquery/jquery.contextMenu jquery/jquery.hotkeys requirement_spec ckeditor/ckeditor ckeditor/adapters/jquery kivi.Part kivi.CustomerVendor + ckeditor/ckeditor ckeditor/adapters/jquery); $self->init_visible_section; return 1; diff --git a/templates/webpages/requirement_spec/_show_basic_settings.html b/templates/webpages/requirement_spec/_show_basic_settings.html index af756288c..54166f127 100644 --- a/templates/webpages/requirement_spec/_show_basic_settings.html +++ b/templates/webpages/requirement_spec/_show_basic_settings.html @@ -1,4 +1,4 @@ -[%- USE HTML -%][%- USE LxERP -%] +[%- USE HTML -%][%- USE LxERP -%][%- USE L -%]

[% IF SELF.requirement_spec.is_template %] @@ -41,7 +41,13 @@ [% FOREACH var = cvars %] [% HTML.escape(var.config.description) %] - [% HTML.escape(var.value_as_text) %] + + [%- IF var.config.type == 'htmlfield' -%] + [%- L.restricted_html(var.value_as_text) -%] + [%- ELSE -%] + [%- HTML.escape(var.value_as_text) -%] + [%- END -%] + [% END %] -- 2.20.1