def fields(self): provider = plugin.ProjectRegistrationProvider.get() tools_options = [] for ep, tool in six.iteritems(g.entry_points["tool"]): if tool.status == 'production' and tool._installable(tool_name=ep, nbhd=c.project.neighborhood, project_tools=[]): tools_options.append(ew.Option(label=tool.tool_label, html_value=ep)) return ew_core.NameList([ ew.HiddenField(name='project_description', label='Public Description'), ew.HiddenField(name='neighborhood', label='Neighborhood'), ew.Checkbox(name='private_project', label="", attrs={'class': 'unlabeled'}), ew.InputField(name='project_name', label='Project Name', field_type='text', validator=formencode.All( V.UnicodeString(not_empty=True, max=40), V.MaxBytesValidator(max=40)), ), ew.InputField(name='project_unixname', label='Short Name', field_type='text', attrs={ 'title': 'Create a URL name that matches your project name as closely as possible to improve search indexing and maximize visibility.', 'class': 'tooltip' }, validator=provider.shortname_validator), ew.CheckboxSet(name='tools', options=tools_options), ])
class fields(ew_core.NameList): project_description = ew.HiddenField(label='Public Description') neighborhood = ew.HiddenField(label='Neighborhood') private_project = ew.Checkbox(label="", attrs={'class': 'unlabeled'}) project_name = ew.InputField(label='Project Name', field_type='text', validator=formencode.All( fev.UnicodeString(not_empty=True, max=40), V.MaxBytesValidator(max=40))) project_unixname = ew.InputField( label='Short Name', field_type='text', validator=formencode.All( fev.String(not_empty=True), fev.MinLength(3), fev.MaxLength(15), fev.Regex( r'^[A-z][-A-z0-9]{2,}$', messages={ 'invalid': 'Please use only letters, numbers, and dashes 3-15 characters long.' }), NeighborhoodProjectTakenValidator())) tools = ew.CheckboxSet( name='tools', options=[ ## Required for Neighborhood functional tests to pass ew.Option(label='Wiki', html_value='wiki', selected=True) ])
class fields(ew_core.NameList): project_description = ew.HiddenField(label='Public Description') neighborhood = ew.HiddenField(label='Neighborhood') private_project = ew.Checkbox(label="", attrs={'class': 'unlabeled'}) project_name = ew.InputField(label='Project Name', field_type='text', validator=formencode.All( fev.UnicodeString(not_empty=True, max=40), V.MaxBytesValidator(max=40))) project_unixname = ew.InputField( label='Short Name', field_type='text', validator=None) # will be set in __init__ tools = ew.CheckboxSet( name='tools', options=[ ## Required for Neighborhood functional tests to pass ew.Option(label='Wiki', html_value='wiki', selected=True) ])
class fields(ew_core.NameList): subject = ew.InputField(label='Change subject:', attrs={'style':'width: 50%'}) discussion = _ForumSelector(label='Move to different forum:') flags = ew.CheckboxSet(label='Options', options=['Sticky', 'Announcement'])
class fields(ew_core.NameList): discussion = _ForumSelector(label='New Forum') flags = ew.CheckboxSet(options=['Sticky', 'Announcement'])
class fields(ew_core.NameList): discussion = _ForumSelector(label='Move to different forum:') flags = ew.CheckboxSet(label='Options', options=['Sticky', 'Announcement'])