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

Fix phone fieldtype #9097

Merged
merged 2 commits into from Jun 20, 2018

Conversation

Projects
None yet
6 participants
@rdy4ever
Contributor

rdy4ever commented May 19, 2018

Questions Answers
Branch? develop
Description? In the customer address form, the phone field should have the type set to 'tel'. This way, when completing the field on a smartphone, a specific phone keyboard will be used, making the input of the phone easier.
Type? improvement
Category? FO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/BOOM-5577
How to test?

This change is Reviewable

Fix phone filed type
In the customer address form, the phone filed should have the type set to 'tel'. This way, when completing the filed on a smartphone, a specific phone keyboard will be used, making the input of the phone easier.

@prestonBot prestonBot added the develop label May 19, 2018

@PierreRambaud PierreRambaud changed the title from Fix phone filed type to Fix phone fieldtype May 19, 2018

@@ -97,6 +97,9 @@ public function getFormat()
$formField->setRequired(true);
}
}
if ($field === 'phone') {

This comment has been minimized.

@PierreRambaud

PierreRambaud May 19, 2018

Contributor

An elseif or a switch statement could be better 👍

This comment has been minimized.

@rdy4ever

rdy4ever May 20, 2018

Contributor

Hi @PierreRambaud
You are right.
elseif is better, but I don't see the need to use o a switch statement for just 2 cases.
I made another commit.

@rdy4ever

This comment has been minimized.

Contributor

rdy4ever commented Jun 5, 2018

Hey,
Could we merge this?
Thanks!

@PierreRambaud

This comment has been minimized.

Contributor

PierreRambaud commented Jun 5, 2018

Oups forgot to add Waiting for QA feedback, my bad :/

@ntiepresta ntiepresta added QA ✔️ and removed waiting for QA labels Jun 6, 2018

@PierreRambaud PierreRambaud merged commit ed3dba3 into PrestaShop:develop Jun 20, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@MathiasReker

This comment has been minimized.

Contributor

MathiasReker commented Jul 25, 2018

Could we fix zipcode in this PR too?

Add $formField->setType('number');
And then there need to be some css to prevent up and down arrows: .form-control{ -moz-appearance: textfield; }

@PierreRambaud

This comment has been minimized.

Contributor

PierreRambaud commented Jul 25, 2018

Hi, Can you create a new pull request. This one has already been merge ;)

@MathiasReker

This comment has been minimized.

Contributor

MathiasReker commented Jul 25, 2018

I would like to, but I really can't figure out how to make more than one PR.

I fork prestashop, then I make changes and make a PR.

For next PR, even what I have tried I get all my new changes in the first PR. How do I make a second PR with new content?

@rdy4ever

This comment has been minimized.

Contributor

rdy4ever commented Jul 25, 2018

@Mreker, you need to create a new branch for each PR

@PierreRambaud

This comment has been minimized.

Contributor

PierreRambaud commented Jul 25, 2018

After you fork this repository:

$ cd path/to/prestashop
$ # You must have two remote, your fork, and your repository, here's mine
$ git remote -v
origin	git@github.com:PierreRambaud/PrestaShop.git (fetch)
origin	git@github.com:PierreRambaud/PrestaShop.git (push)
upstream	git@github.com:PrestaShop/PrestaShop.git (fetch)
upstream	git@github.com:PrestaShop/PrestaShop.git (push)
$ # If you don't have upstream you can run this command$
$ git remote add upstream https://github.com/PrestaShop/PrestaShop.git
$ # make sur you develop branch is up to date
$ git checkout develop && git pull upstream develop
$ # Update your fork
$ git push origin develop
$ # If something wrong, force the update 
$ git push -f origin develop
$ # Create a new branch
$ git checkout -b fix/branch-name
$ # Add your changes, you can play with git add -p command =)
$ # commit your changes
$ git commit 
$ git push origin fix/branch-name

After you can create a Pull Request based on your branch fix/branch-name that target develop
:)

@MathiasReker

This comment has been minimized.

Contributor

MathiasReker commented Jul 25, 2018

Thank you! Now I understand. #9380

@PierreRambaud PierreRambaud added this to the 1.7.5.0 milestone Jul 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment