Skip to content

Commit

Permalink
Merge pull request #6747 from gdelavald/incorrect-error-message-on-cr…
Browse files Browse the repository at this point in the history
…eate-channel

[FIX] Incorrect error message when creating channel
  • Loading branch information
rodrigok authored Apr 24, 2017
2 parents 1566f7e + d00bacb commit 1ced54e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/rocketchat-theme/client/imports/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ label.required::after {
&.toggle {
font-size: 0;

> span {
> label {
display: inline-block;
width: calc(~"100% - 40px");
font-size: 14px;
Expand Down
6 changes: 3 additions & 3 deletions packages/rocketchat-ui-sidenav/client/createCombinedFlex.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ <h4>{{_ "Channels"}}</h4>
<div class="wrapper">
<h4>{{_ "Create_new" }}</h4>
<div class="input-line no-icon">
<span>{{_ "Name"}}</span>
<label for="channel-name">{{_ "Name"}}</label>
<input type="text" id="channel-name" class="required" dir="auto" placeholder="{{_ 'Enter_name_here'}}">
</div>
<div class="input-line toggle">
<span>{{_ "Private"}}</span>
<label for="channel-type">{{_ "Private"}}</label>
<div class="input checkbox toggle">
<input type="checkbox" id="channel-type" {{privateSwitchDisabled}} {{privateSwitchChecked}}>
<label class="color-tertiary-font-color" for="channel-type"></label>
</div>
</div>
<div class="input-line toggle">
<span>{{_ "Read_only_channel"}}</span>
<label for="channel-ro">{{_ "Read_only_channel"}}</label>
<div class="input checkbox toggle">
<input type="checkbox" id="channel-ro">
<label class="color-tertiary-font-color" for="channel-ro"></label>
Expand Down
2 changes: 0 additions & 2 deletions packages/rocketchat-ui-sidenav/client/createCombinedFlex.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ Template.createCombinedFlex.events({
if (!err) {
return Meteor.call(createRoute, name, instance.selectedUsers.get(), readOnly, function(err, result) {
if (err) {
console.log(err);
if (err.error === 'error-invalid-name') {
instance.error.set({ invalid: true });
return;
Expand All @@ -137,7 +136,6 @@ Template.createCombinedFlex.events({
return FlowRouter.go(successRoute, { name }, FlowRouter.current().queryParams);
});
} else {
console.log(err);
return instance.error.set({ fields: err });
}
}
Expand Down

0 comments on commit 1ced54e

Please sign in to comment.