import Radio from 'sonar-ui-common/components/controls/Radio';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { createApplication } from '../../../api/application';
import { ComponentQualifier, Visibility } from '../../../types/component';
</div>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
+
<div className="modal-field">
<label htmlFor="view-edit-name">
- {translate('name')} <em className="mandatory">*</em>
+ {translate('name')}
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="view-edit-name"
>
name
-
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import {
addApplicationBranch,
</div>
) : (
<>
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="view-edit-name">
- {translate('name')} <em className="mandatory">*</em>
+ {translate('name')}
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import Modal from 'sonar-ui-common/components/controls/Modal';
import Select from 'sonar-ui-common/components/controls/Select';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { csvEscape } from 'sonar-ui-common/helpers/csv';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { latinize } from 'sonar-ui-common/helpers/strings';
renderNameField = () => (
<div className="modal-field">
<label htmlFor="coding-rules-custom-rule-creation-name">
- {translate('name')} <em className="mandatory">*</em>
+ {translate('name')} <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
renderKeyField = () => (
<div className="modal-field">
<label htmlFor="coding-rules-custom-rule-creation-key">
- {translate('key')} {!this.props.customRule && <em className="mandatory">*</em>}
+ {translate('key')} {!this.props.customRule && <MandatoryFieldMarker />}
</label>
{this.props.customRule ? (
renderDescriptionField = () => (
<div className="modal-field">
<label htmlFor="coding-rules-custom-rule-creation-html-description">
- {translate('description')} <em className="mandatory">*</em>
+ {translate('description')}
+ <MandatoryFieldMarker />
</label>
<textarea
disabled={this.state.submitting}
<Alert variant="warning">{translate('coding_rules.reactivate.help')}</Alert>
)}
+ <MandatoryFieldsExplanation className="spacer-bottom" />
+
{this.renderNameField()}
{this.renderKeyField()}
<div className="display-flex-space-between">
>
coding_rules.reactivate.help
</Alert>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<div
className="modal-field"
>
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
>
key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
disabled={false}
htmlFor="coding-rules-custom-rule-creation-html-description"
>
description
-
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
disabled={false}
<div
className="modal-body modal-container"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<div
className="modal-field"
>
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
>
key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
disabled={false}
htmlFor="coding-rules-custom-rule-creation-html-description"
>
description
-
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
disabled={false}
import { SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import ValidationInput from 'sonar-ui-common/components/controls/ValidationInput';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { createProject, doesComponentExists } from '../../../api/components';
import ProjectKeyInput from '../../../components/common/ProjectKeyInput';
<div className="create-project-manual">
<div className="flex-1 huge-spacer-right">
<form className="manual-project-create" onSubmit={this.handleFormSubmit}>
+ <MandatoryFieldsExplanation className="big-spacer-bottom" />
+
<ProjectKeyInput
error={projectKeyError}
help={translate('onboarding.create_project.project_key.help')}
className="manual-project-create"
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="big-spacer-bottom"
+ />
<ProjectKeyInput
help="onboarding.create_project.project_key.help"
label="onboarding.create_project.project_key"
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getAllMetrics } from '../../../api/metrics';
<div className="modal-field">
<label htmlFor="create-custom-measure-metric">
{translate('custom_measures.metric')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{this.state.loading ? (
<i className="spinner" />
<div className="modal-field">
<label htmlFor="create-custom-measure-value">
{translate('value')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={this.props.measure !== undefined}
htmlFor="create-custom-measure-metric"
>
custom_measures.metric
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<i
className="spinner"
htmlFor="create-custom-measure-value"
>
value
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={false}
htmlFor="create-custom-measure-metric"
>
custom_measures.metric
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
autoFocus={true}
htmlFor="create-custom-measure-value"
>
value
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={false}
import Select, { Creatable } from 'sonar-ui-common/components/controls/Select';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
export interface MetricProps {
</header>
<div className="modal-body modal-container">
+ <MandatoryFieldsExplanation className="modal-field" />
+
<div className="modal-field">
<label htmlFor="create-metric-key">
{translate('key')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div className="modal-field">
<label htmlFor="create-metric-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-metric-name"
<div className="modal-field">
<label htmlFor="create-metric-type">
{translate('type')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body modal-container"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-metric-key"
>
key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-metric-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-metric-name"
htmlFor="create-metric-type"
>
type
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
interface Props {
</header>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="create-group-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-group-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
interface Props {
</header>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="permission-template-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { applyTemplateToProject, getPermissionTemplates } from '../../../../api/permissions';
</header>
<div className="modal-body">
- {this.state.done ? (
+ {this.state.done && (
<Alert variant="success">{translate('projects_role.apply_template.success')}</Alert>
- ) : (
+ )}
+
+ {this.state.loading && <i className="spinner" />}
+
+ {!this.state.done && !this.state.loading && (
<>
- {this.state.loading ? (
- <i className="spinner" />
- ) : (
- <div className="modal-field">
- <label htmlFor="project-permissions-template">
- {translate('template')}
- <em className="mandatory">*</em>
- </label>
- {this.state.permissionTemplates && (
- <Select
- clearable={false}
- id="project-permissions-template"
- onChange={this.handlePermissionTemplateChange}
- options={this.state.permissionTemplates.map(permissionTemplate => ({
- label: permissionTemplate.name,
- value: permissionTemplate.id
- }))}
- value={this.state.permissionTemplate}
- />
- )}
- </div>
- )}
+ <MandatoryFieldsExplanation className="modal-field" />
+ <div className="modal-field">
+ <label htmlFor="project-permissions-template">
+ {translate('template')}
+ <MandatoryFieldMarker />
+ </label>
+ {this.state.permissionTemplates && (
+ <Select
+ clearable={false}
+ id="project-permissions-template"
+ onChange={this.handlePermissionTemplateChange}
+ options={this.state.permissionTemplates.map(permissionTemplate => ({
+ label: permissionTemplate.name,
+ value: permissionTemplate.id
+ }))}
+ value={this.state.permissionTemplate}
+ />
+ )}
+ </div>
</>
)}
</div>
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="project-permissions-template"
>
template
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
import * as React from 'react';
import RadioCard from 'sonar-ui-common/components/controls/RadioCard';
import ValidationInput from 'sonar-ui-common/components/controls/ValidationInput';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
export interface Props {
<>
<p className="big-spacer-bottom">{translate('baseline.number_days.description')}</p>
{selected && (
- <ValidationInput
- error={undefined}
- id="baseline_number_of_days"
- isInvalid={isChanged && !isValid}
- isValid={isChanged && isValid}
- label={translate('baseline.specify_days')}
- required={true}>
- <input onChange={e => onChangeDays(e.currentTarget.value)} type="text" value={days} />
- </ValidationInput>
+ <>
+ <MandatoryFieldsExplanation />
+
+ <ValidationInput
+ error={undefined}
+ id="baseline_number_of_days"
+ isInvalid={isChanged && !isValid}
+ isValid={isChanged && isValid}
+ label={translate('baseline.specify_days')}
+ required={true}>
+ <input onChange={e => onChangeDays(e.currentTarget.value)} type="text" value={days} />
+ </ValidationInput>
+ </>
)}
</>
</RadioCard>
import SearchSelect from 'sonar-ui-common/components/controls/SearchSelect';
import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
export interface BaselineSettingReferenceBranchProps {
<p className="spacer-top">{translate('baseline.reference_branch.description2')}</p>
)}
<div className="big-spacer-top display-flex-column">
+ <MandatoryFieldsExplanation className="spacer-bottom" />
<label className="text-middle" htmlFor="reference_branch">
<strong>{translate('baseline.reference_branch.choose')}</strong>
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<SearchSelect<BranchOption>
autofocus={false}
>
baseline.number_days.description
</p>
+ <MandatoryFieldsExplanation />
<ValidationInput
id="baseline_number_of_days"
isInvalid={false}
>
baseline.number_days.description
</p>
+ <MandatoryFieldsExplanation />
<ValidationInput
id="baseline_number_of_days"
isInvalid={false}
>
baseline.number_days.description
</p>
+ <MandatoryFieldsExplanation />
<ValidationInput
id="baseline_number_of_days"
isInvalid={true}
<div
className="big-spacer-top display-flex-column"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<label
className="text-middle"
htmlFor="reference_branch"
<strong>
baseline.reference_branch.choose
</strong>
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<SearchSelect
autofocus={false}
<div
className="big-spacer-top display-flex-column"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<label
className="text-middle"
htmlFor="reference_branch"
<strong>
baseline.reference_branch.choose
</strong>
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<SearchSelect
autofocus={false}
<div
className="big-spacer-top display-flex-column"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<label
className="text-middle"
htmlFor="reference_branch"
<strong>
baseline.reference_branch.choose
</strong>
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<SearchSelect
autofocus={false}
import * as React from 'react';
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { renameBranch } from '../../../api/branches';
import { MainBranch } from '../../../types/branch-like';
</header>
<form onSubmit={this.handleSubmit}>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="rename-branch-name">
{translate('new_name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="rename-branch-name"
>
new_name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="rename-branch-name"
>
new_name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="rename-branch-name"
>
new_name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import * as React from 'react';
import { Button, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import ProjectKeyInput from '../../components/common/ProjectKeyInput';
import { validateProjectKey } from '../../helpers/projects';
onConfirm={props.onKeyChange}>
{({ onFormSubmit }) => (
<form onSubmit={onFormSubmit}>
+ <MandatoryFieldsExplanation className="spacer-bottom" />
+
<ProjectKeyInput
error={error}
label={translate('update_key.new_key')}
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<ProjectKeyInput
label="update_key.new_key"
onProjectKeyChange={[Function]}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
interface Props {
</header>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
+
<div className="modal-field">
<label htmlFor="create-link-name">
{translate('project_links.name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div className="modal-field">
<label htmlFor="create-link-url">
{translate('project_links.url')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-link-url"
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-link-name"
>
project_links.name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-link-url"
>
project_links.url
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-link-url"
import Modal from 'sonar-ui-common/components/controls/Modal';
import Select from 'sonar-ui-common/components/controls/Select';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { toNotSoISOString } from 'sonar-ui-common/helpers/dates';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { bulkApplyTemplate, getPermissionTemplates } from '../../api/permissions';
<div className="modal-field">
<label>
{translate('template')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
{loading && <i className="spinner" />}
- {!loading && !done && permissionTemplates && this.renderWarning()}
- {!loading && !done && permissionTemplates && this.renderSelect()}
+ {!loading && !done && permissionTemplates && (
+ <>
+ <MandatoryFieldsExplanation className="spacer-bottom" />
+ {this.renderWarning()}
+ {this.renderSelect()}
+ </>
+ )}
</div>
<footer className="modal-foot">
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { createProject } from '../../api/components';
import VisibilitySelector from '../../components/common/VisibilitySelector';
</header>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="create-project-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div className="modal-field">
<label htmlFor="create-project-key">
{translate('key')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-project-key"
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<Alert
variant="warning"
>
>
<label>
template
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<Alert
variant="warning"
>
>
<label>
template
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<Alert
variant="warning"
>
>
<label>
template
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="spacer-bottom"
+ />
<Alert
variant="warning"
>
>
<label>
template
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-project-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-project-key"
>
key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-project-key"
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-project-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-project-key"
>
key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-project-key"
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-project-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-project-key"
>
key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
id="create-project-key"
*/
import * as React from 'react';
import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { copyQualityGate } from '../../../api/quality-gates';
import { Router, withRouter } from '../../../components/hoc/withRouter';
onClose={this.props.onClose}
onConfirm={this.handleCopy}
size="small">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="quality-gate-form-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
*/
import * as React from 'react';
import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { createQualityGate } from '../../../api/quality-gates';
import { Router, withRouter } from '../../../components/hoc/withRouter';
onClose={this.props.onClose}
onConfirm={this.handleCreate}
size="small">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="quality-gate-form-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
*/
import * as React from 'react';
import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { renameQualityGate } from '../../../api/quality-gates';
onClose={this.props.onClose}
onConfirm={this.handleRename}
size="small">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="quality-gate-form-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
onConfirm={[Function]}
size="small"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="quality-gate-form-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
onConfirm={[Function]}
size="small"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="quality-gate-form-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
onConfirm={[Function]}
size="small"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="quality-gate-form-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import * as React from 'react';
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { copyProfile } from '../../../api/quality-profiles';
import { Profile } from '../types';
<h2>{header}</h2>
</div>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="copy-profile-name">
{translate('quality_profiles.copy_new_name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { changeProfileParent, createQualityProfile } from '../../../api/quality-profiles';
import { Profile } from '../types';
<h2>{header}</h2>
</div>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="extend-profile-name">
{translate('quality_profiles.copy_new_name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import * as React from 'react';
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { renameProfile } from '../../../api/quality-profiles';
import { Profile } from '../types';
<h2>{header}</h2>
</div>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="rename-profile-name">
{translate('quality_profiles.new_name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="extend-profile-name"
>
quality_profiles.copy_new_name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
import Select from 'sonar-ui-common/components/controls/Select';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { changeProfileParent } from '../../../api/quality-profiles';
import { Profile } from '../types';
<h2>{translate('quality_profiles.change_parent')}</h2>
</div>
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="change-profile-parent">
- {translate('quality_profiles.parent')} <em className="mandatory">*</em>
+ {translate('quality_profiles.parent')}
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="change-profile-parent"
>
quality_profiles.parent
-
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
import Select from 'sonar-ui-common/components/controls/Select';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { parseAsOptionalString } from 'sonar-ui-common/helpers/query';
import {
</div>
) : (
<div className="modal-body">
+ <MandatoryFieldsExplanation className="modal-field" />
<div className="modal-field">
<label htmlFor="create-profile-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
<div className="modal-field">
<label htmlFor="create-profile-language">
{translate('language')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { restoreQualityProfile } from '../../../api/quality-profiles';
{profile != null && ruleSuccesses != null ? (
this.renderAlert(profile, ruleFailures, ruleSuccesses)
) : (
- <div className="modal-field">
- <label htmlFor="restore-profile-backup">
- {translate('backup')}
- <em className="mandatory">*</em>
- </label>
- <input id="restore-profile-backup" name="backup" required={true} type="file" />
- </div>
+ <>
+ <MandatoryFieldsExplanation className="modal-field" />
+ <div className="modal-field">
+ <label htmlFor="restore-profile-backup">
+ {translate('backup')}
+ <MandatoryFieldMarker />
+ </label>
+ <input id="restore-profile-backup" name="backup" required={true} type="file" />
+ </div>
+ </>
)}
</div>
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-profile-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-profile-language"
>
language
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-profile-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoFocus={true}
htmlFor="create-profile-language"
>
language
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<Select
clearable={false}
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="restore-profile-backup"
>
backup
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
id="restore-profile-backup"
import { SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { parseError } from 'sonar-ui-common/helpers/request';
import { sendTestEmail } from '../../../api/settings';
</div>
)}
+ <MandatoryFieldsExplanation className="form-field" />
+
<div className="form-field">
<label htmlFor="test-email-to">
{translate('email_configuration.test.to_address')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
className="settings-large-input"
<div className="form-field">
<label htmlFor="test-email-message">
{translate('email_configuration.test.message')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<textarea
className="settings-large-input"
className="settings-definition-right"
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="test-email-to"
>
email_configuration.test.to_address
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="settings-large-input"
htmlFor="test-email-message"
>
email_configuration.test.message
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
className="settings-large-input"
Some error message
</Alert>
</div>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="test-email-to"
>
email_configuration.test.to_address
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="settings-large-input"
htmlFor="test-email-message"
>
email_configuration.test.message
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
className="settings-large-input"
className="settings-definition-right"
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="test-email-to"
>
email_configuration.test.to_address
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="settings-large-input"
htmlFor="test-email-message"
>
email_configuration.test.message
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
className="settings-large-input"
email_configuration.test.email_was_sent_to_x.email@example.com
</Alert>
</div>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="test-email-to"
>
email_configuration.test.to_address
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="settings-large-input"
htmlFor="test-email-message"
>
email_configuration.test.message
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
className="settings-large-input"
import * as React from 'react';
import { ButtonLink } from 'sonar-ui-common/components/controls/buttons';
import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { AlmBindingDefinition } from '../../../../types/alm-settings';
<div className="modal-field">
<label className="display-flex-center" htmlFor={id}>
{translate('settings.almintegration.form', id)}
- {!optional && <em className="mandatory">*</em>}
+ {!optional && <MandatoryFieldMarker />}
{help && <HelpTooltip className="spacer-left" overlay={help} placement="right" />}
</label>
htmlFor="key"
>
settings.almintegration.form.key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="input-super-large"
htmlFor="key"
>
settings.almintegration.form.key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<div>
<p>
htmlFor="key"
>
settings.almintegration.form.key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<textarea
className="settings-large-input"
htmlFor="key"
>
settings.almintegration.form.key
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay="help"
import { Link } from 'react-router';
import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
import { AlmKeys, ProjectAlmBindingResponse } from '../../../../types/alm-settings';
return (
<label className="display-flex-center" htmlFor={id}>
{translate('settings.pr_decoration.binding.form', id)}
- {!optional && <em className="mandatory">*</em>}
+ {!optional && <MandatoryFieldMarker />}
{help && (
<HelpTooltip
className="spacer-left"
import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../../types/alm-settings';
import AlmSpecificForm from './AlmSpecificForm';
event.preventDefault();
props.onSubmit();
}}>
+ <MandatoryFieldsExplanation className="form-field" />
+
<div className="form-field">
<label htmlFor="name">
{translate('settings.pr_decoration.binding.form.name')}
- <em className="mandatory spacer-right">*</em>
+ <MandatoryFieldMarker className="spacer-right" />
</label>
<Select
autosize={true}
htmlFor="azure.project"
>
settings.pr_decoration.binding.form.azure.project
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="azure.repository"
>
settings.pr_decoration.binding.form.azure.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="azure.project"
>
settings.pr_decoration.binding.form.azure.project
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="azure.repository"
>
settings.pr_decoration.binding.form.azure.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="bitbucket.repository"
>
settings.pr_decoration.binding.form.bitbucket.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="bitbucket.slug"
>
settings.pr_decoration.binding.form.bitbucket.slug
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="bitbucket.repository"
>
settings.pr_decoration.binding.form.bitbucket.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="bitbucket.slug"
>
settings.pr_decoration.binding.form.bitbucket.slug
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="bitbucketcloud.repository"
>
settings.pr_decoration.binding.form.bitbucketcloud.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="github.repository"
>
settings.pr_decoration.binding.form.github.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="github.repository"
>
settings.pr_decoration.binding.form.github.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="gitlab.repository"
>
settings.pr_decoration.binding.form.gitlab.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="input-super-large"
htmlFor="gitlab.repository"
>
settings.pr_decoration.binding.form.gitlab.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="input-super-large"
htmlFor="azure.project"
>
settings.pr_decoration.binding.form.azure.project
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
htmlFor="azure.repository"
>
settings.pr_decoration.binding.form.azure.repository
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
<HelpTooltip
className="spacer-left"
overlay={
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="name"
>
settings.pr_decoration.binding.form.name
- <em
- className="mandatory spacer-right"
- >
- *
- </em>
+ <MandatoryFieldMarker
+ className="spacer-right"
+ />
</label>
<Select
autosize={true}
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="name"
>
settings.pr_decoration.binding.form.name
- <em
- className="mandatory spacer-right"
- >
- *
- </em>
+ <MandatoryFieldMarker
+ className="spacer-right"
+ />
</label>
<Select
autosize={true}
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="name"
>
settings.pr_decoration.binding.form.name
- <em
- className="mandatory spacer-right"
- >
- *
- </em>
+ <MandatoryFieldMarker
+ className="spacer-right"
+ />
</label>
<Select
autosize={true}
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="name"
>
settings.pr_decoration.binding.form.name
- <em
- className="mandatory spacer-right"
- >
- *
- </em>
+ <MandatoryFieldMarker
+ className="spacer-right"
+ />
</label>
<Select
autosize={true}
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="name"
>
settings.pr_decoration.binding.form.name
- <em
- className="mandatory spacer-right"
- >
- *
- </em>
+ <MandatoryFieldMarker
+ className="spacer-right"
+ />
</label>
<Select
autosize={true}
<form
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="name"
>
settings.pr_decoration.binding.form.name
- <em
- className="mandatory spacer-right"
- >
- *
- </em>
+ <MandatoryFieldMarker
+ className="spacer-right"
+ />
</label>
<Select
autosize={true}
import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import Modal from 'sonar-ui-common/components/controls/Modal';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { parseError } from 'sonar-ui-common/helpers/request';
import { changePassword } from '../../../api/users';
</header>
<div className="modal-body">
{error && <Alert variant="error">{error}</Alert>}
+
+ <MandatoryFieldsExplanation className="modal-field" />
+
{this.props.isCurrentUser && (
<div className="modal-field">
<label htmlFor="old-user-password">
{translate('my_profile.password.old')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{/* keep this fake field to hack browser autofill */}
<input className="hidden" name="old-password-fake" type="password" />
<div className="modal-field">
<label htmlFor="user-password">
{translate('my_profile.password.new')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{/* keep this fake field to hack browser autofill */}
<input className="hidden" name="password-fake" type="password" />
<div className="modal-field">
<label htmlFor="confirm-user-password">
{translate('my_profile.password.confirm')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{/* keep this fake field to hack browser autofill */}
<input className="hidden" name="confirm-password-fake" type="password" />
import { Button, ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { parseError } from 'sonar-ui-common/helpers/request';
import { createUser, updateUser } from '../../../api/users';
<Alert variant="warning">{translate('users.cannot_update_delegated_user')}</Alert>
)}
+ <MandatoryFieldsExplanation className="modal-field" />
+
{!user && (
<div className="modal-field">
<label htmlFor="create-user-login">
{translate('login')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{/* keep this fake field to hack browser autofill */}
<input className="hidden" name="login-fake" type="text" />
<div className="modal-field">
<label htmlFor="create-user-name">
{translate('name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{/* keep this fake field to hack browser autofill */}
<input className="hidden" name="name-fake" type="text" />
<div className="modal-field">
<label htmlFor="create-user-password">
{translate('password')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
{/* keep this fake field to hack browser autofill */}
<input className="hidden" name="password-fake" type="password" />
<div
className="modal-body"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="old-user-password"
>
my_profile.password.old
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
htmlFor="user-password"
>
my_profile.password.new
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
htmlFor="confirm-user-password"
>
my_profile.password.confirm
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
<div
className="modal-body modal-container"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-user-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
<div
className="modal-body modal-container"
>
+ <MandatoryFieldsExplanation
+ className="modal-field"
+ />
<div
className="modal-field"
>
htmlFor="create-user-login"
>
login
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
htmlFor="create-user-name"
>
name
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
htmlFor="create-user-password"
>
password
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
className="hidden"
import * as React from 'react';
import InputValidationField from 'sonar-ui-common/components/controls/InputValidationField';
import ValidationModal from 'sonar-ui-common/components/controls/ValidationModal';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { isWebUri } from 'valid-url';
validate={this.handleValidate}>
{({ dirty, errors, handleBlur, handleChange, isSubmitting, touched, values }) => (
<>
+ <MandatoryFieldsExplanation className="big-spacer-bottom" />
+
<InputValidationField
autoFocus={true}
dirty={dirty}
label={
<label htmlFor="webhook-name">
{translate('webhooks.name')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
}
name="name"
label={
<label htmlFor="webhook-url">
{translate('webhooks.url')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
}
name="url"
import * as React from 'react';
import { SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { changePassword } from '../../api/users';
</Alert>
))}
+ <MandatoryFieldsExplanation className="form-field" />
+
<div className="form-field">
<label htmlFor="old_password">
{translate('my_profile.password.old')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoComplete="off"
<div className="form-field">
<label htmlFor="password">
{translate('my_profile.password.new')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoComplete="off"
<div className="form-field">
<label htmlFor="password_confirmation">
{translate('my_profile.password.confirm')}
- <em className="mandatory">*</em>
+ <MandatoryFieldMarker />
</label>
<input
autoComplete="off"
className="boxed-group-inner"
onSubmit={[Function]}
>
+ <MandatoryFieldsExplanation
+ className="form-field"
+ />
<div
className="form-field"
>
htmlFor="old_password"
>
my_profile.password.old
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoComplete="off"
htmlFor="password"
>
my_profile.password.new
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoComplete="off"
htmlFor="password_confirmation"
>
my_profile.password.confirm
- <em
- className="mandatory"
- >
- *
- </em>
+ <MandatoryFieldMarker />
</label>
<input
autoComplete="off"
extend=Extend
false=False
favorite=Favorite
+field_required=This field is required
+fields_marked_with_x_required=All fields marked with {star} are required
file=File
files=Files
filters=Filters