function lockr_admin_migrate_form in Lockr 7.3
Same name and namespace in other branches
- 7.2 include/migrate_form.inc \lockr_admin_migrate_form()
1 string reference to 'lockr_admin_migrate_form'
File
- ./
lockr.admin.inc, line 60 - Form callbacks for Lockr register form.
Code
function lockr_admin_migrate_form($form, &$form_state, $info) {
$form['instructions'] = [
'#markup' => t('Click the button below to deploy this site to production. This should only be done in your production environment as it writes a new certificate to the file system.'),
];
$accounts_host = variable_get('lockr_accounts_host', 'accounts.lockr.io');
$form['#attached']['js'] = [
[
'type' => 'setting',
'data' => [
'lockr' => [
'accounts_host' => "https://{$accounts_host}",
'keyring_id' => $info['keyring']['id'],
],
],
],
drupal_get_path('module', 'lockr') . '/js/move_to_prod.js',
];
$form['client_token'] = [
'#type' => 'hidden',
'#required' => TRUE,
];
$form['move_to_prod'] = [
'#type' => 'button',
'#value' => t('Migrate to Production'),
'#attributes' => [
'class' => [
'move-to-prod',
],
],
];
$form['submit'] = [
'#type' => 'submit',
'#value' => 'Submit',
'#attributes' => [
'class' => [
'move-to-prod-submit',
],
],
];
return $form;
}