muc-views: pass all model attributes to template
Makes it possible to show a validation message in a downstream application.
This commit is contained in:
parent
dffe3d1a26
commit
115abdda27
|
@ -1474,12 +1474,12 @@ converse.plugins.add('converse-muc-views', {
|
|||
__('Choose a nickname to enter') :
|
||||
__('Please choose your nickname');
|
||||
|
||||
const html = tpl_chatroom_nickname_form({
|
||||
const html = tpl_chatroom_nickname_form(Object.assign({
|
||||
heading,
|
||||
'label_nickname': __('Nickname'),
|
||||
'label_join': __('Enter groupchat'),
|
||||
'nickname': this.model.get('nickname')
|
||||
});
|
||||
}, this.model.toJSON()));
|
||||
|
||||
if (_converse.muc_show_logs_before_join) {
|
||||
const container = this.el.querySelector('.muc-bottom-panel');
|
||||
container.innerHTML = html;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<form class="converse-form chatroom-form converse-centered-form">
|
||||
<fieldset class="form-group">
|
||||
<label>{{{o.heading}}}</label>
|
||||
<p class="validation-message">{{{o.validation_message}}}</p>
|
||||
<input type="text" required="required" name="nick" value="{{{o.nickname}}}"
|
||||
class="form-control {{o.error_class}}" placeholder="{{{o.label_nickname}}}"/>
|
||||
</fieldset>
|
||||
|
|
Loading…
Reference in New Issue
Block a user