]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Merge pull request #33 from kivitendo/f-send-emails-as-html
authorJan Büren <jan@kivitendo-premium.de>
Thu, 10 Feb 2022 11:58:06 +0000 (12:58 +0100)
committerGitHub <noreply@github.com>
Thu, 10 Feb 2022 11:58:06 +0000 (12:58 +0100)
F send emails as html

1  2 
SL/Controller/Order.pm
locale/de/all
locale/en/all

diff --combined SL/Controller/Order.pm
index f24f5cf54020214ce84a7c9e3010371a7267ac88,e709336ab9b75b2ef9ebc0126a513b8005d28fd2..64ad14d231463bc9ea5c1815e8c0d19a4e89c6cd
@@@ -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 b451f51b89309362492939319d3833cc37cbb262,671d9c3dda60f2f077db7cc62ea3d4cd1dbc5ebc..663af42167633c23f6004bc90a7502edfdd4b47e
@@@ -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',
    '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',
    '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«',
    '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',
    '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)',
    '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 24a4366d156b38dc4ff70a68be4cd5d19c04c95d,35f97050469dbc68838e0990798965493eab364f..7d5c502919b3bc306318ecc62633b753eb08f179
@@@ -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'     => '',
    'Company name'                => '',
    'Company name and address'    => '',
    'Company settings'            => '',
+   'Company\'s email signature'  => '',
    'Compare to'                  => '',
    'Complexities'                => '',
    'Complexity'                  => '',
    '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\'' => '',
    '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' => '',
    '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)'      => '',
    '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.' => '',