示例#1
0
文件: adif.py 项目: LANJr4D/FRED
    def unblock(self, id):
        context = DictLookup()
        try:
            reg_id = int(id)
        except (TypeError, ValueError):
            context.message = _("Required_integer_as_parameter")
            raise CustomView(self._render('error', ctx=context))

        return_message = [
            _(u'You can return back to '),
            a(attr(href=f_urls[self.classname] + 'detail/?id=%s' % reg_id),
              _('registrar.'))
        ]

        admin = cherrypy.session.get('Admin')
        if not admin.isRegistrarBlocked(reg_id):
            context.message = [_("This registrar is not blocked.")] + return_message
            return self._render('error', ctx=context)
        else:
            log_req = utils.create_log_request('RegistrarUpdate', [['blocked', 'False']], [[self.classname, reg_id]])
            try:
                admin.unblockRegistrar(reg_id, log_req.request_id)
                log_req.result = 'Success'
            finally:
                log_req.close()

            context.main = [_("Registrar successfully unblocked.")] + return_message
            return self._render('base', ctx=context)
示例#2
0
    def unblock(self, id):
        context = DictLookup()
        try:
            reg_id = int(id)
        except (TypeError, ValueError):
            context.message = _("Required_integer_as_parameter")
            raise CustomView(self._render('error', ctx=context))

        return_message = [
            _(u'You can return back to '),
            a(attr(href=f_urls[self.classname] + 'detail/?id=%s' % reg_id),
              _('registrar.'))
        ]

        admin = cherrypy.session.get('Admin')
        if not admin.isRegistrarBlocked(reg_id):
            context.message = [_("This registrar is not blocked.")
                               ] + return_message
            return self._render('error', ctx=context)
        else:
            log_req = utils.create_log_request('RegistrarUpdate',
                                               [['blocked', 'False']],
                                               [[self.classname, reg_id]])
            try:
                admin.unblockRegistrar(reg_id, log_req.request_id)
                log_req.result = 'Success'
            finally:
                log_req.close()

            context.main = [_("Registrar successfully unblocked.")
                            ] + return_message
            return self._render('base', ctx=context)
示例#3
0
 def index(self):
     context = DictLookup()
     context.main = ul(
         li(
             a(
                 attr(
                     href=
                     '''/file/filter/?json_data=[{%22presention|CreateTime%22:%22on%22,%22CreateTime/3%22:%2210%22,%22CreateTime/0/0%22:%22%22,%22CreateTime/0/1/0%22:%220%22,%22CreateTime/0/1/1%22:%220%22,%22CreateTime/1/0%22:%22%22,%22CreateTime/1/1/0%22:%220%22,%22CreateTime/1/1/1%22:%220%22,%22CreateTime/4%22:%22-2%22,%22CreateTime/2%22:%22%22,%22presention|Type%22:%22000%22,%22Type%22:%225%22}]'''
                 ), _('Domain expiration letters'))))
     return self._render('summary', ctx=context)
示例#4
0
文件: adif.py 项目: LANJr4D/FRED
 def index(self):
     context = DictLookup()
     context.main = p(
         "Logging has been disabled, Daphne could not connect to CORBA logd.")
     return self._render('base', ctx=context)
示例#5
0
文件: adif.py 项目: LANJr4D/FRED
 def index(self):
     context = DictLookup()
     context.main = ul(li(a(attr(href='''/file/filter/?json_data=[{%22presention|CreateTime%22:%22on%22,%22CreateTime/3%22:%2210%22,%22CreateTime/0/0%22:%22%22,%22CreateTime/0/1/0%22:%220%22,%22CreateTime/0/1/1%22:%220%22,%22CreateTime/1/0%22:%22%22,%22CreateTime/1/1/0%22:%220%22,%22CreateTime/1/1/1%22:%220%22,%22CreateTime/4%22:%22-2%22,%22CreateTime/2%22:%22%22,%22presention|Type%22:%22000%22,%22Type%22:%225%22}]'''), _('Domain expiration letters'))))
     return self._render('summary', ctx=context)
示例#6
0
 def index(self):
     context = DictLookup()
     context.main = p(
         "Logging has been disabled, Daphne could not connect to CORBA logd."
     )
     return self._render('base', ctx=context)
 def index(self, *args, **kwargs):
     context = DictLookup()
     context.main = 'Welcome on the contact verification page.'
     return self._render('base', ctx=context)
示例#8
0
 def index(self):
     context = DictLookup()
     context.main = ul(li(a(attr(href='''/file/filter/?json_data=[{%22presention|CreateTime%22:%22on%22,%22CreateTime/3%22:%2210%22,%22CreateTime/0/0%22:%22%22,%22CreateTime/0/1/0%22:%220%22,%22CreateTime/0/1/1%22:%220%22,%22CreateTime/1/0%22:%22%22,%22CreateTime/1/1/0%22:%220%22,%22CreateTime/1/1/1%22:%220%22,%22CreateTime/4%22:%22-2%22,%22CreateTime/2%22:%22%22,%22presention|Type%22:%22000%22,%22Type%22:%225%22}]'''), _('Domain expiration letters'))))
     context.main.add(li(a(attr(href='/domain/import_notif_emails/'),
                           _('Import emails for out-of-zone notification'))))
     return self._render('summary', ctx=context)