_system_filetransfer_backend_form_common

Versions
mediamosa-21
_system_filetransfer_backend_form_common()

Helper function because SSH and FTP backends share the same elements

▾ 2 functions call _system_filetransfer_backend_form_common()

system_filetransfer_backend_form_ftp in modules/system/system.module
Returns the form to configure the filetransfer class for FTP
system_filetransfer_backend_form_ssh in modules/system/system.module
Returns the form to configure the filetransfer class for SSH

Code

modules/system/system.module, line 1759

<?php
function _system_filetransfer_backend_form_common() {
  $form['username'] = array(
    '#type' => 'textfield',
    '#title' => t('Username'),
  );
  $form['password'] = array(
    '#type' => 'password',
    '#title' => t('Password'),
    '#description' => t('Your password is not saved in the database and is only used to establish a connection.'),
  );
  $form['advanced'] = array(
    '#type' => 'fieldset',
    '#title' => t('Advanced settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['advanced']['hostname'] = array(
    '#type' => 'textfield',
    '#title' => t('Host'),
    '#default_value' => 'localhost',
    '#description' => t('The connection will be created between your web server and the machine hosting the web server files. In the vast majority of cases, this will be the same machine, and "localhost" is correct.'),
  );
  $form['advanced']['port'] = array(
    '#type' => 'textfield',
    '#title' => t('Port'),
    '#default_value' => NULL,
  );
  return $form;
}
?>