|
@@ -103,16 +103,21 @@ export default class InviteDialogView {
|
103
|
103
|
let {
|
104
|
104
|
titleString
|
105
|
105
|
} = this.dialog;
|
106
|
|
-
|
|
106
|
+ let doneKey = 'dialog.done';
|
|
107
|
+ let doneMsg = APP.translation.translateString(doneKey);
|
107
|
108
|
let states = {};
|
|
109
|
+ let buttons = {};
|
|
110
|
+ buttons[`${doneMsg}`] = true;
|
108
|
111
|
|
109
|
112
|
states[States.UNLOCKED] = {
|
110
|
113
|
title: titleString,
|
111
|
|
- html: this.getShareLinkBlock() + this.getAddPasswordBlock()
|
|
114
|
+ html: this.getShareLinkBlock() + this.getAddPasswordBlock(),
|
|
115
|
+ buttons
|
112
|
116
|
};
|
113
|
117
|
states[States.LOCKED] = {
|
114
|
118
|
title: titleString,
|
115
|
|
- html: this.getShareLinkBlock() + this.getPasswordBlock()
|
|
119
|
+ html: this.getShareLinkBlock() + this.getPasswordBlock(),
|
|
120
|
+ buttons
|
116
|
121
|
};
|
117
|
122
|
|
118
|
123
|
return states;
|
|
@@ -125,7 +130,7 @@ export default class InviteDialogView {
|
125
|
130
|
getShareLinkBlock() {
|
126
|
131
|
let copyKey = 'dialog.copy';
|
127
|
132
|
let copyText = APP.translation.translateString(copyKey);
|
128
|
|
- let roomLockDescKey = 'roomLocked';
|
|
133
|
+ let roomLockDescKey = 'dialog.roomLocked';
|
129
|
134
|
let roomLockDesc = APP.translation.translateString(roomLockDescKey);
|
130
|
135
|
let roomUnlockKey = 'roomUnlocked';
|
131
|
136
|
let roomUnlock = APP.translation.translateString(roomUnlockKey);
|
|
@@ -165,6 +170,8 @@ export default class InviteDialogView {
|
165
|
170
|
let addPassText = APP.translation.translateString(addPassKey);
|
166
|
171
|
let addKey = 'dialog.add';
|
167
|
172
|
let addText = APP.translation.translateString(addKey);
|
|
173
|
+ let hintKey = 'dialog.createPassword';
|
|
174
|
+ let hintMsg = APP.translation.translateString(hintKey);
|
168
|
175
|
let html;
|
169
|
176
|
|
170
|
177
|
if (this.model.isModerator) {
|
|
@@ -175,7 +182,7 @@ export default class InviteDialogView {
|
175
|
182
|
data-i18n="${addPassKey}">${addPassText}</label>
|
176
|
183
|
<div class="input-control__container">
|
177
|
184
|
<input class="input-control__input" id="newPasswordInput"
|
178
|
|
- type="text">
|
|
185
|
+ type="text" placeholder="${hintMsg}">
|
179
|
186
|
<button id="addPasswordBtn" id="inviteDialogAddPassword"
|
180
|
187
|
disabled data-i18n="${addKey}"
|
181
|
188
|
class="button-control button-control_light">
|
|
@@ -242,7 +249,6 @@ export default class InviteDialogView {
|
242
|
249
|
* Opening the dialog
|
243
|
250
|
*/
|
244
|
251
|
open() {
|
245
|
|
- let leftButton;
|
246
|
252
|
let {
|
247
|
253
|
submitFunction,
|
248
|
254
|
loadedFunction,
|
|
@@ -250,23 +256,12 @@ export default class InviteDialogView {
|
250
|
256
|
} = this.dialog;
|
251
|
257
|
|
252
|
258
|
let states = this.getStates();
|
253
|
|
-
|
254
|
|
- let buttons = [];
|
255
|
|
- let leftButtonKey = "dialog.Invite";
|
256
|
|
- let cancelButton
|
257
|
|
- = APP.translation.generateTranslationHTML("dialog.Cancel");
|
258
|
|
- buttons.push({title: cancelButton, value: false});
|
259
|
|
-
|
260
|
|
- leftButton = APP.translation.generateTranslationHTML(leftButtonKey);
|
261
|
|
- buttons.push({ title: leftButton, value: true});
|
262
|
|
-
|
263
|
259
|
let initial = this.model.roomLocked ? States.LOCKED : States.UNLOCKED;
|
264
|
260
|
|
265
|
261
|
APP.UI.messageHandler.openDialogWithStates(states, {
|
266
|
262
|
submit: submitFunction,
|
267
|
263
|
loaded: loadedFunction,
|
268
|
264
|
close: closeFunction,
|
269
|
|
- buttons,
|
270
|
265
|
size: 'medium'
|
271
|
266
|
});
|
272
|
267
|
$.prompt.goToState(initial);
|