class fields(WidgetsList): came_from = HiddenField(validator=NotEmpty) associableid = HiddenField(validator=NotEmpty) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) email = TextField(label_text=l_('E-Mail'), size=TF_SIZE, validator=All(Email, NotEmpty)) text = TextArea(label_text=l_('Text'), rows=TA_ROWS, cols=TA_COLS)
class fields(WidgetsList): uri = TextField(label_text='URI', size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) languageid = SingleSelectField(label_text=l_('Language'), size=SF_SIZE) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) description = TextArea(label_text=l_('Description'), rows=TA_ROWS, cols=TA_COLS) tagids = TextField(label_text=l_('Tags'), size=TF_SIZE, attrs=dict(title=l_('Comma separated list of tags')))
class fields(WidgetsList): _method = HiddenField(default='PUT', validator=None) commentid = HiddenField(validator=NotEmpty) id_ = TextField(size=TF_SIZE, validator=None, disabled=True) date_ = TextField(label_text=l_('Date'), size=TF_SIZE, validator=None, disabled=True) to_ = TextField(label_text=l_('To'), size=TF_SIZE, validator=None, disabled=True) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) email = TextField(label_text=l_('E-Mail'), size=TF_SIZE, validator=All(Email, NotEmpty)) text = TextArea(label_text=l_('Text'), rows=TA_ROWS, cols=TA_COLS)
class GroupForm(ListForm): template = 'admin/box-form.html' id = 'group-form' css_class = 'form' submit_text = None show_children_errors = True event = events.Admin.GroupForm fields = [ TextField('display_name', label_text=N_('Display Name'), validator=TextField.validator(not_empty=True), maxlength=255), TextField('group_name', label_text=N_('Groupname'), validator=All(PlainText(not_empty=True), UniqueGroupname()), maxlength=16), CheckBoxList( 'permissions', label_text=N_('Group Permissions'), css_classes=['details_fieldset'], options=lambda: DBSession.query(Permission.permission_id, Permission.description).all()), SubmitButton('save', default=N_('Save'), named_button=True, css_classes=['btn', 'btn-save', 'blue', 'f-rgt']), SubmitButton('delete', default=N_('Delete'), named_button=True, css_classes=['btn', 'btn-delete']), ]
class fields(WidgetsList): categoryid = SingleSelectField(label_text=l_('Category'), size=SF_SIZE) languageid = SingleSelectField(label_text=l_('Language'), size=SF_SIZE) title = TextField(label_text=l_('Title'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(50))) text = TextArea(label_text=l_('Text'), rows=20, cols=TA_COLS) tagids = TextField(label_text=l_('Tags'), size=TF_SIZE, attrs=dict(title=l_('Comma separated list of tags')))
class fields(WidgetsList): _method = HiddenField(default='PUT', validator=None) tagid = HiddenField(validator=NotEmpty) id_ = TextField(size=TF_SIZE, validator=None, disabled=True) languageid = CascadingSingleSelectField(label_text=l_('Language'), size=SF_SIZE, cascadeurl=tg.url('/tag/translation'), extra=['tagid']) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255)))
class fields(WidgetsList): _method = HiddenField(default='PUT', validator=None) linkid = HiddenField(validator=NotEmpty) id_ = TextField(size=TF_SIZE, validator=None, disabled=True) uri = TextField(label_text='URI', size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) languageid = CascadingSingleSelectField(label_text=l_('Language'), size=SF_SIZE, cascadeurl=tg.url('/link/translation'), extra=['linkid']) version = CascadingSingleSelectField(label_text=l_('Version'), size=SF_SIZE, cascadeurl=tg.url('/link/version'), extra=['linkid', 'languageid']) modified = TextField(disabled=True, label_text=l_('Last Modified'), validator=None) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) description = TextArea(label_text=l_('Description'), rows=TA_ROWS, cols=TA_COLS) tagids = TextField(label_text=l_('Tags'), size=TF_SIZE, attrs=dict(title=l_('Comma separated list of tags')))
class fields(WidgetsList): _method = HiddenField(default='PUT', validator=None) categoryid = HiddenField(validator=NotEmpty) id_ = TextField(size=TF_SIZE, validator=None, disabled=True) languageid = CascadingSingleSelectField(label_text=l_('Language'), size=SF_SIZE, cascadeurl=tg.url('/category/translation'), extra=['categoryid']) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(50))) description = TextArea(label_text=l_('Description'), rows=TA_ROWS, cols=TA_COLS)
class fields(WidgetsList): mediatype = HidingSingleSelectField(label_text=l_('Type'), size=SF_SIZE, options=[''] + media_types, mapping={'image': ['uploadfile'], 'video': ['uploadfile', 'fallbackfile'], 'youtube': ['uri'], 'vimeo': ['uri'], }, validator=All(NotEmpty, OneOf(media_types)), ) uri = TextField(label_text='URI', size=TF_SIZE, validator=All(UnicodeString, MaxLength(255))) uploadfile = FileField(label_text=l_('File to upload')) fallbackfile = FileField(label_text=l_('Fallback file')) languageid = SingleSelectField(label_text=l_('Language'), size=SF_SIZE) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) description = TextArea(label_text=l_('Description'), rows=TA_ROWS, cols=TA_COLS) tagids = TextField(label_text=l_('Tags'), size=TF_SIZE, attrs=dict(title=l_('Comma separated list of tags')))
class fields(WidgetsList): _method = HiddenField(default='PUT', validator=None) pageid = HiddenField(validator=NotEmpty) id_ = TextField(size=TF_SIZE, validator=None, disabled=True) languageid = CascadingSingleSelectField(label_text=l_('Language'), size=SF_SIZE, cascadeurl=tg.url('/page/translation'), extra=['pageid']) version = CascadingSingleSelectField(label_text=l_('Version'), size=SF_SIZE, cascadeurl=tg.url('/page/version'), extra=['pageid', 'languageid']) modified = TextField(disabled=True, label_text=l_('Last Modified'), validator=None) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) text = TextArea(label_text=l_('Text'), rows=TA_ROWS, cols=TA_COLS)
class UserForm(ListForm): template = 'admin/box-form.html' id = 'user-form' css_class = 'form' submit_text = None show_children_errors = True _name = 'user-form' # TODO: Figure out why this is required?? event = events.Admin.UserForm fields = [ TextField('display_name', label_text=N_('Display Name'), validator=TextField.validator(not_empty=True), maxlength=255), TextField('email_address', label_text=N_('Email Address'), validator=email_validator(not_empty=True), maxlength=255), ListFieldSet( 'login_details', suppress_label=True, legend=N_('Login Details:'), css_classes=['details_fieldset'], validator=Schema(chained_validators=[ FieldsMatch('password', 'confirm_password', messages={ 'invalidNoMatch': N_("Passwords do not match"), }) ]), children=[ CheckBoxList('groups', label_text=N_('Groups'), options=lambda: Group.custom_groups( Group.group_id, Group.display_name).all()), TextField('user_name', label_text=N_('Username'), maxlength=16, validator=All(PlainText(), UniqueUsername(not_empty=True))), PasswordField('password', label_text=N_('Password'), validators=NotEmpty, maxlength=80, attrs={'autocomplete': 'off'}), PasswordField('confirm_password', label_text=N_('Confirm password'), validators=NotEmpty, maxlength=80, attrs={'autocomplete': 'off'}), ]), SubmitButton('save', default=N_('Save'), named_button=True, css_classes=['btn', 'btn-save', 'blue', 'f-rgt']), SubmitButton('delete', default=N_('Delete'), named_button=True, css_classes=['btn', 'btn-delete']), ]
class fields(WidgetsList): _method = HiddenField(default='PUT', validator=None) languageid = HiddenField(validator=NotEmpty) id_ = TextField(validator=None, disabled=True) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(50)))
class fields(WidgetsList): languageid = TextField(label_text='ID', validator=All(UnicodeString, NotEmpty, MaxLength(5))) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(50)))
class fields(WidgetsList): languageid = SingleSelectField(label_text=l_('Language'), size=SF_SIZE) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255)))
class fields(WidgetsList): articleid = HiddenField(validator=All(UnicodeString, NotEmpty)) languageid = SingleSelectField(label_text=l_('Language'), size=SF_SIZE) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(255))) text = TextArea(label_text=l_('Text'), rows=TA_ROWS, cols=TA_COLS)
class fields(WidgetsList): languageid = SingleSelectField(label_text=l_('Language'), size=SF_SIZE) name = TextField(label_text=l_('Name'), size=TF_SIZE, validator=All(UnicodeString, NotEmpty, MaxLength(50))) description = TextArea(label_text=l_('Description'), rows=TA_ROWS, cols=TA_COLS)