diff --git a/src/Plugin/Block/SimplenewsSubscriptionBlock.php b/src/Plugin/Block/SimplenewsSubscriptionBlock.php index aaf7fc1..362bd02 100644 --- a/src/Plugin/Block/SimplenewsSubscriptionBlock.php +++ b/src/Plugin/Block/SimplenewsSubscriptionBlock.php @@ -125,7 +125,8 @@ class SimplenewsSubscriptionBlock extends BlockBase implements ContainerFactoryP '#title' => t('Unique ID'), '#size' => 60, '#maxlength' => 255, - '#default_value' => 'unique identifier', + 'description' => t('You are responsible for making ID unique. If it is not set, random value will be generated.'), + '#default_value' => $this->configuration['unique_id'], ); /*if (\Drupal::moduleHandler()->moduleExists('views')) { $form['link_previous'] = array( @@ -158,7 +159,6 @@ class SimplenewsSubscriptionBlock extends BlockBase implements ContainerFactoryP //$this->configuration['rss_feed'] = $form_state->getValue('rss_feed'); $unique_input = $form_state->getValue('unique_id'); $this->configuration['unique_id'] = (empty($unique_input)) ? \Drupal::service('uuid')->generate() : $unique_input; - $this->configuration['unique_id'] = \Drupal::service('uuid')->generate(); } /**