mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Send request to get all account data
This commit is contained in:
@ -14,10 +14,71 @@ ComunicWeb.pages.settings.sections.privacy = {
|
||||
*/
|
||||
open: function(args, target){
|
||||
|
||||
//Export data box
|
||||
this.showExportDataBox(target);
|
||||
|
||||
//Delete account box
|
||||
this.showDeleteAccountBox(target);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Show export personnal data box
|
||||
*
|
||||
* @param {HTMLElement} target The target for the box
|
||||
*/
|
||||
showExportDataBox: function(target){
|
||||
|
||||
//Create a box
|
||||
var box = createElem2({
|
||||
appendTo: target,
|
||||
type: "div",
|
||||
class: "box box-primary box-export-account-data-settings"
|
||||
});
|
||||
|
||||
//Add box header
|
||||
var boxHead = createElem2({
|
||||
appendTo: box,
|
||||
type: "div",
|
||||
class: "box-header",
|
||||
});
|
||||
var boxTitle = createElem2({
|
||||
appendTo: boxHead,
|
||||
type: "h3",
|
||||
class: "box-title",
|
||||
innerHTML: "Export account data"
|
||||
});
|
||||
|
||||
//Create box body
|
||||
var boxBody = createElem2({
|
||||
appendTo: box,
|
||||
type: "div",
|
||||
class: "box-body"
|
||||
});
|
||||
|
||||
//Add a notice
|
||||
createElem2({
|
||||
appendTo: boxBody,
|
||||
type: "p",
|
||||
innerHTML: "You can export all the data of your account from here."
|
||||
});
|
||||
|
||||
//Add delete account button
|
||||
var exportAccountDataBtn = createElem2({
|
||||
appendTo: boxBody,
|
||||
type: "div",
|
||||
class: "btn btn-primary",
|
||||
innerHTML: "Export account data"
|
||||
});
|
||||
|
||||
exportAccountDataBtn.addEventListener("click", function(e){
|
||||
|
||||
//Request account deletion
|
||||
ComunicWeb.components.settings.helper.requestAccountDataExport();
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Display delete account box
|
||||
|
Reference in New Issue
Block a user