From: Moritz Bunkus Date: Mon, 13 Jan 2014 10:31:53 +0000 (+0100) Subject: Vordefinierte Pflichtenhefttextblöcke: HTML nutzen X-Git-Tag: release-3.2.0beta~467^2~52 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bb3360db78c7563db3bf757289687e836385082f;p=kivitendo-erp.git Vordefinierte Pflichtenhefttextblöcke: HTML nutzen --- diff --git a/SL/Controller/RequirementSpecPredefinedText.pm b/SL/Controller/RequirementSpecPredefinedText.pm index 8a86f2c75..959a770f8 100644 --- a/SL/Controller/RequirementSpecPredefinedText.pm +++ b/SL/Controller/RequirementSpecPredefinedText.pm @@ -14,6 +14,7 @@ use Rose::Object::MakeMethods::Generic ); __PACKAGE__->run_before('check_auth'); +__PACKAGE__->run_before('setup'); __PACKAGE__->run_before('load_requirement_spec_predefined_text', only => [ qw(edit update destroy) ]); # @@ -80,6 +81,10 @@ sub check_auth { $::auth->assert('config'); } +sub setup { + $::request->layout->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery); +} + # # helpers # diff --git a/SL/DB/RequirementSpecPredefinedText.pm b/SL/DB/RequirementSpecPredefinedText.pm index 33738ead8..c2ab0c87c 100644 --- a/SL/DB/RequirementSpecPredefinedText.pm +++ b/SL/DB/RequirementSpecPredefinedText.pm @@ -5,10 +5,13 @@ use strict; use SL::DB::MetaSetup::RequirementSpecPredefinedText; use SL::DB::Manager::RequirementSpecPredefinedText; use SL::DB::Helper::ActsAsList; +use SL::DB::Helper::AttrHTML; use SL::Locale::String; __PACKAGE__->meta->initialize; +__PACKAGE__->attr_html('text'); + sub validate { my ($self) = @_; diff --git a/templates/webpages/requirement_spec_predefined_text/form.html b/templates/webpages/requirement_spec_predefined_text/form.html index 9a790387e..2d34c58cd 100755 --- a/templates/webpages/requirement_spec_predefined_text/form.html +++ b/templates/webpages/requirement_spec_predefined_text/form.html @@ -8,7 +8,7 @@ - + @@ -16,9 +16,9 @@ - + - +
[% LxERP.t8("Description") %][% L.input_tag("requirement_spec_predefined_text.description", SELF.requirement_spec_predefined_text.description, size=60) %][% L.input_tag("requirement_spec_predefined_text.description", SELF.requirement_spec_predefined_text.description, size=60, class='initial_focus') %]
[% L.input_tag("requirement_spec_predefined_text.title", SELF.requirement_spec_predefined_text.title, size=60) %]
[% LxERP.t8("Content") %][% L.textarea_tag("requirement_spec_predefined_text.text", SELF.requirement_spec_predefined_text.text, rows=10, cols=80) %][% L.textarea_tag("requirement_spec_predefined_text.text_as_restricted_html", SELF.requirement_spec_predefined_text.text_as_restricted_html, class='texteditor', style='width: 800px; height: 300px') %]
diff --git a/templates/webpages/requirement_spec_predefined_text/list.html b/templates/webpages/requirement_spec_predefined_text/list.html index c8251b146..358d646b5 100644 --- a/templates/webpages/requirement_spec_predefined_text/list.html +++ b/templates/webpages/requirement_spec_predefined_text/list.html @@ -32,7 +32,7 @@ [% HTML.escape(requirement_spec_predefined_text.title) %] - [% HTML.escape(L.truncate(requirement_spec_predefined_text.text)) %] + [% HTML.escape(L.truncate(requirement_spec_predefined_text.text_as_stripped_html)) %] [%- END %]