예제 #1
0
 /**
  * Return header title part of html for payment solution
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  *
  * @return string
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 protected function _getHeaderTitleHtml($element)
 {
     $html = '<div class="config-heading meli" ><div class="heading"><strong id="meli-logo">' . $element->getLegend();
     $html .= '</strong></div>';
     $html .= '<div class="button-container meli-cards"><button type="button"' . ' class="meli-payment-btn action-configure button' . '" id="' . $element->getHtmlId() . '-head" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Close') . '</span></button></div></div>';
     return $html;
 }
 /**
  * Return header title part of html for payment solution
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 protected function _getHeaderTitleHtml($element)
 {
     $html = '<div class="config-heading EMerchantPayCheckout" ><div class="headingEMerchantPay"><strong>' . $element->getLegend();
     $html .= '</strong>';
     if ($element->getComment()) {
         $html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
     }
     $html .= '</div>';
     $htmlId = $element->getHtmlId();
     $html .= '<div class="button-container"><button type="button"' . ' class="button action-configure' . '" id="' . $htmlId . '-head" onclick="showHideEMPPaymentSolution.call(this, \'' . $htmlId . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Collapse') . '</span></button>';
     $html .= '</div></div>';
     return $html;
 }
예제 #3
0
 /**
  * Return header title part of html for payment solution
  *
  * @param AbstractElement $element
  * @return string
  */
 protected function _getHeaderTitleHtml($element)
 {
     $isPaymentEnabled = '';
     $disabledLegend = '';
     if (!$this->_scopeConfig->isSetFlag(self::XML_PATH_STANDARD_ACTIVE)) {
         $isPaymentEnabled = 'disabled';
         $disabledLegend = __("Checkout Classic Method must be enabled");
     } else {
         if (!$this->_helper->isCountryEnabled()) {
             $isPaymentEnabled = 'disabled';
             $disabledLegend = __("MercadoEnvios is not enabled in the country where Mercado Pago is configured");
         }
     }
     $html = '<div class="config-heading" ><div class="heading"><strong id="meen-logo"><div class="meli-legend">' . $element->getLegend();
     $html .= '</div></strong>';
     $html .= '<div class="button-container"><button ' . $isPaymentEnabled . ' type="button"' . ' class="button meli-payment-btn action-configure ' . $isPaymentEnabled . ' ' . '" id="' . $element->getHtmlId() . '-head" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Close') . '</span></button><div class="disabled-legend"> ' . $disabledLegend . '</div></div></div>';
     $html .= '</div>';
     return $html;
 }
예제 #4
0
파일: Payment.php 프로젝트: aiesh/magento2
 /**
  * Return header title part of html for payment solution
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  */
 protected function _getHeaderTitleHtml($element)
 {
     $html = '<div class="config-heading" ><div class="heading"><strong>' . $element->getLegend();
     $groupConfig = $element->getGroup();
     $html .= '</strong>';
     if ($element->getComment()) {
         $html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
     }
     $html .= '</div>';
     $disabledAttributeString = $this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"';
     $disabledClassString = $this->_isPaymentEnabled($element) ? '' : ' disabled';
     $htmlId = $element->getHtmlId();
     $html .= '<div class="button-container"><button type="button"' . $disabledAttributeString . ' class="button action-configure' . (empty($groupConfig['paypal_ec_separate']) ? '' : ' paypal-ec-separate') . $disabledClassString . '" id="' . $htmlId . '-head" onclick="paypalToggleSolution.call(this, \'' . $htmlId . "', '" . $this->getUrl('adminhtml/*/state') . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Close') . '</span></button>';
     if (!empty($groupConfig['more_url'])) {
         $html .= '<a class="link-more" href="' . $groupConfig['more_url'] . '" target="_blank">' . __('Learn More') . '</a>';
     }
     if (!empty($groupConfig['demo_url'])) {
         $html .= '<a class="link-demo" href="' . $groupConfig['demo_url'] . '" target="_blank">' . __('View Demo') . '</a>';
     }
     $html .= '</div></div>';
     return $html;
 }
예제 #5
0
 /**
  * @param AbstractElement $element
  * @return string
  * @SuppressWarnings(PHPMD.UnusedLocalVariable)
  */
 protected function _getHeaderHtml($element)
 {
     $id = $element->getHtmlId();
     $default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
     $html = '<h4 class="icon-head head-edit-form">' . $element->getLegend() . '</h4>';
     $html .= '<fieldset class="config" id="' . $element->getHtmlId() . '">';
     $html .= '<legend>' . $element->getLegend() . '</legend>';
     // field label column
     $html .= '<table cellspacing="0"><colgroup class="label" /><colgroup class="value" />';
     if (!$default) {
         $html .= '<colgroup class="use-default" />';
     }
     $html .= '<tbody>';
     return $html;
 }
예제 #6
0
 /**
  * Return header title part of html for fieldset
  *
  * @param AbstractElement $element
  * @return string
  */
 protected function _getHeaderTitleHtml($element)
 {
     return '<a id="' . $element->getHtmlId() . '-head" href="#' . $element->getHtmlId() . '-link" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;">' . $element->getLegend() . '</a>';
 }