Add affiliation form to the occupant modal
This commit is contained in:
parent
57f489f61b
commit
ad7b4ae343
|
@ -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);
|
||||
|
|
|
@ -43,7 +43,18 @@ export default (el) => {
|
|||
${ jid ? html`<div class="row"><strong>${__('XMPP Address')}:</strong></div><div class="row">${jid}</div>` : '' }
|
||||
</li>
|
||||
<li>
|
||||
${ affiliation ? html`<div class="row"><strong>${__('Affiliation')}:</strong></div><div class="row">${affiliation}</div>` : '' }
|
||||
<div class="row"><strong>${__('Affiliation')}:</strong></div>
|
||||
<div class="row">${affiliation}
|
||||
<a href="#"
|
||||
data-form="affiliation-form"
|
||||
class="toggle-form right"
|
||||
color="var(--subdued-color)"
|
||||
@click=${() => el.toggleForm()}>
|
||||
|
||||
<converse-icon class="fa fa-wrench" size="1em"></converse-icon>
|
||||
</a>
|
||||
${ el.show_affiliation_form ? html`<converse-muc-affiliation-form jid=${jid} .muc=${muc} affiliation=${affiliation}></converse-muc-affiliation-form>` : '' }
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
${ role ? html`<div class="row"><strong>${__('Role')}:</strong></div><div class="row">${role}</div>` : '' }
|
||||
|
|
Loading…
Reference in New Issue
Block a user