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/11010] HTML5 input types for form fields #1000
Conversation
Interesting... It's the 1000th PR! PARTY! |
@@ -161,7 +161,7 @@ | |||
'PLACE_INLINE' => 'Place inline', | |||
'POLL_DELETE' => 'Delete poll', | |||
'POLL_FOR' => 'Run poll for', | |||
'POLL_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending poll.', | |||
'POLL_FOR_EXPLAIN' => 'Enter 0 for a never ending poll.', |
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.
What is the initial value? If initial value is empty and user is required to enter 0, I don't think this is acceptable.
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.
Initial value is 0. Also, if you post a blank string, it gets replaced by 0. So that is why.
Two questions:
|
Just noticed that subsilver2 received some of these changes, 1) do we really want that and 2) I seem to recall subsilver staying html4, is this going to be an issue? |
Inputs of unknown types falls back to type="text", so no harm is made. It was discussed in RFC. I am not sure about subsilver2 then. Vinny did the original changes and included subsilver2, but if you want, I can delete commits that change subsilver2. |
What happens if an older browser encounters this markup? And by "older" I mean 1) firefox 3 and 2) links/lynx. @p the field will be analyzed as normal, ie as a simple text input. Just noticed that subsilver2 received some of these changes, 1) do we really want that and 2) I seem to recall subsilver staying html4, is this going to be an issue? The current subsilver2 is with HTML5 ( |
OK then, sounds like you have all the bases covered. Please take out the .orig file. |
In 3b2c53d: second line of commit message is not space: and removing it from prosilver wher it should not be. |
There were 2 failures:
/home/phpdev/test-phpbb/tests/functions_acp/build_cfg_template_test.php:89
/home/phpdev/test-phpbb/tests/functions_acp/build_cfg_template_test.php:89 |
Someone needs to fix the test suite, the rest of it looks a-ok to me. |
I would like to reword 3b2c53d, but when I do |
That is probably anywhere between difficult and impossible, you can leave it alone. |
The simplest thing probably would be to start on current develop and cherry-pick each commit in this PR. If you get major conflicts, again, you can leave it be. |
Actually it doesn't look so bad. git checkout ticket/11010 Delete any commits not listed in this PR. Fix conflicts, there should only be 1 or 2. If you do this please squash the commit deleting the orig file into the commit that added it. After you do this, rebase again and reword the offending commit. |
In fact it is a problem. I did everything according to your instructions. There were 2 conflicts. I resloved them. I could not squash commit, because I cannot find commit adding .orig file. Whatsmore, After I finished rebasing, it resulted in error, that ref cannot be updatet because it should be on another commit that it is:
I fixed it by modifying commit ID in .git/refs/heads/ticket/11010, but after I tried to rebase it again to reword the commit, it gave me hute lost of commits again. Well, I do not know it it is possible to reword it. I have another idea: I can just simply copy all files and create new PR, include only one commit adding everything in this PR. |
Most likely you did not start with a clean tree/staging area/rebase state etc. and that is why you received that error. Make sure you completely cancel out any rebases in progress and your repository is in good shape. Then rebase this branch on develop without any changes to commits. Only fix the conflicts. Checkpoint the result. Then rebase and reword the commit. Then rebase and squash orig delete. To find out which commit added it: git blame HEAD^ path.orig after you do all the other steps. |
Ok I give up. I tried to do it with your instructions, but after I fixed conflicts and ran rebase again, the same conflicts appeared (any yes, I used |
$size = (int) $tpl_type[1]; | ||
$maxlength = (int) $tpl_type[2]; | ||
$min = (int) $tpl_type[1]; | ||
$max = $maxlength = (int) $tpl_type[2]; |
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 was an API change. The first parameter was size and is now min.
I don't see dimension being used anywhere in phpbb tree, therefore you may be able to do this but you need to get approval from more developers.
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.
It's okay with me.
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 is still not right.
min/max refer to the magnitude of the value, maxlength refers to the number of digits in the value. For a max=1000, maxlength=4.
maxlength could perhaps be a ceil(log10(max)).
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.
Behavior like this should not change, it will break any mod that uses this in the ACP and it will probably not be the easiest to recognize why this changed.
Doesn't number do what you changed dimension to?
I did the first rebase, you can now reword that commit. Tests fail due to an API change - see my previous comment. |
In 5a936918d1c6a8b912553486cda7d2ebf49249eb: second line of commit message is not space: and removing it from prosilver wher it should not be. |
Ok I tried, even though some problems occured. I hope it is fine now. And about your comment to dimension: you have already fixed the problem with a14aaee or am I to fix it? |
git checkout ticket/11010
|
Here is the RFC: |
This massively conflicted with the colon merge. |
@senky please merge or rebase on develop to deal with the colon conflicts. |
Ok I will try. If it will be too problematic, I will maybe rewrite all changes to newest source and push it here. |
I have successfully rebased on develop and resolved all conflicts with L_COLON. I hope it is ready to merge now. |
PHPBB3-11010
PHPBB3-11010
PHPBB3-11010
PHPBB3-11010
PHPBB3-11010
Add new HTML5 input types to installer PHPBB3-11010
Add all new HTML5 input types to functions_acp.php, handle them as text for now PHPBB3-11010
Change input type to search for search forms Replace search placeholder JS with placeholder attribute Add style for search placeholder PHPBB3-11010
PHPBB3-11010
Add type="email" to fields that should be email fields Change back to type="text" fields that might have wildcards or not necessary email PHPBB3-11010
PHPBB3-11010
PHPBB3-11010
@EXreaction tests are failing, but after inspection, you can see, that the problem is in downloading dependencies, so travis problem. Tests should pass. |
@@ -399,8 +399,7 @@ function main($id, $mode) | |||
'legend1' => 'ACP_SECURITY_SETTINGS', | |||
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), | |||
'allow_password_reset' => array('lang' => 'ALLOW_PASSWORD_RESET', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), | |||
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']), | |||
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true), |
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.
What happened to this setting?
Besides the config setting that went missing, I think everything looks acceptable. If someone else would please review all the changes as well and respond back if they think everything looks good that would be very helpful since there were so many changes here and it's easy to miss something. |
case 'range': | ||
case 'search': | ||
case 'tel': | ||
case 'time': |
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.
done twice
PHPBB3-11010
Thanks for your comments. Problems have been resolved. I hope now it is ok. |
Looks good. Can't find any errors |
Merged, thanks for all the hard work! |
Yeah! Finally after 8 months :). Thanks to all collaborators! |
The proposal is to use the new input types for form fields(new HTML5 feature). The idea is to use types like email and url to the browser automatically validate the fields.
RFC & discussion: http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=43159
http://tracker.phpbb.com/browse/PHPBB3-11010
PHPBB3-11010