Beispiel #1
0
class BaseMetaForm(Form):

    itemtype = RequiredText.using(label=L_("Item type")).with_properties(placeholder=L_("Item type"))
    contenttype = RequiredText.using(label=L_("Content type")).with_properties(placeholder=L_("Content type"))
    # Flatland doesn't distinguish between empty value and nonexistent value, use None for noneexistent and Empty for empty
    acl = RequiredText.using(label=L_("ACL")).with_properties(placeholder=L_("Access Control List - Use 'None' for default")).validated_by(ACLValidator())
    summary = OptionalText.using(label=L_("Summary")).with_properties(placeholder=L_("One-line summary of the item"))
    name = Names
    tags = Tags
Beispiel #2
0
class RegisterNewUserForm(Form):
    """
    Simple user registration form for use by SuperUsers to create new accounts.
    """
    name = 'register_new_user'
    username = RequiredText.using(label=L_('Username')).with_properties(placeholder=L_("User Name"), autofocus=True)
    email = YourEmail
    submit_label = L_('Register')
    validators = [ValidRegisterNewUser()]
Beispiel #3
0
class CreateItemForm(BaseChangeForm):
    target = RequiredText.using(label=L_('Target')).with_properties(autofocus=True)