def __init__(self, vsrv_num): CTK.Container.__init__(self) self._pre = 'vserver!%s' % (vsrv_num) if self._can_proceed(): self += CTK.DruidButtonsPanel_Create() else: self += CTK.RawHTML('<p>%s</p>' % (self._msg)) self += CTK.DruidButtonsPanel_Cancel()
def __call__ (self): cont = CTK.Container() cont += CTK.RawHTML ('<h2>%s</h2>' %(_(NOTE_WELCOME_H1))) cont += Wizard.Icon ('icons', {'class': 'wizard-descr'}) box = CTK.Box ({'class': 'wizard-welcome'}) box += CTK.RawHTML ('<p>%s</p>' %(_(NOTE_WELCOME_P1))) cont += box icons, themes = self._check_config() if False in [icons, themes]: # Send the VServer num tmp = re.findall (r'^/wizard/vserver/(\d+)/', CTK.request.url) submit = CTK.Submitter (URL_APPLY) submit += CTK.Hidden('%s!vsrv_num'%(PREFIX), tmp[0]) submit += CTK.Hidden('%s!icons'%(PREFIX), ('0','1')[icons]) submit += CTK.Hidden('%s!themes'%(PREFIX), ('0','1')[themes]) submit += CTK.Hidden('final', '1') cont += submit cont += CTK.DruidButtonsPanel_Create() else: cont += CTK.RawHTML ('<p>%s</p>' %(_(NOTE_WELCOME_ERR))) cont += CTK.DruidButtonsPanel_Cancel() return cont.Render().toStr()