Beispiel #1
0
    def updateHandler(self):
        data, errors = self.extract()

        if not errors:
            site = self.context

            if site.disabled != data['disabled']:
                site.disabled = data['disabled']
                if site.disabled:
                    utils.disableHost(site)
                else:
                    utils.enableHost(site)

            self.message('Site info has been updated.')
Beispiel #2
0
    def updateHandler(self, action):
        data, errors = self.extractData()

        if not errors:
            site = self.context

            if site.disabled != data['disabled']:
                site.disabled = data['disabled']
                if site.disabled:
                    utils.disableHost(site)
                else:
                    utils.enableHost(site)

            view.addMessage(self.request, 'Site info has been updated.')