Skip to content

Commit

Permalink
Add RSS field in edit user page
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Moura <[email protected]>
  • Loading branch information
phsmoura committed Aug 10, 2023
1 parent fbf562e commit 4212405
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions noggin/form/edit_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ class UserSettingsProfileForm(BaseForm):
validators=[Optional(), URL(message=_('Valid URL required'))],
)

rss_url = URLField(
_('RSS URL'),
validators=[Optional(), URL(message=_('Valid URL required'))],
)

is_private = BooleanField(
_('Private'),
description=_(
Expand Down
1 change: 1 addition & 0 deletions noggin/representation/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class User(Representation):
"pronouns": "faspronoun",
"krbname": "krbcanonicalname",
"roles": "memberof_role",
"rss_url": "fasrssurl",
}
attr_types = {
"sshpubkeys": "list",
Expand Down
1 change: 1 addition & 0 deletions noggin/templates/user-settings-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<div class="form-group">{{ macros.with_errors(form.locale, class="custom-select") }}</div>
<div class="form-group">{{ macros.with_errors(form.timezone, class="custom-select") }}</div>
<div class="form-group">{{ macros.with_errors(form.website_url) }}</div>
<div class="form-group">{{ macros.with_errors(form.rss_url) }}</div>
<div class="form-group mb-4">
<p class="m-0">{{ form.ircnick.label(class_="mt-2") }}</p>
<p class="m-0">
Expand Down
6 changes: 6 additions & 0 deletions noggin/templates/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ <h5 class="mb-3" id="user_mail"><a href="mailto:{{ user.mail }}">{{ user.mail }}
<a href="{{ user.website_url }}" target="_blank">{{ user.website_url }}</a>
</li>
{% endif %}
{% if user.rss_url %}
<li class="list-group-item d-flex justify-content-between align-items-center">
<strong title='{{_("RSS URL")}}'><i class="fa fa-fw fa-link" aria-hidden="true"></i> {{_("RSS URL")}}</strong>
<a href="{{ user.rss_url }}" target="_blank">{{ user.rss_url }}</a>
</li>
{% endif %}
{% if user.rhbz_mail %}
<li class="list-group-item d-flex justify-content-between align-items-center">
<strong title='{{_("RHBZ")}}'><i class="fa fa-fw fa-bug"></i> {{_("RHBZ")}}</strong>
Expand Down

0 comments on commit 4212405

Please sign in to comment.