display: none;
	border: 1px solid #e5e5e5;
	-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
	padding: 20px;
	background: #fff;
	margin-bottom: 40px;
">
	<?php 
if (defined('BACKUPBUDDY_DEV') && true === BACKUPBUDDY_DEV) {
    if (defined('BACKUPBUDDY_API_ENABLE') && TRUE == BACKUPBUDDY_API_ENABLE) {
        // && ( defined( 'BACKUPBUDDY_API_SALT' ) && ( 'CHANGEME' != BACKUPBUDDY_API_SALT ) && ( strlen( BACKUPBUDDY_API_SALT ) >= 5 ) )
        require_once pb_backupbuddy::plugin_path() . '/classes/remote_api.php';
        if (!isset(pb_backupbuddy::$options['remote_api']['keys'][0]) || '' == pb_backupbuddy::$options['remote_api']['keys'][0]) {
            pb_backupbuddy::alert('New Deployment Key generated.');
            pb_backupbuddy::$options['remote_api']['keys'][0] = backupbuddy_remote_api::generate_key();
            pb_backupbuddy::save();
            // Make sure API key box is showing.
            echo "<script>\n\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\tjQuery('.backupbuddy_api_key-hide').show();\n\t\t\t\t\t});\n\t\t\t\t</script>";
        }
        ?>
			
			<form method="post">
				<?php 
        pb_backupbuddy::nonce();
        ?>
				<input type="hidden" name="regenerate_api_key" value="1">
					<h3 style="margin-top: 0;"><?php 
        _e('Deployment Key', 'it-l10n-backupbuddy');
        ?>
</h3>
<?php

backupbuddy_core::verifyAjaxAccess();
pb_backupbuddy::load();
if (!defined('BACKUPBUDDY_API_ENABLE') || TRUE != BACKUPBUDDY_API_ENABLE) {
    // && ( defined( 'BACKUPBUDDY_API_SALT' ) && ( 'CHANGEME' != BACKUPBUDDY_API_SALT ) && ( strlen( BACKUPBUDDY_API_SALT ) >= 5 ) )
    die(json_encode(array('success' => false, 'message' => 'Error #32332993: BackupBuddy API is not enabled in the wp-config.php.')));
}
require_once pb_backupbuddy::plugin_path() . '/classes/remote_api.php';
$newKey = backupbuddy_remote_api::generate_key();
pb_backupbuddy::$options['remote_api']['keys'][0] = $newKey;
pb_backupbuddy::save();
die(json_encode(array('success' => true, 'key' => $newKey)));