Skip to content

Commit

Permalink
Domains: proper handling of protocol in SRV record.
Browse files Browse the repository at this point in the history
The name attribute for the field was missing as well as a default value.
  • Loading branch information
Igor Klimer authored and Igor Klimer committed Dec 2, 2015
1 parent 329b40b commit bad86e2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/my-sites/upgrades/domain-management/dns/srv-record.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const SrvRecord = React.createClass( {
aux: 10,
weight: 10,
target: '',
port: ''
port: '',
protocol: 'tcp'
}
},

Expand All @@ -43,7 +44,7 @@ const SrvRecord = React.createClass( {
return (
<div className={ classes }>
<FormFieldset>
<FormLabel>{ this.translate( 'Value', { context: 'Dns Record' } ) }</FormLabel>
<FormLabel>{ this.translate( 'Name', { context: 'Dns Record' } ) }</FormLabel>
{ ! isValid( 'name' ) ? <FormInputValidation text={ this.translate( 'Invalid Name' ) } isError="true" /> : null }
<FormTextInput
name="name"
Expand All @@ -65,7 +66,10 @@ const SrvRecord = React.createClass( {
<FormFieldset>
<FormLabel>{ this.translate( 'Protocol', { context: 'Dns Record' } ) }</FormLabel>

<FormSelect onChange={ this.props.onChange( 'protocol' ) } value={ protocol }>
<FormSelect
name="protocol"
onChange={ this.props.onChange( 'protocol' ) }
value={ protocol }>
{ options }
</FormSelect>
</FormFieldset>
Expand Down

0 comments on commit bad86e2

Please sign in to comment.