aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/js/settings-personal.js
blob: e4a1b7448f41369759471f8e9cf94105178d2c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * Copyright (c) 2013, Sam Tuke <samtuke@owncloud.com>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

$(document).ready(function(){
	// Trigger ajax on recoveryAdmin status change
	$( 'input:radio[name="userEnableRecovery"]' ).change( 
		function() {
			
			var recoveryStatus = $( this ).val();
			
			$.post( 
				OC.filePath( 'files_encryption', 'ajax', 'userrecovery.php' )
				, { userEnableRecovery: recoveryStatus }
				,  function( data ) {
					alert( data );
				}
			);
		}
	);
})