Beispiel #1
0
class User(MenuItem):
    grok.viewletmanager(GlobalMenu)
    grok.title('User')
    grok.description('User Description')

    action = "user"
    icon = "@@/dd/pdf.png"
Beispiel #2
0
class ComplexForm(uvcsite.Form):
    """ """
    grok.title(u'KomplexForm')
    grok.description(u"Komplexe Form")
    grok.context(uvcsite.IUVCSite)
    #uvcsite.menu(FormBeispiele)

    ignoreContent = False
    ignoreRequest = False
    fields = uvcsite.Fields(IAdressen)
    #fields['personen'].mode = "bgdp"
    fields['personen'].allowOrdering = False
    fields['personen'].inlineValidation = True

    label = u"Adressen"
    description = u"Adressen"

    def update(self):
        super(ComplexForm, self).update()

    @uvcsite.action(u'Abschicken')
    def handleButton(self):
        data, errors = self.extractData()
        print errors
        import pdb
        pdb.set_trace()
Beispiel #3
0
class MyForm(uvcsite.Form):
    grok.title(u'Beispielform')
    grok.description(u"Beschreibugn Beschreibugn")
    grok.context(Interface)

    ignoreContent = False
    ignoreRequest = False
    fields = uvcsite.Fields(IPerson)
    fields['geschlecht'].mode = "radio"
    fields['name'].htmlAttributes['maxlength'] = 10
    fields['vorname'].htmlAttributes['placeholder'] = u"BLA"
    fields['datum'].htmlAttributes = {'placeholder': 'tt.mm.jjjj'}
    fields['check'].htmlAttributes = {'disabled': 'disabled'}
    fields['datum'].mode = "dp-date"

    label = u"Beispielform"
    description = u"Beschreibung"
    legend = "LEGENDE"

    def update(self):
        self.setContentData(uvcsite.DictDataManager(dict(name="Klaus")))
        double.need()
        masked_input.need()

    @uvcsite.action(u'Abschicken')
    def handleButton(self):
        data, errors = self.extractData()
        if errors or self.errors:
            self.flash(u"FEHLER", type="error")
            return
        self.flash('Alles Klar')
Beispiel #4
0
class UnfallanzeigeRegistration(uvcsite.ProductRegistration):
    grok.name('KinderUnfallanzeige')
    grok.title('Kinder Unfallanzeige')
    grok.description('Kinder Unfallanzeige')
    grok.order(51)
    uvcsite.productfolder('ukh.spsuaz.components.SUnfallanzeigen')

    def action(self):
        return "%sSunfallanzeigen/add" % uvcsite.getHomeFolderUrl(self.request)
Beispiel #5
0
class AdressBook(uvcsite.ProductFolder):
    grok.name('adressbook')
    grok.title('Adressbuch')
    grok.description('Adressbuch ...')
    uvcsite.contenttype(Contact)

    @property
    def excludeFromNav(self):
        interaction = zope.security.management.getInteraction()
        principal = interaction.participations[0].principal
        if principal.id == "0202020002":
            return True
        return False
Beispiel #6
0
class BGVExampleForm(uvcsite.Form):
    """ """
    grok.name('sform')
    grok.title(u'oKomplexForm')
    grok.description(u"oKomplexe Form")
    grok.context(uvcsite.IUVCSite)

    ignoreContent = False
    ignoreRequest = False
    fields = uvcsite.Fields(IAdressen)

    label = u"Adressen"
    description = u"Adressen"

    @uvcsite.action(u'Abschicken')
    def handleButton(self):
        data, errors = self.extractData()
        print errors.title
Beispiel #7
0
class ErsteHilfePR(uvcsite.ProductRegistration):
    grok.name('ErsteHilfe')
    grok.title('ErsteHilfe')
    grok.description('Hess Gis Lorem Ipsoum')
    uvcsite.productfolder('ukh.erstehilfe.components.ErsteHilfe')
Beispiel #8
0
class AddressBook(uvcsite.content.components.ProductFolder):
    grok.name('addressbook')
    grok.title('Adressbuch')
    grok.description('Adressbuch ...')
    uvcsite.content.directive.contenttype(Contact)
Beispiel #9
0
class RoleWithI18nTitle(grok.Role):
    grok.name('RoleWithI18nTitle')
    grok.title(_('RoleWithI18n'))
    grok.description(_(u'My role with i18n'))
Beispiel #10
0
class RoleWithoutI18n(grok.Role):
    grok.name('RoleWithoutI18n')
    grok.description('My role without i18n')
Beispiel #11
0
class HessGisPR(uvcsite.ProductRegistration):
    grok.name('HessGis')
    grok.title('HessGISS')
    grok.description('Hess Gis Lorem Ipsoum')
    uvcsite.productfolder('ukh.hessgis.components.HessGis')
Beispiel #12
0
class Actions(Menu):
    """context actions menu
    """
    grok.name('actions')
    grok.title(_(u'Actions menu'))
    grok.description('')
Beispiel #13
0
class Navigation(Menu):
    """main navigation menu
    """
    grok.name('navigation')
    grok.title(_(u'Navigation menu'))
    grok.description('')
Beispiel #14
0
class UAZRegistration(ProductRegistration):
    grok.name('Unfallanzeige')
    grok.title('Unfallanzeige')
    grok.description('Elektronische Unfallanzeige')
Beispiel #15
0
class Addressbook(ProductRegistration):
    grok.name('adressbook')
    grok.title('Adressbuch')
    grok.description('Beschreibung Entgeltnachweis')
    productfolder('uvcsite.examples.simpleaddon.AdressBook')