From db68b6fd72b9f0d7d8be953746c0e7d6154f5eaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 22 Feb 2007 15:02:59 +0000 Subject: [PATCH] Loeschen von Drafts flexibler. Die Checkbos bestimmt ob ein Draft geloescht wird, nicht mehr automatisch beim laden. --- SL/Drafts.pm | 2 +- bin/mozilla/ap.pl | 2 +- bin/mozilla/ar.pl | 2 +- bin/mozilla/io.pl | 8 +++++++- bin/mozilla/ir.pl | 2 +- bin/mozilla/is.pl | 4 ++-- locale/de/all | 2 +- locale/de/cn | 1 + locale/de/dn | 1 + locale/de/ic | 1 + locale/de/io | 1 + locale/de/ir | 1 + locale/de/is | 1 + locale/de/oe | 1 + templates/webpages/drafts/load_de.html | 1 - templates/webpages/drafts/load_master.html | 1 - 16 files changed, 21 insertions(+), 10 deletions(-) diff --git a/SL/Drafts.pm b/SL/Drafts.pm index 2ff3df86c..63da852e7 100644 --- a/SL/Drafts.pm +++ b/SL/Drafts.pm @@ -96,7 +96,7 @@ sub load { } $sth->finish(); - do_query($form, $dbh, "DELETE FROM drafts WHERE id = ?", $draft_id); +# do_query($form, $dbh, "DELETE FROM drafts WHERE id = ?", $draft_id); $dbh->disconnect(); diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 54a9c94b4..189249796 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1019,7 +1019,7 @@ sub post { $form->save_history($form->dbconnect(\%myconfig)); } # /saving the history - remove_draft(); + remove_draft() if $form->{remove_draft}; $form->redirect($locale->text('Transaction posted!')); } $form->error($locale->text('Cannot post transaction!')); diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index af47235a9..af964bbd7 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1060,7 +1060,7 @@ sub post { $form->save_history($form->dbconnect(\%myconfig)); } # /saving the history - remove_draft(); + remove_draft() if $form->{remove_draft}; $form->redirect($locale->text('Transaction posted!')); } $form->error($locale->text('Cannot post transaction!')); diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index adb78ed49..f38ffe20a 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1657,10 +1657,16 @@ sub print_options { } $form->{groupitems} = "checked" if $form->{groupitems}; + $form->{remove_draft} = "checked" if $form->{remove_draft}; print qq| | . $locale->text('Group Items') . qq| - {groupitems}> + {groupitems}>|; + + print qq| + | . $locale->text('Remove Draft') . qq| + {remove_draft}>| if (!$form->{id} && $form->{draft_id}); + print qq| diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index a915146f4..1515fa450 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -1086,7 +1086,7 @@ sub post { $form->save_history($form->dbconnect(\%myconfig)); } # /saving the history - remove_draft(); + remove_draft() if $form->{remove_draft}; $form->redirect( $locale->text('Invoice') . " $form->{invnumber} " . $locale->text('posted!')); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index d50d6d0f7..30d0a072f 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1451,7 +1451,7 @@ sub post { if (!(IS->post_invoice(\%myconfig, \%$form))) { $form->error($locale->text('Cannot post invoice!')); } - remove_draft(); + remove_draft() if $form->{remove_draft}; # saving the history if(!exists $form->{addition}) { $form->{addition} = "PRINTED AND POSTED"; @@ -1461,7 +1461,7 @@ sub post { } else { if (IS->post_invoice(\%myconfig, \%$form)){ - remove_draft(); + remove_draft() if $form->{remove_draft}; # saving the history if(!exists $form->{addition}) { if($form->{storno}) { diff --git a/locale/de/all b/locale/de/all index 6b3674c84..9b9b63e83 100644 --- a/locale/de/all +++ b/locale/de/all @@ -630,7 +630,6 @@ gestartet', 'List Printer' => 'Drucker anzeigen', 'List Transactions' => 'Buchungsliste', 'Load draft' => 'Entwurf laden', - 'Loading a draft will remove it from this list until you click the \'Save Draft\' button again.' => 'Das Laden eines Entwurfs wird ihn aus dieser Liste entfernen, bis Sie erneut auf \'Entwurf Speichern\' klicken.', 'Local Tax Office Preferences' => 'Angaben zum Finanzamt', 'Lock System' => 'System sperren', 'Lockfile created!' => 'System gesperrt!', @@ -874,6 +873,7 @@ gestartet', 'Reference missing!' => 'Referenz fehlt!', 'Remaining' => 'Rest', 'Remove' => 'entfernen', + 'Remove Draft' => 'Entwurf löschen', 'Removed spoolfiles!' => 'Druckdateien entfernt!', 'Removing marked entries from queue ...' => 'Markierte Einträge werden von der Warteschlange entfernt ...', 'Repeat the password' => 'Passwort wiederholen', diff --git a/locale/de/cn b/locale/de/cn index 1fb60ecf0..1dcff6315 100644 --- a/locale/de/cn +++ b/locale/de/cn @@ -162,6 +162,7 @@ $self->{texts} = { 'RFQ' => 'Anfrage', 'Record in' => 'Buchen auf', 'Remaining' => 'Rest', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Required by' => 'Lieferdatum', 'SAVED' => 'Gespeichert', diff --git a/locale/de/dn b/locale/de/dn index c702fb5f8..49b45f2fd 100644 --- a/locale/de/dn +++ b/locale/de/dn @@ -154,6 +154,7 @@ gestartet', 'Quotation Date missing!' => 'Angebotsdatum fehlt!', 'Quotation Number missing!' => 'Angebotsnummer fehlt!', 'RFQ' => 'Anfrage', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Required by' => 'Lieferdatum', 'SAVED' => 'Gespeichert', diff --git a/locale/de/ic b/locale/de/ic index 3f7d0bce1..823eee174 100644 --- a/locale/de/ic +++ b/locale/de/ic @@ -182,6 +182,7 @@ aktualisieren wollen?', 'Quoted' => 'Angeboten', 'RFQ' => 'Anfrage', 'ROP' => 'Mindestlagerbestand', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Required by' => 'Lieferdatum', 'Revenue' => 'Erlöskonto', diff --git a/locale/de/io b/locale/de/io index b4348ee88..f7215ee57 100644 --- a/locale/de/io +++ b/locale/de/io @@ -114,6 +114,7 @@ $self->{texts} = { 'Quotation Date missing!' => 'Angebotsdatum fehlt!', 'Quotation Number missing!' => 'Angebotsnummer fehlt!', 'RFQ' => 'Anfrage', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Required by' => 'Lieferdatum', 'SAVED' => 'Gespeichert', diff --git a/locale/de/ir b/locale/de/ir index 169da9463..2e5ec9a0d 100644 --- a/locale/de/ir +++ b/locale/de/ir @@ -157,6 +157,7 @@ $self->{texts} = { 'Rechnungsnummer' => 'Rechnungsnummer', 'Record in' => 'Buchen auf', 'Remaining' => 'Rest', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Required by' => 'Lieferdatum', 'SAVED' => 'Gespeichert', diff --git a/locale/de/is b/locale/de/is index c32c46971..079dbef05 100644 --- a/locale/de/is +++ b/locale/de/is @@ -179,6 +179,7 @@ $self->{texts} = { 'RFQ' => 'Anfrage', 'Record in' => 'Buchen auf', 'Remaining' => 'Rest', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Required by' => 'Lieferdatum', 'SAVED' => 'Gespeichert', diff --git a/locale/de/oe b/locale/de/oe index 9676b16c8..9e99f5368 100644 --- a/locale/de/oe +++ b/locale/de/oe @@ -182,6 +182,7 @@ $self->{texts} = { 'RFQ' => 'Anfrage', 'RFQ Number' => 'Anfragenummer', 'Remaining' => 'Rest', + 'Remove Draft' => 'Entwurf löschen', 'Reqdate' => 'Lieferdatum', 'Request for Quotation' => 'Anfrage', 'Request for Quotations' => 'Anfragen', diff --git a/templates/webpages/drafts/load_de.html b/templates/webpages/drafts/load_de.html index 3d589ccff..a5b4979f9 100644 --- a/templates/webpages/drafts/load_de.html +++ b/templates/webpages/drafts/load_de.html @@ -17,7 +17,6 @@ Die folgenden Entwürfe wurden gespeichert und können geladen werden. - Das Laden eines Entwurfs wird ihn aus dieser Liste entfernen, bis Sie erneut auf 'Entwurf Speichern' klicken. diff --git a/templates/webpages/drafts/load_master.html b/templates/webpages/drafts/load_master.html index 81de720cd..f12c3f24f 100644 --- a/templates/webpages/drafts/load_master.html +++ b/templates/webpages/drafts/load_master.html @@ -17,7 +17,6 @@ The following drafts have been saved and can be loaded. - Loading a draft will remove it from this list until you click the 'Save Draft' button again. -- 2.20.1