diff --git a/src/plugins/muc-views/modals/occupant.js b/src/plugins/muc-views/modals/occupant.js index 458be9fad..ac5f1494b 100644 --- a/src/plugins/muc-views/modals/occupant.js +++ b/src/plugins/muc-views/modals/occupant.js @@ -41,6 +41,11 @@ export default class OccupantModal extends BaseModal { const jid = model.get('jid'); if (jid) api.modal.show('converse-add-contact-modal', {'model': new Model({ jid })}); } + + toggleForm () { + this.show_affiliation_form = !this.show_affiliation_form; + this.render(); + } } api.elements.define('converse-muc-occupant-modal', OccupantModal); diff --git a/src/plugins/muc-views/modals/templates/occupant.js b/src/plugins/muc-views/modals/templates/occupant.js index e5704763e..358890457 100644 --- a/src/plugins/muc-views/modals/templates/occupant.js +++ b/src/plugins/muc-views/modals/templates/occupant.js @@ -43,7 +43,18 @@ export default (el) => { ${ jid ? html`
${__('XMPP Address')}:
${jid}
` : '' }
  • - ${ affiliation ? html`
    ${__('Affiliation')}:
    ${affiliation}
    ` : '' } +
    ${__('Affiliation')}:
    +
    ${affiliation}  + el.toggleForm()}> + + + + ${ el.show_affiliation_form ? html`` : '' } +
  • ${ role ? html`
    ${__('Role')}:
    ${role}
    ` : '' }