updated simplenews from 1-beta to 2-beta, translated subscription form
This commit is contained in:
parent
3105ce1e81
commit
30a75e09db
|
@ -77,7 +77,7 @@
|
|||
"drupal/search_api_page": "^1.x-dev",
|
||||
"drupal/search_api_solr": "^4.1",
|
||||
"drupal/select_translation": "^1.x-dev",
|
||||
"drupal/simplenews": "^1.x-dev",
|
||||
"drupal/simplenews": "^2.0@beta",
|
||||
"drupal/social_media_links": "^2.8",
|
||||
"drupal/string_translation_ui": "^1.2",
|
||||
"drupal/strings_i18n_json_export": "1.x-dev@dev",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a1a5ce6f3a1ccf973b41d14aa97def76",
|
||||
"content-hash": "23c6cb51f19ca9d27cd9298f1d2c8fb8",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alchemy/zippy",
|
||||
|
@ -5834,6 +5834,8 @@
|
|||
"language negociation exeption https://www.drupal.org/project/drupal/issues/3134349": "https://www.drupal.org/files/issues/2020-06-02/3134349-9.patch",
|
||||
"Cannot save translated nodes after upgrading to 8.8 due to invalid path https://www.drupal.org/project/drupal/issues/3101344": "https://www.drupal.org/files/issues/2021-03-01/3101344-drupal-core-fix-permissions-checking-while-node-translating-64.patch",
|
||||
"ConfigImporter->checkOp() https://www.drupal.org/project/drupal/issues/3198715": "https://www.drupal.org/files/issues/2021-02-16/error-running-config-import-delete-on-null-3198715-3.patch",
|
||||
"Entity view/form mode formatter/widget settings have no translation UI 1 https://www.drupal.org/project/drupal/issues/2546212": "https://www.drupal.org/files/issues/2020-12-04/2546212-168-actions.patch",
|
||||
"Entity view/form mode formatter/widget settings have no translation UI 2 https://www.drupal.org/project/drupal/issues/2546212": "https://www.drupal.org/files/issues/2020-12-04/2546212-168.patch",
|
||||
"https://www.drupal.org/project/drupal/issues/2943172": "https://www.drupal.org/files/issues/2018-07-05/2943172-kernel-test-base-3.patch"
|
||||
}
|
||||
},
|
||||
|
@ -10432,6 +10434,9 @@
|
|||
"status": "covered",
|
||||
"message": "Covered by Drupal's security advisory policy"
|
||||
}
|
||||
},
|
||||
"patches_applied": {
|
||||
"Manifest doesn't have a maskable icon https://www.drupal.org/project/pwa/issues/3165433": "https://www.drupal.org/files/issues/2020-08-26/pwa_icon_purpose-3165433-9.patch"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packages.drupal.org/8/downloads",
|
||||
|
@ -11049,30 +11054,32 @@
|
|||
},
|
||||
{
|
||||
"name": "drupal/simplenews",
|
||||
"version": "dev-1.x",
|
||||
"version": "2.0.0-beta2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.drupalcode.org/project/simplenews.git",
|
||||
"reference": "3ca318b30cf771ea7fd611aeecbb6214fae1cda3"
|
||||
"reference": "8.x-2.0-beta2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://ftp.drupal.org/files/projects/simplenews-8.x-2.0-beta2.zip",
|
||||
"reference": "8.x-2.0-beta2",
|
||||
"shasum": "e33699acad01501ff6a8fc474a53e7ca45244f83"
|
||||
},
|
||||
"require": {
|
||||
"drupal/core": "^8"
|
||||
"drupal/core": "^8.8 || ^9"
|
||||
},
|
||||
"require-dev": {
|
||||
"drupal/monitoring": "*",
|
||||
"drupal/simplenews_scheduler": "*"
|
||||
"drupal/monitoring": "*"
|
||||
},
|
||||
"type": "drupal-module",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-1.x": "1.x-dev"
|
||||
},
|
||||
"drupal": {
|
||||
"version": "8.x-1.0-beta1+11-dev",
|
||||
"datestamp": "1570272486",
|
||||
"version": "8.x-2.0-beta2",
|
||||
"datestamp": "1592298547",
|
||||
"security-coverage": {
|
||||
"status": "not-covered",
|
||||
"message": "Dev releases are not covered by Drupal security advisories."
|
||||
"message": "Beta releases are not covered by Drupal security advisories."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -11110,8 +11117,7 @@
|
|||
"homepage": "https://www.drupal.org/project/simplenews",
|
||||
"support": {
|
||||
"source": "https://git.drupalcode.org/project/simplenews"
|
||||
},
|
||||
"time": "2019-10-05T10:43:00+00:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "drupal/smart_trim",
|
||||
|
@ -19539,7 +19545,7 @@
|
|||
"drupal/payment_commerce": 20,
|
||||
"drupal/search_api_page": 20,
|
||||
"drupal/select_translation": 20,
|
||||
"drupal/simplenews": 20,
|
||||
"drupal/simplenews": 10,
|
||||
"drupal/strings_i18n_json_export": 20,
|
||||
"drupal/telephone_formatter": 10,
|
||||
"drupal/translate_side_by_side": 20,
|
||||
|
|
|
@ -4,7 +4,6 @@ status: true
|
|||
dependencies:
|
||||
config:
|
||||
- core.entity_form_mode.simplenews_subscriber.account
|
||||
- field.field.simplenews_subscriber.simplenews_subscriber.subscriptions
|
||||
module:
|
||||
- simplenews
|
||||
_core:
|
||||
|
|
|
@ -2,8 +2,7 @@ uuid: 68b2586e-6b2e-4d18-94e4-3a7844c5f12b
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.field.simplenews_subscriber.simplenews_subscriber.subscriptions
|
||||
config: { }
|
||||
module:
|
||||
- simplenews
|
||||
_core:
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
uuid: 5c76fa02-bca2-4e1a-b7a1-ee0250f863cb
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.simplenews_subscriber.subscriptions
|
||||
module:
|
||||
- simplenews
|
||||
_core:
|
||||
default_config_hash: '-FGoXJQMTtfhnYhAdYmmB815lFLwEn09sI0nyn2EbKM'
|
||||
id: simplenews_subscriber.simplenews_subscriber.subscriptions
|
||||
field_name: subscriptions
|
||||
entity_type: simplenews_subscriber
|
||||
bundle: simplenews_subscriber
|
||||
label: Subscriptions
|
||||
description: ''
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
handler: 'default:simplenews_newsletter'
|
||||
handler_settings:
|
||||
target_bundles: null
|
||||
field_type: simplenews_subscription
|
|
@ -1,21 +0,0 @@
|
|||
uuid: 9692ac0e-4f66-4374-b221-6baaf0925877
|
||||
langcode: und
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- simplenews
|
||||
_core:
|
||||
default_config_hash: wPBNO4_O9cizdnYp2mpq2Dd3O163g-2v5v6_yazR4MA
|
||||
id: simplenews_subscriber.subscriptions
|
||||
field_name: subscriptions
|
||||
entity_type: simplenews_subscriber
|
||||
type: simplenews_subscription
|
||||
settings:
|
||||
target_type: simplenews_newsletter
|
||||
module: simplenews
|
||||
locked: false
|
||||
cardinality: -1
|
||||
translatable: true
|
||||
indexes: { }
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
|
@ -0,0 +1,2 @@
|
|||
settings:
|
||||
label: 'Inscription newsletter Materio'
|
|
@ -25,8 +25,6 @@ display:
|
|||
label: Courriel
|
||||
user_name:
|
||||
label: 'Nom d''utilisateur'
|
||||
subscriptions:
|
||||
separator: ', '
|
||||
status:
|
||||
label: Actif
|
||||
created:
|
||||
|
|
|
@ -23,6 +23,7 @@ subscription:
|
|||
confirm_combined_line_unsubscribe_unsubscribed: 'Already unsubscribed from [simplenews-newsletter:name]'
|
||||
confirm_subscribe_page: ''
|
||||
confirm_unsubscribe_page: ''
|
||||
tidy_unconfirmed: 0
|
||||
mail:
|
||||
use_cron: true
|
||||
throttle: 20
|
||||
|
|
|
@ -2,8 +2,7 @@ uuid: 53a979eb-9ee5-4a9b-b4fb-602e19e052f7
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.simplenews_subscriber.subscriptions
|
||||
config: { }
|
||||
module:
|
||||
- simplenews
|
||||
- user
|
||||
|
@ -306,67 +305,6 @@ display:
|
|||
hide_alter_empty: true
|
||||
entity_type: simplenews_subscriber
|
||||
plugin_id: simplenews_user_name
|
||||
subscriptions:
|
||||
id: subscriptions
|
||||
table: simplenews_subscriber__subscriptions
|
||||
field: subscriptions
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Subscriptions
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: null
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: simplenews_subscription_status
|
||||
group_column: ''
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: ul
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
status:
|
||||
id: status
|
||||
table: simplenews_subscriber
|
||||
|
@ -543,6 +481,67 @@ display:
|
|||
destination: true
|
||||
entity_type: simplenews_subscriber
|
||||
plugin_id: entity_operations
|
||||
subscriptions_target_id:
|
||||
id: subscriptions_target_id
|
||||
table: simplenews_subscriber__subscriptions
|
||||
field: subscriptions_target_id
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Subscriptions
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: null
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: simplenews_subscription_status
|
||||
group_column: ''
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: ul
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
filters:
|
||||
mail:
|
||||
id: mail
|
||||
|
|
|
@ -163,20 +163,12 @@ class MaterioSimplenewsSubscriptionBlock extends BlockBase implements ContainerF
|
|||
$form_object = $this->entityTypeManager->getFormObject('simplenews_subscriber', 'materio_block');
|
||||
$form_object->setUniqueId($this->configuration['unique_id']);
|
||||
$form_object->setNewsletterIds($this->configuration['newsletters']);
|
||||
$form_object->message = $this->configuration['message'];
|
||||
$form_object->message = t($this->configuration['message']);
|
||||
|
||||
// Set the entity on the form.
|
||||
if ($user = \Drupal::currentUser()) {
|
||||
if ($subscriber = simplenews_subscriber_load_by_uid($user->id())) {
|
||||
$form_object->setEntity($subscriber);
|
||||
}
|
||||
else {
|
||||
$form_object->setEntity(Subscriber::create()->fillFromAccount($user));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$form_object->setEntity(Subscriber::create());
|
||||
}
|
||||
$user = \Drupal::currentUser();
|
||||
$form_object->setEntity(Subscriber::loadByUid($user->id(), 'create'));
|
||||
|
||||
|
||||
return $this->formBuilder->getForm($form_object);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>materio.com [2 Jun 2021 at 10:40]</title>
|
||||
<title>materio.com [8 Jun 2021 at 08:38]</title>
|
||||
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvp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