You are here

function mailhandler_mailbox_ui::edit_form_submit in Mailhandler 6.2

Same name and namespace in other branches
  1. 7.2 plugins/ctools/export_ui/mailhandler_mailbox_ui.class.php \mailhandler_mailbox_ui::edit_form_submit()

Handle the submission of the edit form.

At this point, submission is successful. Our only responsibility is to copy anything out of values onto the item that we are able to edit.

If the keys all match up to the schema, this method will not need to be overridden.

Overrides ctools_export_ui::edit_form_submit

File

plugins/ctools/export_ui/mailhandler_mailbox_ui.class.php, line 197
Definition of mailhandler_mailbox_ui class.

Class

mailhandler_mailbox_ui
Represents an email mailbox (IMAP, POP3, etc...).

Code

function edit_form_submit(&$form, &$form_state) {
  parent::edit_form_submit($form, $form_state);
  if (module_exists('mailhandler_default')) {
    drupal_set_message(t("Now that you've created a mailbox, send it a test email and <a href='@import-page'>create a source node</a> to start importing messages.", array(
      '@import-page' => url('node/add/mailhandler-source'),
    )));
  }
  else {
    drupal_set_message(t("Now that you've created a mailbox, you'll need to <a href='@importer-add'>create a Feeds importer</a> or <a href='@import-page'>run an existing importer</a>. Consider <a href='@module-page'>enabling the Mailhandler quick-start</a> module.", array(
      '@importer-add' => url(MAILHANDLER_MENU_PREFIX . '/feeds/add'),
      '@import-page' => url('import'),
      '@module-page' => url(MAILHANDLER_MENU_PREFIX . '/modules'),
    )));
  }
}