-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace forms with a-href links #305
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ nelmio_security_report: | |
|
||
logout: | ||
path: /logout | ||
methods: [POST] | ||
methods: [GET] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,12 +45,12 @@ | |
</div> | ||
{% if app.user %} | ||
<div class="clearfix page-header-user"> | ||
<form method="post" action="{{ logout_url('saml_based') }}" class="pull-right"> | ||
<a href="{{ logout_url('saml_based') }}" class="pull-right"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See previous feedback point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this will work because it changes the POST to a GET, and selfservice does not allow GET requests to the logout endpoint. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's cheating, because the GET-method was only removed two weeks ago ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not quite, in 4.0.9 (released Jun 6, 2023) I can also not use GET for logout, it only accepts POST. |
||
<button type="submit" class="btn btn-link"> | ||
<i class="fa fa-sign-out"></i> | ||
{{ 'button.logout'|trans }} | ||
</button> | ||
</form> | ||
</a> | ||
{% set locale_switcher = stepup_locale_switcher(app.request.locale, 'ss_switch_locale', {'return-url': app.request.uri}) %} | ||
{{ form_start(locale_switcher, { attr: { class: 'form-inline' }}) }} | ||
{{ form_widget(locale_switcher.locale) }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This construction is not 100% yet from a html structure point of view.
I'd say: remove the
<button>
element but keep the button text as the anchor text for the<a>
element. And style the<a>
to make it look like a button. I think we already have utility (css) classes ready for that.Would you be so kind to look into that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I spent the entire afternoon but I can't get it to look visually the same without the button-tags. Leaving it 'as-is', but feel free to try it yourself