@@ -189,10 +189,6 @@ em.mandatory { | |||
font-style: italic; | |||
} | |||
label[for] { | |||
cursor: pointer; | |||
} | |||
.form-field { | |||
clear: both; | |||
display: block; |
@@ -97,7 +97,7 @@ export default class OrganizationAvatarInput extends React.PureComponent<Props, | |||
'is-invalid': isInvalid, | |||
'is-valid': isValid | |||
})} | |||
id="organization-display-name" | |||
id="organization-avatar" | |||
onBlur={this.handleBlur} | |||
onChange={this.handleChange} | |||
onFocus={this.handleFocus} |
@@ -72,7 +72,7 @@ export default class OrganizationDescriptionInput extends React.PureComponent<Pr | |||
return ( | |||
<ValidationInput | |||
error={this.state.error} | |||
id="organization-display-name" | |||
id="organization-description" | |||
isInvalid={isInvalid} | |||
isValid={isValid} | |||
label={translate('onboarding.create_organization.description')}> |
@@ -19,7 +19,7 @@ exports[`should display the fallback avatar when there is no url 1`] = ` | |||
/> | |||
<input | |||
className="input-super-large text-middle" | |||
id="organization-display-name" | |||
id="organization-avatar" | |||
onBlur={[Function]} | |||
onChange={[Function]} | |||
onFocus={[Function]} | |||
@@ -49,7 +49,7 @@ exports[`should render correctly 1`] = ` | |||
/> | |||
<input | |||
className="input-super-large text-middle" | |||
id="organization-display-name" | |||
id="organization-avatar" | |||
onBlur={[Function]} | |||
onChange={[Function]} | |||
onFocus={[Function]} |
@@ -2,7 +2,7 @@ | |||
exports[`should render correctly 1`] = ` | |||
<ValidationInput | |||
id="organization-display-name" | |||
id="organization-description" | |||
isInvalid={false} | |||
isValid={false} | |||
label="onboarding.create_organization.description" |
@@ -47,8 +47,10 @@ export class OrganizationInput extends React.PureComponent<Props & WithRouterPro | |||
return ( | |||
<div className="form-field spacer-bottom"> | |||
<label htmlFor="select-organization"> | |||
{translate('onboarding.create_project.organization')} | |||
<em className="mandatory">*</em> | |||
<span className="text-middle"> | |||
<strong>{translate('onboarding.create_project.organization')}</strong> | |||
<em className="mandatory">*</em> | |||
</span> | |||
</label> | |||
<OrganizationSelect | |||
hideIcons={!autoImport} |
@@ -7,12 +7,18 @@ exports[`should render correctly 1`] = ` | |||
<label | |||
htmlFor="select-organization" | |||
> | |||
onboarding.create_project.organization | |||
<em | |||
className="mandatory" | |||
<span | |||
className="text-middle" | |||
> | |||
* | |||
</em> | |||
<strong> | |||
onboarding.create_project.organization | |||
</strong> | |||
<em | |||
className="mandatory" | |||
> | |||
* | |||
</em> | |||
</span> | |||
</label> | |||
<OrganizationSelect | |||
hideIcons={true} |
@@ -123,6 +123,7 @@ export default class Form extends React.PureComponent<Props, State> { | |||
<Select | |||
autoFocus={true} | |||
clearable={false} | |||
id="create-custom-measure-metric" | |||
onChange={this.handleMetricSelect} | |||
options={options} | |||
value={this.state.metricKey} |
@@ -135,6 +135,7 @@ exports[`should render form 2`] = ` | |||
<Select | |||
autoFocus={true} | |||
clearable={false} | |||
id="create-custom-measure-metric" | |||
onChange={[Function]} | |||
options={ | |||
Array [ |
@@ -149,6 +149,7 @@ export default class Form extends React.PureComponent<Props, State> { | |||
<div className="modal-field"> | |||
<label htmlFor="create-metric-domain">{translate('custom_metrics.domain')}</label> | |||
<Creatable | |||
id="create-metric-domain" | |||
onChange={this.handleDomainChange} | |||
options={domains.map(domain => ({ label: domain, value: domain }))} | |||
value={this.state.domain} | |||
@@ -161,6 +162,7 @@ export default class Form extends React.PureComponent<Props, State> { | |||
</label> | |||
<Select | |||
clearable={false} | |||
id="create-metric-type" | |||
onChange={this.handleTypeChange} | |||
options={this.props.types.map(type => ({ | |||
label: translate('metric.type', type), |
@@ -89,6 +89,7 @@ exports[`should render form 1`] = ` | |||
custom_metrics.domain | |||
</label> | |||
<Creatable | |||
id="create-metric-domain" | |||
onChange={[Function]} | |||
options={ | |||
Array [ | |||
@@ -119,6 +120,7 @@ exports[`should render form 1`] = ` | |||
</label> | |||
<Select | |||
clearable={false} | |||
id="create-metric-type" | |||
onChange={[Function]} | |||
options={ | |||
Array [ |
@@ -270,8 +270,12 @@ export default class BulkChangeModal extends React.PureComponent<Props, State> { | |||
</div> | |||
); | |||
renderCheckbox = (field: keyof FormFields) => ( | |||
<Checkbox checked={this.state[field] !== undefined} onCheck={this.handleFieldCheck(field)} /> | |||
renderCheckbox = (field: keyof FormFields, id?: string) => ( | |||
<Checkbox | |||
checked={this.state[field] !== undefined} | |||
id={id} | |||
onCheck={this.handleFieldCheck(field)} | |||
/> | |||
); | |||
renderAffected = (affected: number) => ( | |||
@@ -485,7 +489,7 @@ export default class BulkChangeModal extends React.PureComponent<Props, State> { | |||
renderNotificationsField = () => ( | |||
<div className="modal-field"> | |||
<label htmlFor="send-notifications">{translate('issue.send_notifications')}</label> | |||
{this.renderCheckbox('notifications')} | |||
{this.renderCheckbox('notifications', 'send-notifications')} | |||
</div> | |||
); | |||
@@ -75,6 +75,7 @@ exports[`should display form when issues are present 1`] = ` | |||
</label> | |||
<Checkbox | |||
checked={false} | |||
id="send-notifications" | |||
onCheck={[Function]} | |||
thirdState={false} | |||
/> |
@@ -121,6 +121,7 @@ export default class ApplyTemplate extends React.PureComponent<Props, State> { | |||
{this.state.permissionTemplates && ( | |||
<Select | |||
clearable={false} | |||
id="project-permissions-template" | |||
onChange={this.handlePermissionTemplateChange} | |||
options={this.state.permissionTemplates.map(permissionTemplate => ({ | |||
label: permissionTemplate.name, |
@@ -110,7 +110,7 @@ export default class ConditionModal extends React.PureComponent<Props, State> { | |||
onConfirm={this.handleFormSubmit}> | |||
{this.state.errorMessage && <Alert variant="error">{this.state.errorMessage}</Alert>} | |||
<div className="modal-field"> | |||
<label htmlFor="create-user-login">{translate('quality_gates.conditions.metric')}</label> | |||
<label htmlFor="condition-metric">{translate('quality_gates.conditions.metric')}</label> | |||
{metrics && <MetricSelect metrics={metrics} onMetricChange={this.handleMetricChange} />} | |||
{this.props.metric && ( | |||
<span className="note">{getLocalizedMetricName(this.props.metric)}</span> | |||
@@ -119,7 +119,9 @@ export default class ConditionModal extends React.PureComponent<Props, State> { | |||
{metric && ( | |||
<> | |||
<div className="modal-field"> | |||
<label>{translate('quality_gates.conditions.operator')}</label> | |||
<label htmlFor="condition-operator"> | |||
{translate('quality_gates.conditions.operator')} | |||
</label> | |||
<ConditionOperator | |||
metric={metric} | |||
onOperatorChange={this.handleOperatorChange} | |||
@@ -127,7 +129,9 @@ export default class ConditionModal extends React.PureComponent<Props, State> { | |||
/> | |||
</div> | |||
<div className="modal-field"> | |||
<label>{translate('quality_gates.conditions.error')}</label> | |||
<label htmlFor="condition-threshold"> | |||
{translate('quality_gates.conditions.error')} | |||
</label> | |||
<ThresholdInput | |||
metric={metric} | |||
name="error" |
@@ -53,6 +53,7 @@ export default class ConditionOperator extends React.PureComponent<Props> { | |||
autoFocus={true} | |||
className="input-medium" | |||
clearable={false} | |||
id="condition-operator" | |||
name="operator" | |||
onChange={this.handleChange} | |||
options={operatorOptions} |
@@ -75,6 +75,7 @@ export default class MetricSelect extends React.PureComponent<Props, State> { | |||
return ( | |||
<Select | |||
className="text-middle input-large" | |||
id="condition-metric" | |||
onChange={this.handleChange} | |||
options={optionsWithDomains} | |||
placeholder={translate('search.search_for_metrics')} |
@@ -54,6 +54,7 @@ export default class ThresholdInput extends React.PureComponent<Props> { | |||
<Select | |||
className="input-tiny text-middle" | |||
clearable={true} | |||
id="condition-threshold" | |||
name={name} | |||
onChange={this.handleSelectChange} | |||
options={options} | |||
@@ -75,6 +76,7 @@ export default class ThresholdInput extends React.PureComponent<Props> { | |||
<input | |||
className="input-tiny text-middle" | |||
data-type={metric.type} | |||
id="condition-threshold" | |||
name={name} | |||
onChange={this.handleChange} | |||
type="text" |
@@ -107,6 +107,7 @@ export default class ChangeParentForm extends React.PureComponent<Props, State> | |||
</label> | |||
<Select | |||
clearable={false} | |||
id="change-profile-parent" | |||
name="parentKey" | |||
onChange={this.handleSelectChange} | |||
options={options} |
@@ -142,6 +142,7 @@ export default class CreateProfileForm extends React.PureComponent<Props, State> | |||
</label> | |||
<Select | |||
clearable={false} | |||
id="create-profile-language" | |||
name="language" | |||
onChange={this.handleLanguageChange} | |||
options={languages.map(language => ({ |
@@ -150,7 +150,7 @@ class EmailForm extends React.PureComponent<Props, State> { | |||
<textarea | |||
className="settings-large-input" | |||
disabled={this.state.loading} | |||
id="test-email-title" | |||
id="test-email-message" | |||
onChange={this.onMessageChange} | |||
required={true} | |||
rows={5} |