diff --git a/drupal-org-core.make b/drupal-org-core.make index a0cbbd165b25d715059a77f5f580da1574569f9e..b9b578bada39f0c1bc4e1d652345351bab0a0df7 100644 --- a/drupal-org-core.make +++ b/drupal-org-core.make @@ -3,4 +3,4 @@ core = 8.x ; Drupal Core projects[drupal][type] = "core" -projects[drupal][version] = "8.0.1" +projects[drupal][version] = "8.1.1" diff --git a/drupal-org.make b/drupal-org.make index 6825b8503ea5d24842935015c0591176f94fa753..585289caeb2086762c75c75d1ca9338084861e22 100644 --- a/drupal-org.make +++ b/drupal-org.make @@ -5,11 +5,16 @@ core = 8.x ;; Utilities contrib modules ;;;;;;;;;;;;;;;;;;;;; -projects[config_update][type] = "module" -projects[config_update][version] = "1.x-dev" +projects[config_update][type] = module +projects[config_update][download][type] = git +projects[config_update][download][url] = https://git.drupal.org/project/config_update.git +projects[config_update][download][tag] = 8.x-1.1 projects[config_update][subdir] = "contrib/utilities" -projects[config_update][download][type] = "git" -projects[config_update][download][branch] = "8.x-1.x" + +projects[ctools][type] = module +projects[ctools][download][type] = git +projects[ctools][download][url] = https://git.drupal.org/project/ctools +projects[ctools][download][tag] = 8.x-3.0-alpha26 ;;;;;;;;;;;;;;;;;;;;; ;; Development contrib modules diff --git a/varbase.info.yml b/varbase.info.yml index 73c30d90f6fb2d8efd48d494d4333453b4608a61..d25977ca522a866c5fab02939abcff696dfe3331 100644 --- a/varbase.info.yml +++ b/varbase.info.yml @@ -3,7 +3,12 @@ type: profile description: 'Varbase is an enhanced Drupal distribution with a lot of necessities.' version: 8.x-4.x core: 8.x +distribution: + name: Varbase + +# Required modules dependencies: + # core - node - block - breakpoint @@ -25,6 +30,13 @@ dependencies: - file - rdf - views + + # contrib + - metatag + + # Our own core functionality. + + themes: - bartik - seven diff --git a/varbase.profile b/varbase.profile index a1dcd8e2d84b6cf595df6af60667d7fa51dd03ab..8402d5e9faa145746c360ce8503bc05169cc3f94 100644 --- a/varbase.profile +++ b/varbase.profile @@ -13,13 +13,32 @@ use Drupal\Core\Form\FormStateInterface; * Allows the profile to alter the site configuration form. */ function varbase_form_install_configure_form_alter(&$form, FormStateInterface $form_state) { - // Add a placeholder as example that one can choose an arbitrary site name. - $form['site_information']['site_name']['#attributes']['placeholder'] = t('My site'); +// Add a placeholder as example that one can choose an arbitrary site name. + $form['site_information']['site_name']['#attributes']['placeholder'] = t('My Official Site Name'); // Default email to start with noreply@ (the site can not send emails back). - $form['site_information']['site_mail']['#default_value'] = 'noreply@' . $_SERVER['SERVER_NAME']; + $form['site_information']['site_mail']['#field_prefix'] = 'noreply@'; + $form['site_information']['site_mail']['#attributes']['style'] = 'width: 25em;'; + //die(print_r($form['site_information'])); + $form['site_information']['site_mail']['#type'] = 'textfield'; + $form['site_information']['site_mail']['#default_value'] = $_SERVER['SERVER_NAME']; + $form['site_information']['site_mail']['#element_validate'] = array('_varbase_install_configure_sitemail_validate'); // Default user 1 username should be 'webmaster'. $form['admin_account']['account']['name']['#default_value'] = 'webmaster'; - $form['admin_account']['account']['mail']['#default_value'] = 'webmaster@' . $_SERVER['SERVER_NAME']; + $form['admin_account']['account']['name']['#attributes']['disabled'] = TRUE; + $form['admin_account']['account']['mail']['#default_value'] = 'webmaster@vardot.com'; + $form['admin_account']['account']['mail']['#description'] = t('In most case, and for <a target="_blank" href="@link">Vardot</a> specific use, we recommend this to always be <em>webmaster@vardot.com</em>.', array('@link' => 'http://vardot.com')); } + +/** + * Validate handler to validate site email address. + */ +function _varbase_install_configure_sitemail_validate($element, &$form_state, $form) { + $form_state->setValue('site_mail', 'noreply@' . $form_state->getValue('site_mail')); + $site_email = $form_state->getValue('site_mail'); + + if (!\Drupal::service('email.validator')->isValid($site_email)) { + $form_state->setError($element, t('Please enter a valid format for site email address.')); + } +} \ No newline at end of file