Ejemplo n.º 1
0
 class fields(ew_core.NameList):
     name = ew.TextField()
     redirect = ew.TextField()
     homepage = ffw.AutoResizeTextarea()
     allow_browse = ew.Checkbox(label='')
     show_title = ew.Checkbox(label='')
     css = ffw.AutoResizeTextarea()
     project_template = ffw.AutoResizeTextarea(validator=V.JsonValidator(
         if_empty=''))
     icon = ew.FileField()
     tracking_id = ew.TextField()
     project_list_url = ew.TextField(validator=fev.URL())
Ejemplo n.º 2
0
 class fields(ew_core.NameList):
     name = ew.TextField()
     redirect = ew.TextField()
     homepage = ffw.AutoResizeTextarea()
     allow_browse = ew.Checkbox(label='')
     show_title = ew.Checkbox(label='')
     use_wiki_page_as_root = ew.Checkbox(label='')
     css = ffw.AutoResizeTextarea()
     project_template = ffw.AutoResizeTextarea(validator=V.JsonValidator(
         if_empty=''))
     icon = ew.FileField(attrs={'accept': 'image/*'})
     tracking_id = ew.TextField()
     project_list_url = ew.TextField()
     anchored_tools = ffw.AutoResizeTextarea()
     prohibited_tools = ffw.AutoResizeTextarea()
Ejemplo n.º 3
0
class W:
    resize_editor = ffw.AutoResizeTextarea()
    project_summary = plw.ProjectSummary()
    add_project = plugin.ProjectRegistrationProvider.get().add_project_widget(antispam=True)
    page_list = ffw.PageList()
    page_size = ffw.PageSize()
    neighborhood_overview_form = ff.NeighborhoodOverviewForm()
    award_grant_form = ff.AwardGrantForm
Ejemplo n.º 4
0
 def fields(self):
     result = [
         ew.TextField(name='summary'),
         ew.SingleSelectField(name='source_branch',
                              label='Source Branch',
                              options=self.source_branches),
         ew.SingleSelectField(name='target_branch',
                              label='Target Branch',
                              options=self.target_branches),
         ffw.AutoResizeTextarea(name='description')
     ]
     return result
Ejemplo n.º 5
0
class MilestonesAdmin(ffw.SortableTable):
    defaults = dict(
        ffw.SortableTable.defaults,
        button=ffw.AdminField(field=ew.InputField(
            css_class='add', field_type='button', value='New Milestone')),
        empty_msg='No milestones have been created.',
        nonempty_msg='Drag and drop the milestones to reorder.',
        repetitions=0)
    fields = [
        ew.HiddenField(name='old_name'),
        ffw.Radio(name='default',
                  label='Default',
                  css_class='default-milestone'),
        ew.Checkbox(name='complete', show_label=True, suppress_label=True),
        ew.TextField(name='name', attrs={'style': 'width: 80px'}),
        ffw.DateField(name='due_date', attrs={'style': 'width: 80px'}),
        ffw.AutoResizeTextarea(name='description',
                               attrs={'style': 'height:1em; width: 150px'}),
        ew.InputField(label='Delete',
                      field_type='button',
                      attrs={
                          'class': 'delete',
                          'value': 'Delete'
                      }),
    ]
    button = ew.InputField(css_class='add',
                           field_type='button',
                           value='New Milestone')

    def prepare_context(self, context):
        response = super(MilestonesAdmin, self).prepare_context(context)
        if 'value' in response:
            for milestone_data in response['value']:
                if 'name' in milestone_data:
                    milestone_data['old_name'] = milestone_data['name']
        return response

    def resources(self):
        for r in super(MilestonesAdmin, self).resources():
            yield r
        yield ew.CSSScript('''div.state-field table{ width: 700px; }''')