Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from PayEx/marketplace-validation
Browse files Browse the repository at this point in the history
Adds config validation
  • Loading branch information
asbjornu authored Jun 17, 2019
2 parents f42af7a + b4378e7 commit b181ce7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Model/ConsumerSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,4 @@ public function setActionType($actionType)
{
$this->storage->setData(self::ACTION_TYPE, $actionType);
}


}
26 changes: 19 additions & 7 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="payment" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
<group id="payex" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="1">
<group id="checkin" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="1">
<section id="payment">
<group id="payex" translate="label" type="text"
sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<group id="checkin" translate="label" type="text"
sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Checkin Configuration</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="active" translate="label" type="select"
sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label>
<config_path>payex/checkin/active</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<depends>
<field id="payex/client/active">1</field>
<field id="payex/checkout/active">1</field>
</depends>
</field>
<field id="required" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="required" translate="label" type="select"
sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Required</label>
<config_path>payex/checkin/required</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>Require login through checkin widget</comment>
<comment><![CDATA[Require login through checkin widget.]]></comment>
<depends>
<field id="active">1</field>
</depends>
</field>
</group>
</group>
Expand Down

0 comments on commit b181ce7

Please sign in to comment.