Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -7,12 +7,19 @@ namespace Drupal\webform\Element;
*
* @FormElement("webform_contact")
*/
class WebformContact extends WebformAddress {
class WebformContact extends WebformCompositeBase {
/**
* {@inheritdoc}
*/
public static function getCompositeElements() {
public function getInfo() {
return parent::getInfo() + ['#theme' => 'webform_composite_contact'];
}
/**
* {@inheritdoc}
*/
public static function getCompositeElements(array $element) {
$elements = [];
$elements['name'] = [
'#type' => 'textfield',
@ -30,7 +37,32 @@ class WebformContact extends WebformAddress {
'#type' => 'tel',
'#title' => t('Phone'),
];
$elements += parent::getCompositeElements();
$elements['address'] = [
'#type' => 'textfield',
'#title' => t('Address'),
];
$elements['address_2'] = [
'#type' => 'textfield',
'#title' => t('Address 2'),
];
$elements['city'] = [
'#type' => 'textfield',
'#title' => t('City/Town'),
];
$elements['state_province'] = [
'#type' => 'select',
'#title' => t('State/Province'),
'#options' => 'state_province_names',
];
$elements['postal_code'] = [
'#type' => 'textfield',
'#title' => t('ZIP/Postal Code'),
];
$elements['country'] = [
'#type' => 'select',
'#title' => t('Country'),
'#options' => 'country_names',
];
return $elements;
}