class fields(ew_core.NameList):
     num_replies = ew.HTMLField(show_label=True, label='Num Replies')
     num_views = ew.HTMLField(show_label=True)
     flags = ew.HTMLField(show_label=True,
                          text="${unicode(', '.join(value))}")
     last_post = ew.HTMLField(text="${value and value.summary()}",
                              show_label=True)
Ejemplo n.º 2
0
    def fields(self):
        fields = [
            ew.TextField(name=g.antispam.enc('username'), label='Username', attrs={
                'autofocus': 'autofocus',
                'placeholder': 'Username' if plugin.ThemeProvider.get().use_input_placeholders() else '',
                'autocomplete': 'username',
                'autocapitalize': 'none',
            }),
            ew.PasswordField(name=g.antispam.enc('password'), label='Password', attrs={
                'placeholder': 'Password' if plugin.ThemeProvider.get().use_input_placeholders() else '',
                'autocomplete': 'current-password',
            }),
            ew.Checkbox(
                name=g.antispam.enc('rememberme'),
                label='Remember Me',
                attrs={'style': 'margin-left: 162px;'}),
            ew.HiddenField(name='return_to'),
        ]
        if plugin.AuthenticationProvider.get(request).forgotten_password_process:
            # only show link if auth provider has method of recovering password
            fields.append(
                ew.HTMLField(
                    name='link',
                    text='<a href="/auth/forgotten_password" style="margin-left:162px" target="_top">'
                         'Forgot password?</a>'))

        for fld in g.antispam.extra_fields():
            fields.append(
                ew_core.Widget(template=ew.Snippet(fld)))

        return fields
Ejemplo n.º 3
0
 class fields(ew_core.NameList):
     project_name = ew.HTMLField(label='Project', show_label=True)
     mount_point = ew.HTMLField(label='App', show_label=True)
     topic = ew.HTMLField(label='Topic', show_label=True)
     type = ew.HTMLField(label='Type', show_label=True)
     frequency = ew.HTMLField(label='Frequency', show_label=True)
     artifact_title = ew.HTMLField(label='Artifact', show_label=True)
     # unsubscribe = SubmitButton()
     unsubscribe = ew.Checkbox(suppress_label=True)
Ejemplo n.º 4
0
 def fields(self):
     fields = [
         ew.TextField(name='username', label='Username', attrs={
             'autofocus': 'autofocus',
         }),
         ew.PasswordField(name='password', label='Password'),
         ew.Checkbox(
             name='rememberme',
             label='Remember Me',
             attrs={'style': 'margin-left: 162px;'}),
         ew.HiddenField(name='return_to'),
     ]
     if plugin.AuthenticationProvider.get(request).forgotten_password_process:
         # only show link if auth provider has method of recovering password
         fields.append(
             ew.HTMLField(
                 name='link',
                 text='<a href="/auth/forgotten_password" style="margin-left:162px" target="_top">'
                      'Forgot password?</a>'))
     return fields
Ejemplo n.º 5
0
    def display(self, **kw):
        cat = kw.get('category')

        self.fields = [
            ew.RowField(
                show_errors=False,
                show_label=False,
                fields=[
                    ew.LinkField(
                        text=cat.fullname,
                        href="/categories/%s" % cat.trove_cat_id),
                    ew.HTMLField(
                        text=cat.shortname,
                        attrs={'disabled':True, 'value':cat.shortname}),
                    ew.SubmitButton(
                        show_errors=False,
                        attrs={'value': 'Remove'})],
                hidden_fields=[
                    ew.HiddenField(
                        name='categoryid',
                        attrs={'value': cat.trove_cat_id})])]
        return super(ForgeForm, self).display(**kw)
 class fields(ew_core.NameList):
     num_topics = ew.HTMLField(show_label=True, label='Topics')
     num_posts = ew.HTMLField(show_label=True, label='Posts')
     last_post = ew.HTMLField(text="${value and value.summary()}",
                              show_label=True)
     subscribed = ew.Checkbox(suppress_label=True, show_label=True)
Ejemplo n.º 7
0
 class fields(ew_core.NameList):
     num_replies = ew.HTMLField(show_label=True, label='Num Posts')
     num_views = ew.HTMLField(show_label=True)
     last_post = ew.HTMLField(text="${value and value.summary()}",
                              show_label=True)
     subscription = ew.Checkbox(suppress_label=True, show_label=True)