Handles disabled dial-out codes. (#1847)

Hides the UI component showing dialout codes and uses the dial input without validating it.

Skips printing error when dial-in numbers is not configured.
This commit is contained in:
Дамян Минков
2017-07-31 14:44:50 -05:00
committed by virtuacoplenny
parent 9c6afc2062
commit 82117a0aef
5 changed files with 56 additions and 17 deletions

View File

@@ -141,12 +141,11 @@ class DialOutNumbersForm extends Component {
*/
render() {
const { t, _dialOutCodes } = this.props;
const items
= _dialOutCodes ? this._formatCountryCodes(_dialOutCodes) : [];
return (
<div className = 'form-control'>
{ this._createDropdownMenu(items) }
{ _dialOutCodes ? this._createDropdownMenu(
this._formatCountryCodes(_dialOutCodes)) : null }
<div className = 'dial-out-input'>
<AKFieldText
autoFocus = { true }
@@ -155,7 +154,8 @@ class DialOutNumbersForm extends Component {
onChange = { this._onInputChange }
placeholder = { t('dialOut.enterPhone') }
ref = { this._setDialInputElement }
shouldFitContainer = { true } />
shouldFitContainer = { true }
value = { this.state.dialInput } />
</div>
</div>
);