From: Jan Büren Date: Thu, 10 Feb 2022 11:58:06 +0000 (+0100) Subject: Merge pull request #33 from kivitendo/f-send-emails-as-html X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~220 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/d104879c27e78a5c2101c8d9227e6419aea15881?ds=inline;hp=-c Merge pull request #33 from kivitendo/f-send-emails-as-html F send emails as html --- d104879c27e78a5c2101c8d9227e6419aea15881 diff --combined SL/Controller/Order.pm index f24f5cf54,e709336ab..64ad14d23 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@@ -4,6 -4,7 +4,7 @@@ use strict use parent qw(SL::Controller::Base); use SL::Helper::Flash qw(flash_later); + use SL::HTML::Util; use SL::Presenter::Tag qw(select_tag hidden_tag div_tag); use SL::Locale::String qw(t8); use SL::SessionFile::Random; @@@ -522,7 -523,7 +523,7 @@@ sub action_send_email $intnotes .= t8('Cc') . ": " . $::form->{cc} . "\n" if $::form->{cc}; $intnotes .= t8('Bcc') . ": " . $::form->{bcc} . "\n" if $::form->{bcc}; $intnotes .= t8('Subject') . ": " . $::form->{subject} . "\n\n"; - $intnotes .= t8('Message') . ": " . $::form->{message}; + $intnotes .= t8('Message') . ": " . SL::HTML::Util->strip($::form->{message}); $self->order->update_attributes(intnotes => $intnotes); @@@ -557,32 -558,9 +558,32 @@@ sub action_show_periodic_invoices_confi language_id => $::form->{language_id}, translation_type =>"preset_text_periodic_invoices_email_subject"), email_body => GenericTranslations->get( + language_id => $::form->{language_id}, + translation_type => "salutation_general") + . GenericTranslations->get( + language_id => $::form->{language_id}, + translation_type => "salutation_punctuation_mark") . "\n\n" + . GenericTranslations->get( language_id => $::form->{language_id}, translation_type =>"preset_text_periodic_invoices_email_body"), ); + # for older configs, replace email preset text if not yet set. + $config->email_subject(GenericTranslations->get( + language_id => $::form->{language_id}, + translation_type =>"preset_text_periodic_invoices_email_subject") + ) unless $config->email_subject; + + $config->email_body(GenericTranslations->get( + language_id => $::form->{language_id}, + translation_type => "salutation_general") + . GenericTranslations->get( + language_id => $::form->{language_id}, + translation_type => "salutation_punctuation_mark") . "\n\n" + . GenericTranslations->get( + language_id => $::form->{language_id}, + translation_type =>"preset_text_periodic_invoices_email_body") + ) unless $config->email_body; + $config->periodicity('m') if none { $_ eq $config->periodicity } @SL::DB::PeriodicInvoicesConfig::PERIODICITIES; $config->order_value_periodicity('p') if none { $_ eq $config->order_value_periodicity } ('p', @SL::DB::PeriodicInvoicesConfig::ORDER_VALUE_PERIODICITIES); diff --combined locale/de/all index b451f51b8,671d9c3dd..663af4216 --- a/locale/de/all +++ b/locale/de/all @@@ -649,7 -649,6 +649,6 @@@ $self->{texts} = 'Check Details' => 'Bitte Angaben überprüfen', 'Check connectivity' => 'Verbindungstest', 'Check for duplicates' => 'Dublettencheck', - 'Check full signature' => 'Volle Signatur prüfen', 'Check on ap transaction' => 'Prüfen bei Kreditorenbuchung', 'Check on ar transaction' => 'Prüfen bei Debitorenbuchung', 'Check on gl transaction' => 'Prüfen bei Dialogbuchung', @@@ -698,6 -697,7 +697,7 @@@ 'Company name' => 'Firmenname', 'Company name and address' => 'Firmenname und -adresse', 'Company settings' => 'Firmeneinstellungen', + 'Company\'s email signature' => 'Firmen-E-Mail-Signatur', 'Compare to' => 'Gegenüberstellen zu', 'Complexities' => 'Komplexitätsgrade', 'Complexity' => 'Komplexität', @@@ -815,10 -815,8 +815,10 @@@ 'Create one from the context menu by right-clicking on this text.' => 'Erstellen Sie einen aus dem Kontextmenü, indem Sie auf diesen Text rechtsklicken.', 'Create order' => 'Auftrag erstellen', 'Create sales invoices with Factur-X/ZUGFeRD data' => 'Verkaufsrechnungen mit Factur-X-/ZUGFeRD-Daten erzeugen', - 'Create sales invoices with Swiss QR-Bill' => 'Verkaufsrechnungen mit Schweizer QR-Rechnung erzeugen', + 'Create sales invoices with Swiss QR-bill' => 'Verkaufsrechnungen mit Schweizer QR-Rechnung erzeugen', 'Create tables' => 'Tabellen anlegen', + 'Create variant IBAN without reference' => 'Variante IBAN ohne Referenz erzeugen', + 'Create variant QR-IBAN with QR reference' => 'Variante QR-IBAN mit QR-Referenz erzeugen', 'Create with profile \'Factur-X 1.0.05/ZUGFeRD 2.1.1 extended\'' => 'Mit Profil »Factur-X 1.0.05/ZUGFeRD 2.1.1 extended«', 'Create with profile \'Factur-X 1.0.05/ZUGFeRD 2.1.1 extended\' (test mode)' => 'Mit Profil »Factur-X 1.0.05/ZUGFeRD 2.1.1 extended« (Test-Modus)', 'Create with profile \'XRechnung 2.0.0\'' => 'Mit Profil »XRechnung 2.0.0«', @@@ -1116,7 -1114,6 +1116,7 @@@ 'Do not change the tax rate of taxkey 0.' => 'Ändern Sie nicht den Steuersatz vom Steuerschlüssel 0.', 'Do not check for duplicates' => 'Nicht nach Dubletten suchen', 'Do not create Factur-X/ZUGFeRD invoices' => 'Keine Factur-X-/ZUGFeRD-Rechnungen erzeugen', + 'Do not create QR-bill invoices' => 'Keine QR-Rechnungen erzeugen', 'Do not leave booking form?' => 'Buchungsmaske nicht verlassen?', 'Do not link to a project.' => 'Nicht mit einem Projekt verknüpfen.', 'Do not modify this position' => 'Diese Position nicht verändern', @@@ -1328,14 -1325,15 +1328,15 @@@ 'Edit time recordings of all staff members' => 'Zeiterfassungseinträge aller Mitarbeiter bearbeiten', 'Edit title' => 'Titiel bearbeiten', 'Edit units' => 'Einheiten bearbeiten', - 'Edit user signature' => 'Benutzersignatur bearbeiten', 'Editable' => 'Bearbeitbar', 'Either there are no open invoices, or you have already initiated bank transfers with the open amounts for those that are still open.' => 'Entweder gibt es keine offenen Rechnungen, oder es wurden bereits Überweisungen über die offenen Beträge aller offenen Rechnungen erstellt.', 'Element disabled' => 'Element deaktiviert', 'Email' => 'E-Mail', + 'Email address' => 'E-Mail-Adresse', 'Email journal' => 'E-Mail-Journal', 'Email of the delivery order recipient' => 'E-Mail des Lieferscheinempfängers', 'Email of the invoice recipient' => 'E-Mail des Rechnungsempfängers', + 'Email signature' => 'E-Mail-Signatur', 'Employee' => 'Bearbeiter', 'Employee #1 saved!' => 'Benutzer #1 gespeichert!', 'Employee (database ID)' => 'Bearbeiter (Datenbank-ID)', @@@ -1359,7 -1357,6 +1360,7 @@@ 'Equity' => 'Passiva', 'Erfolgsrechnung' => 'Erfolgsrechnung', 'Error' => 'Fehler', + 'Error getting QR-Bill type.' => 'Fehler in QR-Rechnung Varianten Auswahl.', 'Error handling' => 'Fehlerbehandlung', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.', diff --combined locale/en/all index 24a4366d1,35f970504..7d5c50291 --- a/locale/en/all +++ b/locale/en/all @@@ -649,7 -649,6 +649,6 @@@ $self->{texts} = 'Check Details' => '', 'Check connectivity' => '', 'Check for duplicates' => '', - 'Check full signature' => '', 'Check on ap transaction' => '', 'Check on ar transaction' => '', 'Check on gl transaction' => '', @@@ -698,6 -697,7 +697,7 @@@ 'Company name' => '', 'Company name and address' => '', 'Company settings' => '', + 'Company\'s email signature' => '', 'Compare to' => '', 'Complexities' => '', 'Complexity' => '', @@@ -817,8 -817,6 +817,8 @@@ 'Create sales invoices with Factur-X/ZUGFeRD data' => '', 'Create sales invoices with Swiss QR-Bill' => '', 'Create tables' => '', + 'Create variant with QR reference' => '', + 'Create variant without reference number' => '', 'Create with profile \'Factur-X 1.0.05/ZUGFeRD 2.1.1 extended\'' => '', 'Create with profile \'Factur-X 1.0.05/ZUGFeRD 2.1.1 extended\' (test mode)' => '', 'Create with profile \'XRechnung 2.0.0\'' => '', @@@ -1116,7 -1114,6 +1116,7 @@@ 'Do not change the tax rate of taxkey 0.' => '', 'Do not check for duplicates' => '', 'Do not create Factur-X/ZUGFeRD invoices' => '', + 'Do not create QR-Bill invoices' => '', 'Do not leave booking form?' => '', 'Do not link to a project.' => '', 'Do not modify this position' => '', @@@ -1328,14 -1325,15 +1328,15 @@@ 'Edit time recordings of all staff members' => '', 'Edit title' => '', 'Edit units' => '', - 'Edit user signature' => '', 'Editable' => '', 'Either there are no open invoices, or you have already initiated bank transfers with the open amounts for those that are still open.' => '', 'Element disabled' => '', 'Email' => '', + 'Email address' => '', 'Email journal' => '', 'Email of the delivery order recipient' => '', 'Email of the invoice recipient' => '', + 'Email signature' => '', 'Employee' => '', 'Employee #1 saved!' => '', 'Employee (database ID)' => '', @@@ -1359,7 -1357,6 +1360,7 @@@ 'Equity' => '', 'Erfolgsrechnung' => '', 'Error' => '', + 'Error getting QR-Bill type.' => '', 'Error handling' => '', 'Error in database control file \'%s\': %s' => '', 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => '',