Permalink
Browse files

Added drupal contrib module commerce_profile_pane via composer

  • Loading branch information...
lpalgarvio committed Dec 27, 2017
1 parent 3645796 commit 3429a373bfbfc4a687aa95ad6b9bfb956c78073c
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,20 @@
INTRODUCTION
------------
The Commerce Profile Pane module provides checkout panes for Drupal Commerce
which output a user's profile form.
REQUIREMENTS
------------
This module requires the following modules:
* Commerce
* Profile (also required by Commerce)
* Inline Entity Form (also required by Commerce)
LIMITATIONS
-----------
For profile types which allow multiple profile entities per user, this loads
the first such profile found.
@@ -0,0 +1,16 @@
name: 'Commerce Profile Pane'
type: module
description: 'Provides a Commerce checkout pane for editing user profiles'
# core: 8.x
package: Commerce
dependencies:
- commerce
- commerce_checkout
- profile
- inline_entity_form
# Information added by Drupal.org packaging script on 2017-11-22
version: '8.x-1.0-alpha2'
core: '8.x'
project: 'commerce_profile_pane'
datestamp: 1511364789
@@ -0,0 +1,9 @@
commerce_checkout.commerce_checkout_pane.profile_form:
type: commerce_checkout_pane_configuration
mapping:
form_mode:
type: string
label: 'Form mode'
display_label:
type: string
label: 'Display label'
@@ -0,0 +1,35 @@
<?php
namespace Drupal\commerce_profile_pane;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\inline_entity_form\ElementSubmit;
/**
* Provides #ief_element_submit, the submit version of #element_validate.
*
* #ief_element_submit callbacks are invoked by a #submit callback added
* to the form's main submit button.
*
* **NOT CURRENTLY IN USE**
*
* @see \Drupal\commerce_profile_pane\Plugin\Commerce\CheckoutPane\Profile::buildPaneForm()
*/
class CheckoutPaneElementSubmit extends ElementSubmit {
/**
* {@inheritdoc}
*/
public static function attach(&$form, FormStateInterface $form_state) {
// We need this override as the pane form doens't have any of the action
// buttons that the parent attach() method looks for.
// The parent method will already have been called by
// \Drupal\inline_entity_form\Element\InlineEntityForm::processEntityForm()
// and so the guard property will be set. So ignore it, as we know the
// parent class's attach() will have done nothing.
static::addCallback($form['actions']['next'], $form);
}
}
Oops, something went wrong.

0 comments on commit 3429a37

Please sign in to comment.