Exemplo n.º 1
0
    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()
Exemplo n.º 2
0
def External_FindPHP():
    # Add PHP if needed
    have_php = check_php_interpreter()
    if not have_php:
        cont = CTK.Container()
        cont += CTK.RawHTML ('<h2>%s</h2>' %(_(NOTE_NOT_FOUND_H1)))
        cont += CTK.RawHTML ('<p>%s</p>' %(_(NOTE_NOT_FOUND)))
        cont += CTK.RawHTML ('<p>%s</p>' %(_(NOTE_NOT_FOUND2)))
        cont += CTK.DruidButtonsPanel_Cancel()
        return cont.Render().toStr()

    return CTK.DruidContent_TriggerNext().Render().toStr()
Exemplo n.º 3
0
    def __call__(self):
        submit = CTK.Submitter(URL_APPLY)
        submit += CTK.Hidden('final', '1')

        cont = CTK.Container()
        cont += CTK.RawHTML('<h2>%s</h2>' % (_(NOTE_CREATE_H1)))
        cont += submit

        if self._check_if_valid():
            cont += CTK.RawHTML('<p>%s</p>' % (_(NOTE_CREATE_OK)))
            cont += CTK.DruidButtonsPanel_PrevCreate_Auto()
        else:
            cont += CTK.RawHTML('<p>%s</p>' % (_(NOTE_CREATE_ERR)))
            cont += CTK.DruidButtonsPanel_Cancel()

        return cont.Render().toStr()
Exemplo n.º 4
0
    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()
Exemplo n.º 5
0
 def Render(self):
     render = Phase.Render(self)
     render += CTK.DruidButtonsPanel_Cancel().Render()
     return render