ui changes

This commit is contained in:
2024-12-04 15:37:19 +01:00
parent c5f5489211
commit c1c4257321
6 changed files with 112 additions and 30 deletions

View File

@@ -3,7 +3,7 @@ from PyQt6 import QtCore, QtWidgets
from src.logic.dataclass import BookData
from .dialog_sources.Ui_edit_bookdata import Ui_Dialog
from src import Icon
class BookDataUI(QtWidgets.QDialog, Ui_Dialog):
def __init__(self, parent=None):

View File

@@ -57,7 +57,7 @@
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Geschlecht</string>
<string>Anrede</string>
</property>
</widget>
</item>

View File

@@ -50,7 +50,7 @@ class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
dialog.setWindowIcon(Icon("save").icon)
save = dialog.exec()
template_name = dialog.textValue()
if template_name != "":
if template_name != "" and save == 1:
template = template_name + ".eml"
if template in os.listdir("mail_vorlagen"):
# warning dialog
@@ -69,9 +69,6 @@ class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
ret = dialog.exec()
if ret == QtWidgets.QMessageBox.StandardButton.No:
return
if save == 1:
mail = f"""Subject: {self.subject.text()}
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
@@ -201,7 +198,7 @@ Content-Transfer-Encoding: 8bit
# warning dialog
Icon("template_fail", self.testTemplate)
dialog = QtWidgets.QMessageBox()
Icon("warning", dialog)
dialog.setWindowIcon(Icon("warning").icon)
dialog.setText("Folgende Platzhalter fehlen im Template:")