mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Simplify code
This commit is contained in:
parent
00f0bf2f73
commit
1f35b02326
@ -544,15 +544,14 @@ const ConvChatWindow = {
|
|||||||
if(conversation.infos.name)
|
if(conversation.infos.name)
|
||||||
settingsForm.conversationNameInput.value = conversation.infos.name;
|
settingsForm.conversationNameInput.value = conversation.infos.name;
|
||||||
|
|
||||||
//Check if user is a conversation moderator or not
|
|
||||||
if(conversation.infos.ID_owner == userID()){
|
|
||||||
//Update conversation members
|
//Update conversation members
|
||||||
ComunicWeb.components.userSelect.pushEntries(settingsForm.usersElement, conversation.infos.members);
|
ComunicWeb.components.userSelect.pushEntries(settingsForm.usersElement, conversation.infos.members);
|
||||||
|
|
||||||
// Update checkbox to allow or not everyone to add members
|
// Update checkbox to allow or not everyone to add members
|
||||||
$(settingsForm.allowEveryoneToAddMembers).iCheck(conversation.infos.canEveryoneAddMembers ? "check" : "uncheck");
|
$(settingsForm.allowEveryoneToAddMembers).iCheck(conversation.infos.canEveryoneAddMembers ? "check" : "uncheck");
|
||||||
}
|
|
||||||
else {
|
//Check if user is a conversation moderator or not
|
||||||
|
if(conversation.infos.ID_owner != userID()) {
|
||||||
//We disable name field
|
//We disable name field
|
||||||
settingsForm.conversationNameInput.disabled = "true";
|
settingsForm.conversationNameInput.disabled = "true";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user