Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RSS field in edit user page #1216

Merged
merged 2 commits into from Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions news/1216.feature
@@ -0,0 +1 @@
Add the RSS URL to the user profile
5 changes: 5 additions & 0 deletions noggin/form/edit_user.py
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
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
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
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