Skip to content

Commit

Permalink
Move warning to the top of the form
Browse files Browse the repository at this point in the history
  • Loading branch information
facutuesca committed Aug 5, 2024
1 parent 1278987 commit ea6355a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions warehouse/templates/manage/project/publishing.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h3 class="callout-block__heading">{% trans %}Proceed with caution!{% endtrans %
{% endmacro %}

{% macro github_form(request, github_publisher_form) %}
{{ prefilled_warning() if prefilled_provider == "github" }}
<p>
{% trans href="https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect" %}
Read more about GitHub Actions' OpenID Connect support <a href="{{ href }}">here</a>.
Expand Down Expand Up @@ -125,14 +126,14 @@ <h3 class="callout-block__heading">{% trans %}Proceed with caution!{% endtrans %
{{ field_errors(github_publisher_form.environment) }}
</div>
</div>
{{ prefilled_warning() if prefilled_provider == "github" }}
<div>
<input type="submit" value="{% trans %}Add{% endtrans %}" class="button button--primary">
</div>
</form>
{% endmacro %}

{% macro gitlab_form(request, gitlab_publisher_form) %}
{{ prefilled_warning() if prefilled_provider == "gitlab" }}
<p>
{% trans href="https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html" %}
Read more about GitLab CI/CD OpenID Connect support <a href="{{ href }}">here</a>.
Expand Down Expand Up @@ -213,14 +214,14 @@ <h3 class="callout-block__heading">{% trans %}Proceed with caution!{% endtrans %
{{ field_errors(gitlab_publisher_form.environment) }}
</div>
</div>
{{ prefilled_warning() if prefilled_provider == "gitlab" }}
<div>
<input type="submit" value="{% trans %}Add{% endtrans %}" class="button button--primary">
</div>
</form>
{% endmacro %}

{% macro google_form(request, google_publisher_form) %}
{{ prefilled_warning() if prefilled_provider == "google" }}
<p>
{% trans href="https://cloud.google.com/iam/docs/service-account-creds" %}
Read more about Google's OpenID Connect support <a href="{{ href }}">here</a>.
Expand Down Expand Up @@ -270,14 +271,14 @@ <h3 class="callout-block__heading">{% trans %}Proceed with caution!{% endtrans %
{{ field_errors(google_publisher_form.sub) }}
</div>
</div>
{{ prefilled_warning() if prefilled_provider == "google" }}
<div>
<input type="submit" value="{% trans %}Add{% endtrans %}" class="button button--primary">
</div>
</form>
{% endmacro %}

{% macro activestate_form(request, activestate_pubisher_form) %}
{{ prefilled_warning() if prefilled_provider == "activestate" }}
<p>
{% trans href="https://docs.activestate.com/platform/user/oidc/" %}
Read more about ActiveState's OpenID Connect support <a href="{{ href }}">here</a>.
Expand Down Expand Up @@ -352,7 +353,6 @@ <h3 class="callout-block__heading">{% trans %}Proceed with caution!{% endtrans %
{{ field_errors(activestate_pubisher_form.actor) }}
</div>
</div>
{{ prefilled_warning() if prefilled_provider == "activestate" }}
<div>
<input type="submit" value="{% trans %}Add{% endtrans %}" class="button button--primary">
</div>
Expand Down

0 comments on commit ea6355a

Please sign in to comment.