Ejemplo n.º 1
0
class BaseNewLoginForm(BaseLoginForm):
    def __init__(self, action, **args):
        BaseLoginForm.__init__(self, action, **args)
        self.confirm_inp = Input(type='password', name='confirm', value='')
        self.submit_btn['value'] = 'Create login info.'
        self.headinfo = Paragraph('New Login Information')
        self.user_inp['name'] = 'username'
        self._make_maintable()

        
    def _make_maintable(self):
        self._maintable = Table()
        self._maintable.append(TableRow(TableHeader(self.headinfo)))
        self._maintable.append(self._make_labelentry('User:  '******'Password:  '******'Confirm Password:  '******'value'] = username
Ejemplo n.º 2
0
 def __init__(self, subhead='subhead', **args):
     Table.__init__(self, width='100%', _class='mainfooter', **args)
     self.a_home = Anchor('Home', href='/')
     self.a_up = Anchor('Up', href='index')
     self.a_reload = Anchor('Reload', href='javascript:document.location.reload()')
     self.mainrow = TableRow()
     self.cell_subhead = TableCell(subhead)
     self.headrow = TableRow(self.cell_subhead)
     self.extend([self.headrow, self.mainrow])
     self.reset_nav_anchors()
Ejemplo n.º 3
0
 def __init__(self, subhead='subhead', **args):
     Table.__init__(self, width='100%', _class='mainfooter', **args)
     self.anchors = []
 
     home = Anchor('Home', href='/')
     up = Anchor('Up', href='index')
     rel = Anchor('Reload', href='javascript:document.location.reload()')
     row = TableRow()
     row.extend(map(TableCell, [home, rel, up]))
     self._subhead = TableCell(subhead, colspan=3)
     head = TableRow(self._subhead)
     self.extend([head, row])
Ejemplo n.º 4
0
 def __init__(self, subhead='subhead', image_=None, **args):
     Table.__init__(self, width='100%', class_='mainheader', colspan=0, **args)
     atts = {'class' : 'mainheader'}
     self.h1 = Header('hello there', 1)
     self.h2 = Header(subhead, 2)
     toprow = TableRow(**atts)
     if image_ is None:
         image_ = Image()
     self._image = image_
     toprow.append(TableCell(image_, align='left', **atts))
     toprow.append(TableCell(self.h1, align='center', **atts))
     self.append(toprow)
     self.append(TableRow(TableCell(self.h2, colspan=3, align='center',
                                    **atts), **atts))
Ejemplo n.º 5
0
class NewUserForm(BaseNewLoginForm):
    def __init__(self, action, **args):
        BaseNewLoginForm.__init__(self, action, **args)
        self.submit_btn['value'] = 'Create'
        self.set_headinfo('Create New User')
    
    def _make_maintable(self):
        self.fname_inp = Input(type='text', name='fullname', value='')
        self._maintable = Table()
        self._maintable.append(TableRow(TableHeader(self.headinfo)))
        self._maintable.append(self._make_labelentry('User:  '******'Full Name:  ', self.fname_inp))
        self._maintable.append(self._make_labelentry('Password:  '******'Confirm Password:  ', self.confirm_inp))
        p = Paragraph(self.clear_btn)
        p.append(self.submit_btn)
        self._maintable.append(TableRow(TableCell(p)))
        self.set(self._maintable)
Ejemplo n.º 6
0
 def _make_maintable(self):
     self._maintable = Table()
     self._maintable.append(TableRow(TableHeader(self.headinfo)))
     self._maintable.append(self._make_labelentry('User:  '******'Password:  '******'Confirm Password:  ', self.confirm_inp))
     p = Paragraph(self.clear_btn)
     p.append(self.submit_btn)
     self._maintable.append(TableRow(TableCell(p)))
     self.set(self._maintable)
Ejemplo n.º 7
0
 def __init__(self, page, **args):
     class_atts = dict(class_='maintable')
     headfoot_atts = dict(colspan=2)
     headfoot_atts.update(class_atts)
     Table.__init__(self, width='100%', **class_atts)
     self._header = MainHeader('hello')
     self._footer = MainFooter('hello')
     self._headcell = TableCell(self._header, **headfoot_atts)
     self._footcell = TableCell(self._footer, **headfoot_atts)
     headrow = TableRow(self._headcell, **class_atts)
     self.append(headrow)
     self._mainrow = TableRow(**class_atts)
     self._mainmenu = MainMenu(width='100%')
     self._mainmenu_cell = TableCell(self._mainmenu, rowspan=1,
                                     colspan=1, valign='top', **class_atts)
     self._mainrow.append(self._mainmenu_cell)
     self._mainpage = TableCell(page, width='75%', align='center', **class_atts)
     self._mainrow.append(self._mainpage)
     self.append(self._mainrow)
     footrow = TableRow(self._footcell, **class_atts)
     self.append(footrow)
Ejemplo n.º 8
0
 def _make_maintable(self):
     self.fname_inp = Input(type='text', name='fullname', value='')
     self._maintable = Table()
     self._maintable.append(TableRow(TableHeader(self.headinfo)))
     self._maintable.append(self._make_labelentry('User:  '******'Full Name:  ', self.fname_inp))
     self._maintable.append(self._make_labelentry('Password:  '******'Confirm Password:  ', self.confirm_inp))
     p = Paragraph(self.clear_btn)
     p.append(self.submit_btn)
     self._maintable.append(TableRow(TableCell(p)))
     self.set(self._maintable)
Ejemplo n.º 9
0
 def __init__(self, cell='One Cell', **args):
     Table.__init__(self, **args)
     self.mainrow = TableRow()
     self.cell = TableCell(cell)
     self.mainrow.set(self.cell)
     self.set(self.mainrow)
Ejemplo n.º 10
0
 def __init__(self, header='BaseMenu', **args):
     Table.__init__(self, **args)
     self._menu = {}
     self.set_header(header)
     self.top_entry = None
     self.bottom_entry = None