email_required.admin.inc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * The admin settings form
  4. */
  5. function email_required_admin_settings($form) {
  6. $form['settings'] = array(
  7. '#type' => 'fieldset',
  8. '#title' => t('Settings'),
  9. );
  10. $form['settings']['email_required_paths'] = array(
  11. '#type' => 'textarea',
  12. '#title' => t('Paths that require a verified email address'),
  13. '#description' => t('Supply a list of page paths on different lines which will require a user have a verified email addess in order to access.'),
  14. '#default_value' => variable_get('email_required_paths', NULL),
  15. );
  16. // Email text defaults
  17. $text = _email_required_email_text();
  18. $form['email'] = array(
  19. '#type' => 'fieldset',
  20. '#title' => t('Email template'),
  21. '#description' => t('Create a template for email verification messages.'),
  22. );
  23. $form['email']['email_required_email_subject'] = array(
  24. '#type' => 'textfield',
  25. '#title' => t('Subject'),
  26. '#default_value' => $text['subject'],
  27. );
  28. $form['email']['email_required_email_body'] = array(
  29. '#type' => 'textarea',
  30. '#title' => t('Body'),
  31. '#default_value' => $text['body'],
  32. '#description' => t('Use !link to place the verification link.'),
  33. );
  34. $form['email']['email_required_token_tree'] = array(
  35. '#theme' => 'token_tree',
  36. '#token_types' => array('user'),
  37. );
  38. return system_settings_form($form);
  39. }