summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/EditProfileModal.js
blob: 5b79a319064aaf775ceabd6a681e86b43b40491d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var EditProfileModal = ModalFormView.extend({
	el: ".mediaDrawer.editProfile",
	action: "/api/profile",

	load: function(){
		this.reset()
		$.get("/api/profile", $.proxy(function(data){
			console.log(data)
			
			for (var i in data) {
				this.$("[name='" + i + "']").val(data[i])
			}
			
			this.show()
		}, this))
	},
	
	success: function(){
		window.location.href = "/profile"
	}

})