You are here

public static function EvaluationImplementation::upgradeCheckResultForm in Drupal 8 upgrade evaluation 7

Same name and namespace in other branches
  1. 6 includes/EvaluationImplementation.php \Upgrade_check\EvaluationImplementation::upgradeCheckResultForm()

Implements _upgrade_check_result_form().

1 call to EvaluationImplementation::upgradeCheckResultForm()
_upgrade_check_result_form in ./upgrade_check.module
Function for authomatic transfer json data.

File

includes/EvaluationImplementation.php, line 194

Class

EvaluationImplementation

Namespace

Upgrade_check

Code

public static function upgradeCheckResultForm() {
  $data = self::upgradeCheckCryptUserData(NULL, $param = 'decrypt');
  if (!empty($data)) {
    $form[self::UPGRADE_CHECK_RESULT_FORM] = array(
      '#type' => 'fieldset',
      '#title' => t('User settings'),
    );
    $form[self::UPGRADE_CHECK_RESULT_FORM]['description'] = array(
      '#type' => 'item',
      '#markup' => t('Use this data to authorize here - !link', array(
        '!link' => l(UPGRADE_CHECK_URL, UPGRADE_CHECK_URL . self::UPGRADE_CHECK_URL_ESTIMATE),
      )),
    );
    $form[self::UPGRADE_CHECK_RESULT_FORM]['name'] = array(
      '#type' => 'textfield',
      '#title' => t('Username'),
      '#description' => t('Username.'),
      '#disabled' => 'disabled',
      '#default_value' => $data['name'],
    );
    $form[self::UPGRADE_CHECK_RESULT_FORM]['pass'] = array(
      '#type' => 'textfield',
      '#title' => t('Password'),
      '#description' => t('Password.'),
      '#disabled' => 'disabled',
      '#default_value' => $data['pass'],
    );
  }
  else {
    $form[self::UPGRADE_CHECK_RESULT_FORM] = array(
      '#type' => 'fieldset',
      '#title' => t('Missing data for authorization.'),
    );
  }
  return $form;
}