updates
This commit is contained in:
@@ -64,7 +64,7 @@ class LoginDialog(Ui_Dialog):
|
||||
def login(self):
|
||||
username = self.lineEdit.text()
|
||||
password = self.lineEdit_2.text()
|
||||
print(type(username), password)
|
||||
# print(type(username), password)
|
||||
# Assuming 'Database' is a class to interact with your database
|
||||
|
||||
hashed_password = hashlib.sha256(password.encode()).hexdigest()
|
||||
|
||||
@@ -82,7 +82,7 @@ Tel.: 0761/682-778"""
|
||||
return config.mail.signature
|
||||
|
||||
def load_mail_templates(self):
|
||||
print("loading mail templates")
|
||||
# print("loading mail templates")
|
||||
logger.log_info("Loading mail templates")
|
||||
mail_templates = os.listdir("mail_vorlagen")
|
||||
logger.log_info(f"Mail templates: {mail_templates}")
|
||||
@@ -159,12 +159,12 @@ Tel.: 0761/682-778"""
|
||||
# server.starttls()
|
||||
# server.auth(mechanism="PLAIN")
|
||||
if config["mail"]["use_user_name"] is True:
|
||||
print(config["mail"]["user_name"])
|
||||
# print(config["mail"]["user_name"])
|
||||
server.login(config["mail"]["user_name"], password)
|
||||
else:
|
||||
server.login(sender_email, password)
|
||||
server.sendmail(sender_email, tolist, mail)
|
||||
print("Mail sent")
|
||||
# print("Mail sent")
|
||||
# end active process
|
||||
server.quit()
|
||||
logger.log_info("Mail sent, closing connection to server and dialog")
|
||||
|
||||
@@ -57,4 +57,4 @@ def lauhc_gui():
|
||||
dialog = MedienAdder()
|
||||
dialog.show()
|
||||
app.exec()
|
||||
print(dialog.mode, dialog.data, dialog.result())
|
||||
# print(dialog.mode, dialog.data, dialog.result())
|
||||
@@ -17,7 +17,6 @@ from PyQt6.QtGui import QRegularExpressionValidator
|
||||
|
||||
from src import Icon
|
||||
from src.backend import (
|
||||
AdminCommands,
|
||||
Database,
|
||||
generateSemesterByDate,
|
||||
recreateFile,
|
||||
|
||||
@@ -7,6 +7,7 @@ from PyQt6.QtCore import QDate
|
||||
from src import Icon
|
||||
from src.backend import recreateElsaFile, generateSemesterByDate, Database
|
||||
from src.logic import elsa_word_to_csv, MyLogger
|
||||
from src.ui import popus_confirm
|
||||
from src.ui.dialogs import ElsaAddEntry
|
||||
from src.ui.widgets import FilePicker
|
||||
from src.ui.widgets import DataGraph
|
||||
@@ -106,6 +107,14 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.db.updateElsaApparat(elsa_id, prof, semester, date)
|
||||
self.elsa_update.setEnabled(False)
|
||||
self.cancel_elsa_creation()
|
||||
|
||||
def confirm_popup(self, message: str, title: str):
|
||||
popup = popus_confirm(title=title)
|
||||
popup.textEdit.setReadOnly(True)
|
||||
popup.textEdit.setText(message)
|
||||
|
||||
popup.exec()
|
||||
return popup.result()
|
||||
|
||||
def save_elsa(self):
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user