You are here

function backup_migrate_source_remote::edit_form in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 6.3 includes/sources.inc \backup_migrate_source_remote::edit_form()
  2. 7.3 includes/sources.inc \backup_migrate_source_remote::edit_form()

source configuration callback.

Overrides backup_migrate_location::edit_form

1 call to backup_migrate_source_remote::edit_form()
backup_migrate_source_db::edit_form in includes/sources.db.inc
Destination configuration callback.
1 method overrides backup_migrate_source_remote::edit_form()
backup_migrate_source_db::edit_form in includes/sources.db.inc
Destination configuration callback.

File

includes/sources.inc, line 212

Class

backup_migrate_source_remote
A base class for creating sources.

Code

function edit_form() {
  $form = parent::edit_form();
  $form['scheme'] = array(
    "#type" => "textfield",
    "#title" => t("Scheme"),
    "#default_value" => @$this->dest_url['scheme'] ? $this->dest_url['scheme'] : '',
    "#required" => TRUE,
    "#weight" => 0,
  );
  $form['host'] = array(
    "#type" => "textfield",
    "#title" => t("Host"),
    "#default_value" => @$this->dest_url['host'] ? $this->dest_url['host'] : 'localhost',
    "#required" => TRUE,
    "#weight" => 10,
  );
  $form['path'] = array(
    "#type" => "textfield",
    "#title" => t("Path"),
    "#default_value" => @$this->dest_url['path'],
    "#required" => TRUE,
    "#weight" => 20,
  );
  $form['user'] = array(
    "#type" => "textfield",
    "#title" => t("Username"),
    "#default_value" => @$this->dest_url['user'],
    "#required" => TRUE,
    "#weight" => 30,
  );
  $form['pass'] = array(
    "#type" => "password",
    "#title" => t("Password"),
    "#default_value" => @$this->dest_url['pass'],
    '#description' => '',
    "#weight" => 40,
  );
  if (@$this->dest_url['pass']) {
    $form['old_password'] = array(
      "#type" => "value",
      "#value" => @$this->dest_url['pass'],
    );
    $form['pass']["#description"] .= t(' You do not need to enter a password unless you wish to change the currently saved password.');
  }
  return $form;
}