def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) self.rates = self.client.rate_get() self.printers = self.client.printer_get() self.addWidgets() self.enablePayerEntry()
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) self.prints = self.client.print_get() self.rates = ns.natsorted(self.client.rate_get(), key=lambda x: x.name) self.addWidgets() self.refreshTree(self.prints)
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) # Ensure user has proper permisissions if not self.validate(): return self.vars = struct() self.addWidgets()
def __init__(self, parent, userid, elevated=False, auth=("", ""), *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) self.userid = userid self.elevated = elevated self.auth = auth # Holds the info of whoever is authorizing the changes self.addWidgets() self.loadUser(userid, elevated=elevated)
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) # Load Invoices self.invs = self.client.invoice_get() # Prapare GUI variables for data aquisition self.vars = struct() v = self.vars v.userid = tk.StringVar() v.dateMin = tk.StringVar() v.dateMax = tk.StringVar() # Set up GUI self.addWidgets() self.refreshTree() self.tree.sort(0) # Load Config self.conf = ConfigParser() self.conf.read("client.ini")
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) # Get login before opening screen. We ask for login so that we can display only prints # belonging to the actual user status, code, self.userid, self.passwd = UserVerify.verifyLogin(self) self.issuper = self.client.user_issuper(self.userid, self.passwd) if not status: if code == UserVerify.BAD_LOGIN: msg.showerror( "Bad Login", "Your login info is incorrect. Please try again.") self.abort = True return self.vars = struct() self.vars.userid = tk.StringVar(value=self.userid) self.vars.printid = tk.StringVar() self.vars.completion = tk.DoubleVar() self.addWidgets() self.refresh()
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) auth_userid, auth_passwd = UserVerify.getLogin(self) if not self.client.user_get(userid=auth_userid): messagebox.showerror("Authentication Error", "No login exists under that username.") return if not self.client.user_verify(auth_userid, auth_passwd): messagebox.showerror("Autherntication Error", "The username/password is invalid.") return if not self.client.user_issuper(auth_userid, auth_passwd): messagebox.showerror( "Authentication Error", "You do not have permission to access this page.") return self.auth_userid = auth_userid self.auth_passwd = auth_passwd self.vars = struct() # Container for tk input variables self.addWidgets()
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) self.uid = EntryPopup.getText(self, title="User Select", message="Enter a UserID.") if not self.uid: App.app.openFrame("Start") user = self.client.user_get(userid=self.uid) if not user: messagebox.showerror("Invalid User ID", "No user exists with that User ID.") App.app.openFrame("Start") self.user = user[0] self.prints = self.client.print_get(paidby=self.uid, finished=True) self.added = [] self.REF = "REF" self.NEW = "NEW" self.addWidgets() self.refresh()
def __init__(self, parent, printjob, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) # Get Verification. Only admit people who are moderators or who already own the print. status, code, userid, passwd = UserVerify.verifyLogin( self, target=printjob.userid) if not status: if code == UserVerify.BAD_LOGIN: msg.showerror( "Bad Login", "Your login info is incorrect. Please try again.") elif code == UserVerify.WRONG_USER: msg.showerror( "Bad Login", "You don't have permission to access this print.") self.abort = True return self.rates = self.client.rate_get() self.printers = self.client.printer_get() # Create Tk Variables self.vars = struct() v = self.vars v.userid = tk.StringVar(value=printjob.userid) v.notPayer = tk.IntVar(value=printjob.paidBy != printjob.userid) v.payer = tk.StringVar(value=printjob.paidBy) v.length = tk.StringVar(value=printjob.length) v.durationHr = tk.StringVar(value=printjob.duration // 60) v.durationMin = tk.StringVar(value=printjob.duration % 60) v.rate = tk.StringVar(value=printjob.rate.name) v.printer = tk.StringVar(value=printjob.printer) v.finished = tk.IntVar(value=printjob.finished) self.printjob = printjob self.addWidgets()
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) self.addWidgets() self.refreshTree()
def __init__(self, parent, *args, **kwargs): Page.__init__(self, parent, *args, **kwargs) self.vars = struct() self.addWidgets()