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

[Admin] Country code immutability #4565

Merged

Conversation

Arminek
Copy link
Contributor

@Arminek Arminek commented Mar 21, 2016

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets #4374
License MIT

@Arminek Arminek force-pushed the country-code-immutability-while-editing branch from d9390f3 to 08e0bc7 Compare March 21, 2016 11:19
*/
private function getMessageElement()
{
$messageElement = $this->createMessageElement();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just use $this->session->find('css', '.message') instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$this->session->getDriver()->find() won't work with css it operates on xpath only but i think we can change this, cuz i can get selectorsHandler from session.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ouch, I meant $this->session->getPage()->find('css', '.message') :) It works with the css selector.

@Arminek Arminek force-pushed the country-code-immutability-while-editing branch from 08e0bc7 to 039c3bc Compare March 21, 2016 11:22
@pjedrzejewski pjedrzejewski added the Admin AdminBundle related issues and PRs. label Mar 21, 2016
@Arminek Arminek force-pushed the country-code-immutability-while-editing branch 2 times, most recently from d5f30c6 to ce648f4 Compare March 21, 2016 15:53
@Arminek Arminek force-pushed the country-code-immutability-while-editing branch from ce648f4 to 77be94f Compare March 22, 2016 09:43
$codeField = $this->getElement('code');
return $codeField->getAttribute('disabled') === 'disabled';
} catch (ElementNotFoundException $exception) {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not catch exception, it will indicate that something is wrong instead of incorrectly saying that code field is not disabled.

Copy link
Member

Choose a reason for hiding this comment

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

👍

@pjedrzejewski pjedrzejewski merged commit 665f870 into Sylius:master Mar 23, 2016
@pjedrzejewski
Copy link
Member

Thank you Arek!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants