mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Can update new settings
This commit is contained in:
parent
e710450983
commit
079e3b7f1e
@ -199,15 +199,33 @@ ComunicWeb.pages.settings.sections.general = {
|
|||||||
checked: infos.public_friends_list
|
checked: infos.public_friends_list
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Public email address
|
||||||
|
var publicEmailAddress = createFormGroup({
|
||||||
|
target: target,
|
||||||
|
type: "checkbox",
|
||||||
|
label: tr("Make your email address public"),
|
||||||
|
checked: infos.public_email
|
||||||
|
});
|
||||||
|
|
||||||
//Personnal website
|
//Personnal website
|
||||||
var personnalWebsite = createFormGroup({
|
var personnalWebsite = createFormGroup({
|
||||||
target: target,
|
target: target,
|
||||||
label: tr("Personnal website (optionnal)"),
|
label: tr("Personnal website (optional)"),
|
||||||
type: "text",
|
type: "text",
|
||||||
placeholder: "https://...",
|
placeholder: "https://...",
|
||||||
value: infos.personnal_website != "null" ? infos.personnal_website : ""
|
value: infos.personnal_website != "null" ? infos.personnal_website : ""
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Location
|
||||||
|
var location = createFormGroup({
|
||||||
|
target: target,
|
||||||
|
label: tr("Location (optional)"),
|
||||||
|
type: "text",
|
||||||
|
placeholder: "Feurs",
|
||||||
|
value: infos.location != null ? infos.location : "",
|
||||||
|
maxLength: ServerConfig.conf.account_info_policy.max_location_length,
|
||||||
|
});
|
||||||
|
|
||||||
//Public notes
|
//Public notes
|
||||||
var publicNotes = createFormGroup({
|
var publicNotes = createFormGroup({
|
||||||
target: target,
|
target: target,
|
||||||
@ -286,16 +304,18 @@ ComunicWeb.pages.settings.sections.general = {
|
|||||||
allowComments: allowComments.checked,
|
allowComments: allowComments.checked,
|
||||||
allowPostsFromFriends: allowPostsFromFriends.checked,
|
allowPostsFromFriends: allowPostsFromFriends.checked,
|
||||||
publicFriendsList: publicFriendsList.checked,
|
publicFriendsList: publicFriendsList.checked,
|
||||||
|
email_public: publicEmailAddress.checked,
|
||||||
personnalWebsite: personnalWebsite.value,
|
personnalWebsite: personnalWebsite.value,
|
||||||
virtualDirectory: virtualDirectory.value,
|
virtualDirectory: virtualDirectory.value,
|
||||||
publicNote: publicNotes.value,
|
publicNote: publicNotes.value,
|
||||||
|
location: location.value,
|
||||||
};
|
};
|
||||||
|
|
||||||
//Lock send button
|
//Lock send button
|
||||||
sendButton.style.visibility = "hidden";
|
sendButton.style.visibility = "hidden";
|
||||||
|
|
||||||
//Perform the request over the API
|
//Perform the request over the API
|
||||||
ComunicWeb.components.settings.interface.setGeneral(settings, function(result){
|
SettingsInterface.setGeneral(settings, function(result){
|
||||||
|
|
||||||
//Unlock send button
|
//Unlock send button
|
||||||
sendButton.style.visibility = "visible";
|
sendButton.style.visibility = "visible";
|
||||||
|
1
assets/js/typings/ServerConfig.d.ts
vendored
1
assets/js/typings/ServerConfig.d.ts
vendored
@ -38,6 +38,7 @@ declare interface AccountInformationPolicy {
|
|||||||
max_first_name_length: number,
|
max_first_name_length: number,
|
||||||
min_last_name_length: number,
|
min_last_name_length: number,
|
||||||
max_last_name_length: number,
|
max_last_name_length: number,
|
||||||
|
max_location_length: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface StaticServerConfig {
|
declare interface StaticServerConfig {
|
||||||
|
Loading…
Reference in New Issue
Block a user