Issue #1811216 by sebsebseb123, mgifford, David_Rothstein, falcon03: Fixed Missing labels for profile and language selectors.

8.0.x
webchick 2013-01-29 19:38:25 -08:00
parent a31517e109
commit a1ce6942fa
1 changed files with 14 additions and 12 deletions

View File

@ -1229,18 +1229,18 @@ function install_select_profile_form($form, &$form_state, $install_state) {
$names = array('standard' => $names['standard']) + $names; $names = array('standard' => $names['standard']) + $names;
} }
foreach ($names as $profile => $name) { // The profile name and description are extracted for translation from the
// The profile name and description are extracted for translation from the // .info file, so we can use st() on them even though they are dynamic data
// .info file, so we can use st() on them even though they are dynamic data // at this point.
// at this point. $form['profile'] = array(
$form['profile'][$name] = array( '#type' => 'radios',
'#type' => 'radio', '#title' => st('Select an installation profile'),
'#value' => 'standard', '#title_display' => 'invisible',
'#return_value' => $profile, '#options' => array_map('st', $names),
'#title' => st($name), '#default_value' => 'standard',
'#description' => isset($profiles[$profile]['description']) ? st($profiles[$profile]['description']) : '', );
'#parents' => array('profile'), foreach (array_keys($names) as $profile) {
); $form['profile'][$profile]['#description'] = isset($profiles[$profile]['description']) ? st($profiles[$profile]['description']) : '';
} }
$form['actions'] = array('#type' => 'actions'); $form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array( $form['actions']['submit'] = array(
@ -1403,6 +1403,8 @@ function install_select_language_form($form, &$form_state, $files = array()) {
$browser_langcode = language_from_browser($browser_options); $browser_langcode = language_from_browser($browser_options);
$form['langcode'] = array( $form['langcode'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => st('Choose language'),
'#title_display' => 'invisible',
'#options' => $select_options, '#options' => $select_options,
// Use the browser detected language as default or English if nothing found. // Use the browser detected language as default or English if nothing found.
'#default_value' => !empty($browser_langcode) ? $browser_langcode : 'en', '#default_value' => !empty($browser_langcode) ? $browser_langcode : 'en',