import tkinter as tk from tkinter import Toplevel, Label, Entry, Button, Frame class NewTaskWindow: def __init__(self, parent): self.window = Toplevel(parent) self.window.title("Новая задача") self.window.geometry("300x200") self.window.transient(parent) self.window.grab_set() # модальное Label(self.window, text="ID задачи:").pack(pady=(10, 0)) self.task_id_entry = Entry(self.window) self.task_id_entry.pack(pady=5) Label(self.window, text="Оценка времени (мин):").pack() self.estimate_entry = Entry(self.window) self.estimate_entry.pack(pady=5) Label(self.window, text="ID проекта (опц.):").pack() self.project_id_entry = Entry(self.window) self.project_id_entry.pack(pady=5) Button(self.window, text="Создать", command=self.on_create).pack(pady=10) def on_create(self): # Позже: сохранить задачу self.window.destroy()