);
__PACKAGE__->run_before('check_auth');
+__PACKAGE__->run_before('setup');
__PACKAGE__->run_before('load_requirement_spec_predefined_text', only => [ qw(edit update destroy) ]);
#
$::auth->assert('config');
}
+sub setup {
+ $::request->layout->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery);
+}
+
#
# helpers
#
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) = @_;
<table>
<tr>
<td>[% LxERP.t8("Description") %]</sup></td>
- <td>[% L.input_tag("requirement_spec_predefined_text.description", SELF.requirement_spec_predefined_text.description, size=60) %]</td>
+ <td>[% L.input_tag("requirement_spec_predefined_text.description", SELF.requirement_spec_predefined_text.description, size=60, class='initial_focus') %]</td>
</tr>
<tr>
<td>[% L.input_tag("requirement_spec_predefined_text.title", SELF.requirement_spec_predefined_text.title, size=60) %]</td>
</tr>
- <tr>
+ <tr valign="top">
<td>[% LxERP.t8("Content") %]</td>
- <td>[% L.textarea_tag("requirement_spec_predefined_text.text", SELF.requirement_spec_predefined_text.text, rows=10, cols=80) %]</td>
+ <td>[% 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') %]</td>
</tr>
</table>