Skip to content

Fix advanced settings form #5544

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

Merged
merged 1 commit into from
Mar 27, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion readthedocs/projects/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from urllib.parse import urlparse

from crispy_forms.helper import FormHelper
from crispy_forms.layout import Fieldset, Layout, HTML
from crispy_forms.layout import Fieldset, Layout, HTML, Submit
from django import forms
from django.conf import settings
from django.contrib.auth.models import User
Expand Down Expand Up @@ -239,6 +239,7 @@ def __init__(self, *args, **kwargs):
*self.Meta.per_version_settings,
),
)
self.helper.add_input(Submit('save', _('Save')))

default_choice = (None, '-' * 9)
all_versions = self.instance.versions.values_list(
Expand Down
7 changes: 1 addition & 6 deletions readthedocs/templates/projects/project_advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,5 @@
{% block project_edit_content_header %}{% trans "Advanced Settings" %}{% endblock %}

{% block project_edit_content %}
<form method="post" action=".">{% csrf_token %}
{% crispy form %}
<p>
<input style="display: inline;" type="submit" value="{% trans "Save" %}">
</p>
</form>
{% crispy form %}
{% endblock %}