Permalink
Browse files

Removes standard install profiles and added sensible settings for e-m…

…ails
  • Loading branch information...
1 parent d831d31 commit 3e470c0e0353adaf2513107e51dffbb056dc1a49 @lsolesen committed Nov 25, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 openapps.profile
View
17 openapps.profile
@@ -7,4 +7,21 @@
function openapps_form_install_configure_form_alter(&$form, $form_state) {
// Pre-populate the site name with the server name.
$form['site_information']['site_name']['#default_value'] = 'Open Apps Server';
+ $form['site_information']['site_mail']['#default_value'] = 'administrator@'. $_SERVER['HTTP_HOST'];
+ $form['admin_account']['account']['name']['#default_value'] = 'administrator';
+ $form['admin_account']['account']['mail']['#default_value'] = 'administrator@'. $_SERVER['HTTP_HOST'];
+}
+
+/**
+ * Set Open Apps as default install profile.
+ *
+ * Must use system as the hook module because openapps is not active yet
+ */
+function system_form_install_select_profile_form_alter(&$form, $form_state) {
+ // Hide default drupal profiles
+ unset($form['profile']['Minimal']);
+ unset($form['profile']['Standard']);
+ foreach($form['profile'] as $key => $element) {
+ $form['profile'][$key]['#value'] = 'openapps';
+ }
}

0 comments on commit 3e470c0

Please sign in to comment.