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

[ticket/13934] Add enctype clause for profile fields #3733

Merged
merged 1 commit into from Oct 8, 2015
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
2 changes: 1 addition & 1 deletion phpBB/adm/style/acp_profile.html
Expand Up @@ -17,7 +17,7 @@ <h3>{L_WARNING}</h3>
</div>
<!-- ENDIF -->

<form id="add_profile_field" method="post" action="{U_ACTION}">
<form id="add_profile_field" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use <!-- IF ... --> {S_FORM_ENCTYPE}<!-- ENDIF --> all the places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? This is not the way it is done elsewhere in phpbb...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it is a clearer and better way of doing this. You should be able to use <!-- IF S_FORM_ENCTYPE is defined and S_FORM_ENCTYPE is not empty --> {S_FORM_ENCTYPE}<!-- ENDIF -->

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples of usage in other areas of phpbb. And there are a lot more, and none like what you propose.
I don't understand why this would be any different. I prefer consistency across the phpbb software.
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/styles/prosilver/template/ucp_profile_profile_info.html#L3
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/styles/prosilver/template/posting_layout.html#L24

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the enctype attribute as well to the template. If you are bothered by the inconsistency of the template files, please feel free to send a patch for those as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what you wrote, though... ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a space after the quote too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not if used as in other places, see links above. The space is supposed to be included in the template var. But it may be safer if included again here...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont really understand the problem. If something is undefined, using it like above will just be fine. It will be false or whatever and not causing any output. So it has the same result.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just hate HTML in the backend, it should not have got there in the first place.


<!-- IF S_STEP_ONE -->

Expand Down
2 changes: 1 addition & 1 deletion phpBB/adm/style/acp_users_profile.html
@@ -1,4 +1,4 @@
<form id="user_profile" method="post" action="{U_ACTION}">
<form id="user_profile" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space?


<fieldset>
<legend>{L_USER_PROFILE}</legend>
Expand Down
2 changes: 1 addition & 1 deletion phpBB/styles/prosilver/template/ucp_register.html
Expand Up @@ -14,7 +14,7 @@
// ]]>
</script>

<form method="post" action="{S_UCP_ACTION}" id="register">
<form id="register" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space?


<div class="panel">
<div class="inner">
Expand Down