Skip to content

Commit

Permalink
Merge pull request #569 from magento-webdev/bugs
Browse files Browse the repository at this point in the history
[WebDev] Bugfixes
  • Loading branch information
VladimirZaets committed Apr 27, 2016
2 parents 95abd47 + 8e2057c commit 6378276
Show file tree
Hide file tree
Showing 19 changed files with 143 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ protected function createNewCategoryModal(array $meta)
'config' => [
'isTemplate' => false,
'componentType' => 'modal',
'dataScope' => 'data.new_category',
'options' => [
'title' => __('New Category'),
],
Expand Down Expand Up @@ -193,7 +192,6 @@ protected function customizeCategoriesField(array $meta)
'levelsVisibility' => '1',
'elementTmpl' => 'ui/grid/filters/elements/ui-select',
'options' => $this->getCategoriesTree(),
'scopeLabel' => null,
'listens' => [
'index=create_category:responseData' => 'setParsed',
'newOption' => 'toggleOptionSelected'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,12 @@ protected function customizeNewDateRangeField(array $meta)
if ($fromFieldPath && $toFieldPath) {
$fromContainerPath = $this->arrayManager->slicePath($fromFieldPath, 0, -2);
$toContainerPath = $this->arrayManager->slicePath($toFieldPath, 0, -2);
$scopeLabel = $this->arrayManager->get($fromFieldPath . self::META_CONFIG_PATH . '/scopeLabel', $meta);

$meta = $this->arrayManager->merge(
$fromFieldPath . self::META_CONFIG_PATH,
$meta,
[
'label' => __('Set Product as New From'),
'scopeLabel' => null,
'additionalClasses' => 'admin__field-date',
]
);
Expand All @@ -287,7 +285,6 @@ protected function customizeNewDateRangeField(array $meta)
'additionalClasses' => 'admin__control-grouped-date',
'breakLine' => false,
'component' => 'Magento_Ui/js/form/components/group',
'scopeLabel' => $scopeLabel,
]
);
$meta = $this->arrayManager->set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ protected function customizeDateRangeField(array $meta)
$toFieldPath = $this->arrayManager->findPath(self::CODE_CUSTOM_DESIGN_TO, $meta, null, 'children');
$fromContainerPath = $this->arrayManager->slicePath($fromFieldPath, 0, -2);
$toContainerPath = $this->arrayManager->slicePath($toFieldPath, 0, -2);
$scopeLabel = $this->arrayManager->get($fromFieldPath . self::META_CONFIG_PATH . '/scopeLabel', $meta);

$meta = $this->arrayManager->merge(
$fromFieldPath . self::META_CONFIG_PATH,
$meta,
[
'label' => __('Schedule Update From'),
'scopeLabel' => null,
'additionalClasses' => 'admin__field-date',
]
);
Expand All @@ -96,7 +94,6 @@ protected function customizeDateRangeField(array $meta)
'additionalClasses' => 'admin__control-grouped-date',
'breakLine' => false,
'component' => 'Magento_Ui/js/form/components/group',
'scopeLabel' => $scopeLabel,
]
);
$meta = $this->arrayManager->set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,11 @@
<field name="custom_design_from">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Schedule Update From</item>
<item name="additionalClasses" xsi:type="string">admin__field-date</item>
<item name="sortOrder" xsi:type="number">230</item>
<item name="dataType" xsi:type="string">string</item>
<item name="formElement" xsi:type="string">date</item>
<item name="scopeLabel" xsi:type="string"/>
<item name="imports" xsi:type="array">
<item name="disabled" xsi:type="string">ns = ${ $.ns }, index = custom_use_parent_settings :checked</item>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ private function prepareMeta()
'visible' => '1',
'require' => '0',
'additionalClasses' => 'admin__field-small',
'label' => __('Quantity'),
'scopeLabel' => '[GLOBAL]',
'dataScope' => 'qty',
'validation' => [
'validate-number' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
<field name="manage_stock">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Manage Stock</item>
<item name="formElement" xsi:type="string">select</item>
<item name="rawOptions" xsi:type="boolean">true</item>
<item name="dataScope" xsi:type="string">manage_stock</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="value" xsi:type="object">Magento\CatalogInventory\Model\Source\StockConfiguration</item>
</item>
<item name="options" xsi:type="object">Magento\Config\Model\Config\Source\Yesno</item>
Expand Down Expand Up @@ -122,8 +124,10 @@
<field name="min_qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Out-of-Stock Threshold</item>
<item name="formElement" xsi:type="string">input</item>
<item name="dataScope" xsi:type="string">min_qty</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="validation" xsi:type="array">
<item name="validate-number" xsi:type="boolean">true</item>
</item>
Expand Down Expand Up @@ -171,9 +175,11 @@
<field name="min_sale_qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Minimum Qty Allowed in Shopping Cart</item>
<item name="component" xsi:type="string">Magento_CatalogInventory/js/components/qty-validator-changer</item>
<item name="formElement" xsi:type="string">input</item>
<item name="dataScope" xsi:type="string">min_sale_qty</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="validation" xsi:type="array">
<item name="validate-number" xsi:type="boolean">true</item>
<item name="validate-digits" xsi:type="boolean">true</item>
Expand Down Expand Up @@ -225,8 +231,10 @@
<field name="max_sale_qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Maximum Qty Allowed in Shopping Cart</item>
<item name="formElement" xsi:type="string">input</item>
<item name="dataScope" xsi:type="string">max_sale_qty</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="validation" xsi:type="array">
<item name="validate-number" xsi:type="boolean">true</item>
</item>
Expand Down Expand Up @@ -314,9 +322,11 @@
<field name="backorders">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Backorders</item>
<item name="formElement" xsi:type="string">select</item>
<item name="rawOptions" xsi:type="boolean">true</item>
<item name="dataScope" xsi:type="string">backorders</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="value" xsi:type="object">Magento\CatalogInventory\Model\Source\StockConfiguration</item>
</item>
<item name="options" xsi:type="object">Magento\CatalogInventory\Model\Source\Backorders</item>
Expand Down Expand Up @@ -353,7 +363,7 @@
<item name="config" xsi:type="array">
<item name="formElement" xsi:type="string">container</item>
<item name="component" xsi:type="string">Magento_Ui/js/form/components/group</item>
<item name="label" xsi:type="string" translate="true">Use deferred Stock update</item>
<item name="label" xsi:type="string" translate="true">Use Deferred Stock Update</item>
<item name="dataScope" xsi:type="string">stock_data</item>
<item name="sortOrder" xsi:type="number">850</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
Expand All @@ -362,6 +372,8 @@
<field name="deferred_stock_update">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Use Deferred Stock Update</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="formElement" xsi:type="string">select</item>
<item name="rawOptions" xsi:type="boolean">true</item>
<item name="dataScope" xsi:type="string">deferred_stock_update</item>
Expand Down Expand Up @@ -413,7 +425,9 @@
<field name="notify_stock_qty">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Notify for Quantity Below</item>
<item name="formElement" xsi:type="string">input</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="dataScope" xsi:type="string">notify_stock_qty</item>
<item name="validation" xsi:type="array">
<item name="validate-number" xsi:type="boolean">true</item>
Expand Down Expand Up @@ -462,8 +476,10 @@
<field name="enable_qty_increments">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Enable Qty Increments</item>
<item name="formElement" xsi:type="string">select</item>
<item name="rawOptions" xsi:type="boolean">true</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="dataScope" xsi:type="string">enable_qty_increments</item>
<item name="value" xsi:type="object">Magento\CatalogInventory\Model\Source\StockConfiguration</item>
</item>
Expand Down Expand Up @@ -513,9 +529,11 @@
<field name="qty_increments">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Qty Increments</item>
<item name="component" xsi:type="string">Magento_CatalogInventory/js/components/qty-validator-changer</item>
<item name="formElement" xsi:type="string">input</item>
<item name="dataScope" xsi:type="string">qty_increments</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="validation" xsi:type="array">
<item name="validate-number" xsi:type="boolean">true</item>
<item name="validate-digits" xsi:type="boolean">true</item>
Expand Down Expand Up @@ -570,6 +588,8 @@
<field name="is_in_stock">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Stock Status</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
<item name="formElement" xsi:type="string">select</item>
<item name="dataScope" xsi:type="string">is_in_stock</item>
<item name="value" xsi:type="number">1</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@

<fieldset class="fieldset password" data-container="change-email-password">
<legend class="legend"><span data-title="change-email-password"><?php /* @escapeNotVerified */ echo __('Change Email and Password') ?></span></legend><br>
<div class="field password current required">
<label class="label" for="current-password"><span><?php /* @escapeNotVerified */ echo __('Current Password') ?></span></label>
<div class="field email required" data-container="change-email">
<label class="label" for="email"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
<div class="control">
<input type="password" class="input-text" name="current_password" id="current-password" data-input="current-password" autocomplete="off" />
<input type="email" name="email" id="email" autocomplete="email" data-input="change-email" value="<?php echo $block->escapeHtml($block->getCustomer()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" />
</div>
</div>
<div class="field email required" data-container="change-email">
<label class="label" for="email"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
<div class="field password current required">
<label class="label" for="current-password"><span><?php /* @escapeNotVerified */ echo __('Current Password') ?></span></label>
<div class="control">
<input type="email" name="email" id="email" data-input="change-email" value="<?php echo $block->escapeHtml($block->getCustomer()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" />
<input type="password" class="input-text" name="current_password" id="current-password" data-input="current-password" autocomplete="off" />
</div>
</div>
<div class="field new password required" data-container="new-password" data-mage-init='{"passwordStrengthIndicator": {}}'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
<input type="hidden" name="success_url" value="<?php /* @escapeNotVerified */ echo $block->getSuccessUrl() ?>">
<input type="hidden" name="error_url" value="<?php /* @escapeNotVerified */ echo $block->getErrorUrl() ?>">
<?php echo $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($block->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
<div class="field required">
<label for="email_address" class="label"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
<div class="control">
<input type="email" name="email" id="email_address" value="<?php echo $block->escapeHtml($block->getFormData()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}">
</div>
</div>
<?php if ($block->isNewsletterEnabled()): ?>
<div class="field choice newsletter">
<input type="checkbox" name="is_subscribed" title="<?php /* @escapeNotVerified */ echo __('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if ($block->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox">
Expand Down Expand Up @@ -136,7 +130,12 @@
<?php endif; ?>
<fieldset class="fieldset create account" data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>">
<legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Sign-in Information') ?></span></legend><br>

<div class="field required">
<label for="email_address" class="label"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
<div class="control">
<input type="email" name="email" autocomplete="email" id="email_address" value="<?php echo $block->escapeHtml($block->getFormData()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}">
</div>
</div>
<div class="field password required" data-mage-init='{"passwordStrengthIndicator": {}}'>
<label for="password" class="label"><span><?php /* @escapeNotVerified */ echo __('Password') ?></span></label>
<div class="control">
Expand Down
Loading

0 comments on commit 6378276

Please sign in to comment.