use SL::DB::DeliveryOrder;
use SL::DB::Status;
use SL::DBUtils;
+use SL::HTML::Restrict;
use SL::RecordLinks;
use SL::IC;
use SL::TransNumber;
# connect to database, turn off autocommit
my $dbh = $form->get_standard_dbh($myconfig);
+ my $restricter = SL::HTML::Restrict->create;
my ($query, @values, $sth, $null);
# save detail record in delivery_order_items table
@values = (conv_i($item_id), conv_i($form->{id}), conv_i($form->{"id_$i"}),
- $form->{"description_$i"}, $form->{"longdescription_$i"},
+ $form->{"description_$i"}, $restricter->process($form->{"longdescription_$i"}),
$form->{"qty_$i"}, $baseqty,
$form->{"sellprice_$i"}, $form->{"discount_$i"} / 100,
$form->{"unit_$i"}, conv_date($items_reqdate), conv_i($form->{"project_id_$i"}),
use SL::DBUtils;
use SL::DO;
use SL::GenericTranslations;
+use SL::HTML::Restrict;
use SL::IO;
use SL::MoreCommon;
use SL::DB::Default;
# connect to database, turn off autocommit
my $dbh = $provided_dbh ? $provided_dbh : $form->dbconnect_noauto($myconfig);
+ my $restricter = SL::HTML::Restrict->create;
+
$form->{defaultcurrency} = $form->get_default_currency($myconfig);
my $defaultcurrency = $form->{defaultcurrency};
project_id, serialnumber, price_factor_id, price_factor, marge_price_factor)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, (SELECT factor FROM price_factors WHERE id = ?), ?)|;
@values = ($invoice_id, conv_i($form->{id}), conv_i($form->{"id_$i"}),
- $form->{"description_$i"}, $form->{"longdescription_$i"}, $form->{"qty_$i"} * -1,
+ $form->{"description_$i"}, $restricter->process($form->{"longdescription_$i"}), $form->{"qty_$i"} * -1,
$baseqty * -1, $form->{"sellprice_$i"}, $fxsellprice, $form->{"discount_$i"}, $allocated,
$form->{"unit_$i"}, conv_date($form->{deliverydate}),
conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"},
use SL::DBUtils;
use SL::DO;
use SL::GenericTranslations;
+use SL::HTML::Restrict;
use SL::MoreCommon;
use SL::IC;
use SL::IO;
# connect to database, turn off autocommit
my $dbh = $provided_dbh ? $provided_dbh : $form->get_standard_dbh;
+ my $restricter = SL::HTML::Restrict->create;
my ($query, $sth, $null, $project_id, @values);
my $exchangerate = 0;
(SELECT factor FROM price_factors WHERE id = ?), ?)|;
@values = ($invoice_id, conv_i($form->{id}), conv_i($form->{"id_$i"}),
- $form->{"description_$i"}, $form->{"longdescription_$i"}, $form->{"qty_$i"},
+ $form->{"description_$i"}, $restricter->process($form->{"longdescription_$i"}), $form->{"qty_$i"},
$form->{"sellprice_$i"}, $fxsellprice,
$form->{"discount_$i"}, $allocated, 'f',
$form->{"unit_$i"}, conv_date($form->{"reqdate_$i"}), conv_i($form->{"project_id_$i"}),
use SL::DB::Status;
use SL::DB::Tax;
use SL::DBUtils;
+use SL::HTML::Restrict;
use SL::IC;
use SL::TransNumber;
# connect to database, turn off autocommit
my $dbh = $form->get_standard_dbh;
+ my $restricter = SL::HTML::Restrict->create;
my ($query, @values, $sth, $null);
my $exchangerate = 0;
(SELECT factor FROM price_factors WHERE id = ?), ?)|;
push(@values,
conv_i($orderitems_id), conv_i($form->{id}), conv_i($form->{"id_$i"}),
- $form->{"description_$i"}, $form->{"longdescription_$i"},
+ $form->{"description_$i"}, $restricter->process($form->{"longdescription_$i"}),
$form->{"qty_$i"}, $baseqty,
$fxsellprice, $form->{"discount_$i"},
$form->{"unit_$i"}, conv_date($reqdate), conv_i($form->{"project_id_$i"}),
$form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')';
- $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery));
$form->header();
# Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID'
), @custom_hiddens,
map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
- $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery));
$form->header();
), @custom_hiddens,
map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
- $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery));
$form->header();
}
}
- $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details));
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details ckeditor/ckeditor ckeditor/adapters/jquery));
$form->header;
if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) {
kivi.popup_dialog({
id: 'edit_longdescription_dialog',
dialog: {
- title: kivi.t8('Enter longdescription')
+ title: kivi.t8('Enter longdescription'),
+ open: function() { kivi.set_focus('#popup_edit_longdescription_input'); }
}
});
};
if (!params.url) {
// Use existing DOM element and show it. No AJAX call.
- dialog = $('#' + id).dialog(dialog_params);
+ dialog =
+ $('#' + id)
+ .bind('dialogopen', function() {
+ ns.run_once_for('.texteditor-in-dialog,.texteditor-dialog', 'texteditor', kivi.init_text_editor);
+ })
+ .dialog(dialog_params);
return true;
}
</table>
</p>
- <p>[% L.textarea_tag("popup_edit_longdescription_input", "", wrap="soft", style="width: 750px; height: 240px;") %]</p>
+ <p>[% L.textarea_tag("popup_edit_longdescription_input", "", class="texteditor-in-dialog" wrap="soft", style="width: 750px; height: 220px;") %]</p>
<p>
[% L.button_tag("kivi.SalesPurchase.set_longdescription()", LxERP.t8("Close")) %]