Commit 2c0cfe97 authored by alexpott's avatar alexpott

Issue #2473709 by nicoloye, marcvangend, pjbaert, yoroy, webchick: Do not use...

Issue #2473709 by nicoloye, marcvangend, pjbaert, yoroy, webchick: Do not use SERVER_NAME as default value for the site name
parent b4412457
<?php
/**
* @file
* Enables modules and site configuration for a minimal site installation.
*/
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_FORM_ID_alter() for install_configure_form().
*
* Allows the profile to alter the site configuration form.
*/
function minimal_form_install_configure_form_alter(&$form, FormStateInterface $form_state) {
// Pre-populate the site name with the server name.
$form['site_information']['site_name']['#default_value'] = \Drupal::request()->server->get('SERVER_NAME');
}
......@@ -13,8 +13,8 @@
* Allows the profile to alter the site configuration form.
*/
function standard_form_install_configure_form_alter(&$form, FormStateInterface $form_state) {
// Pre-populate the site name with the server name.
$form['site_information']['site_name']['#default_value'] = \Drupal::request()->server->get('SERVER_NAME');
// Add a placeholder as example that one can choose an arbitrary site name.
$form['site_information']['site_name']['#attributes']['placeholder'] = t('My site');
$form['#submit'][] = 'standard_form_install_configure_submit';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment