Send button must be translateable and should type "submit"

This commit is contained in:
JC Brand 2017-04-11 07:32:17 +00:00
parent d2eadbdce4
commit de2f33f333
4 changed files with 9 additions and 7 deletions

View File

@ -125,7 +125,8 @@
title: this.model.get('fullname'),
unread_msgs: __('You have unread messages'),
info_close: __('Close this chat box'),
label_personal_message: __('Personal message')
label_personal_message: __('Personal message'),
label_send: __('Send')
}
)
)

View File

@ -409,10 +409,11 @@
if (!this.$('.chat-area').length) {
this.$('.chatroom-body').empty()
.append(tpl_chatarea({
'unread_msgs': __('You have unread messages'),
'show_toolbar': _converse.show_toolbar,
'label_message': __('Message'),
'show_send_button': _converse.show_send_button
'label_send': __('Send'),
'show_send_button': _converse.show_send_button,
'show_toolbar': _converse.show_toolbar,
'unread_msgs': __('You have unread messages')
}))
.append(this.occupantsview.$el);
this.renderToolbar(tpl_chatroom_toolbar);
@ -2098,7 +2099,7 @@
this.renderRoomFeatures, 100, {'leading': false}
);
}
var changed_features = {}
var changed_features = {};
_.each(_.keys(model.changed), function (k) {
if (!_.isNil(ROOM_FEATURES_MAP[k])) {
changed_features[ROOM_FEATURES_MAP[k]] = !model.changed[k];

View File

@ -8,7 +8,7 @@
<textarea type="text" class="chat-textarea {[ if (show_send_button) { ]}chat-textarea-send-button{[ } ]}"
placeholder="{{{label_message}}}"/>
{[ if (show_send_button) { ]}
<button type="button" class="pure-button send-button">Send</button>
<button type="submit" class="pure-button send-button">{{{ label_send }}}</button>
{[ } ]}
</form>
</div>

View File

@ -29,7 +29,7 @@
placeholder="{{{label_personal_message}}}"/>
{[ if (show_send_button) { ]}
<button type="button" class="pure-button send-button">Send</button>
<button type="submit" class="pure-button send-button">{{{ label_send }}}</button>
{[ } ]}
</form>
{[ } ]}