mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Can update group visibility
This commit is contained in:
parent
24357aeb05
commit
dfce597139
@ -99,6 +99,7 @@ ComunicWeb.pages.groups.pages.settings = {
|
|||||||
class: "group-settings-form"
|
class: "group-settings-form"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//Group ID (not editable)
|
//Group ID (not editable)
|
||||||
createFormGroup({
|
createFormGroup({
|
||||||
target: formContainer,
|
target: formContainer,
|
||||||
@ -108,6 +109,7 @@ ComunicWeb.pages.groups.pages.settings = {
|
|||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//Group name
|
//Group name
|
||||||
var groupName = createFormGroup({
|
var groupName = createFormGroup({
|
||||||
target: formContainer,
|
target: formContainer,
|
||||||
@ -117,6 +119,51 @@ ComunicWeb.pages.groups.pages.settings = {
|
|||||||
value: settings.name,
|
value: settings.name,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Group visibility
|
||||||
|
createElem2({
|
||||||
|
appendTo: formContainer,
|
||||||
|
type: "label",
|
||||||
|
innerHTML: "Group visibility"
|
||||||
|
});
|
||||||
|
|
||||||
|
var visibilityForm = createElem2({
|
||||||
|
type: "form",
|
||||||
|
appendTo: formContainer
|
||||||
|
});
|
||||||
|
|
||||||
|
//Open
|
||||||
|
createFormGroup({
|
||||||
|
target: visibilityForm,
|
||||||
|
label: "Open Group (accessible to everyone)",
|
||||||
|
name: "group-visibility",
|
||||||
|
type: "radio",
|
||||||
|
value: "open",
|
||||||
|
checked: settings.visibility == "open"
|
||||||
|
});
|
||||||
|
|
||||||
|
//Private
|
||||||
|
createFormGroup({
|
||||||
|
target: visibilityForm,
|
||||||
|
label: "Private Group (accessible to accepted members only)",
|
||||||
|
name: "group-visibility",
|
||||||
|
type: "radio",
|
||||||
|
value: "private",
|
||||||
|
checked: settings.visibility == "private"
|
||||||
|
});
|
||||||
|
|
||||||
|
//Secret
|
||||||
|
createFormGroup({
|
||||||
|
target: visibilityForm,
|
||||||
|
label: "Secrete Group (accessible only to invited members)",
|
||||||
|
name: "group-visibility",
|
||||||
|
type: "radio",
|
||||||
|
value: "secrete",
|
||||||
|
checked: settings.visibility == "secrete"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Submit button
|
//Submit button
|
||||||
var submitButtonContainer = createElem2({
|
var submitButtonContainer = createElem2({
|
||||||
appendTo: formContainer,
|
appendTo: formContainer,
|
||||||
@ -146,7 +193,8 @@ ComunicWeb.pages.groups.pages.settings = {
|
|||||||
|
|
||||||
//Prepare the update request on the server
|
//Prepare the update request on the server
|
||||||
var settings = {
|
var settings = {
|
||||||
name: groupName.value
|
name: groupName.value,
|
||||||
|
visibility: visibilityForm.elements["group-visibility"].value
|
||||||
};
|
};
|
||||||
|
|
||||||
//Lock the send button
|
//Lock the send button
|
||||||
|
Loading…
Reference in New Issue
Block a user