UX: better invite modal

This commit is contained in:
Arpit Jalan 2016-06-07 13:34:58 +05:30
parent fe1ebee791
commit 02e461de8d
4 changed files with 10 additions and 10 deletions

View File

@ -110,11 +110,8 @@ export default Ember.Controller.extend(ModalFunctionality, {
}
}.property('isMessage', 'invitingToTopic', 'emailOrUsername'),
// Instructional text for the group selection.
groupInstructions: function() {
return this.get('isPrivateTopic') ?
I18n.t('topic.automatically_add_to_groups_required') :
I18n.t('topic.automatically_add_to_groups_optional');
showGroupsClass: function() {
return this.get('isPrivateTopic') ? 'required' : 'optional';
}.property('isPrivateTopic'),
groupFinder(term) {

View File

@ -19,12 +19,12 @@
{{text-field value=emailOrUsername placeholderKey="topic.invite_reply.email_placeholder"}}
{{/if}}
{{#if showGroups}}
<label>{{{groupInstructions}}}</label>
<label><span class={{showGroupsClass}}>{{i18n 'topic.automatically_add_to_groups'}}</span></label>
{{group-selector groupFinder=groupFinder groupNames=model.groupNames placeholderKey="topic.invite_private.group_name"}}
{{/if}}
{{#if showCustomMessage}}
<br><label><a {{action "showCustomMessageBox"}}>{{i18n 'invite.custom_message'}}</a></label>
<br><label><span class='optional'>{{i18n 'invite.custom_message'}}</span> <a {{action "showCustomMessageBox"}}>{{i18n 'invite.custom_message_link'}}</a>.</label>
{{#if hasCustomMessage}}{{textarea value=customMessage placeholder=customMessagePlaceholder}}{{/if}}
{{/if}}

View File

@ -267,6 +267,9 @@
.ember-text-field {
width: 550px;
}
.optional {
color: #9e9ea6;
}
}
.permission-list{

View File

@ -1423,8 +1423,7 @@ en:
banner_exists: "There <strong class='badge badge-notification unread'>is</strong> currently a banner topic."
inviting: "Inviting..."
automatically_add_to_groups_optional: "This invite also includes access to these groups: (optional, admin only)"
automatically_add_to_groups_required: "This invite also includes access to these groups: (<b>Required</b>, admin only)"
automatically_add_to_groups: "This invite also includes access to these groups:"
invite_private:
title: 'Invite to Message'
@ -3041,7 +3040,8 @@ en:
search: "There are no more search results."
invite:
custom_message: "Make your invite a little bit more personal by writing a custom message (optional)."
custom_message: "Make your invite a little bit more personal by writing a"
custom_message_link: "custom message"
custom_message_placeholder: "Enter your custom message, use {invite_link} for specifying invite link."
custom_message_template: |
Hello,