mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
Disabling input fields in preview mode
This commit is contained in:
parent
c9854b014b
commit
7c3e724874
@ -54,13 +54,13 @@ export const InputFieldStyles = `
|
||||
color: var(--grey7);
|
||||
}
|
||||
|
||||
.gh-portal-input:disabled {
|
||||
.gh-portal-popup-container:not(.preview) .gh-portal-input:disabled {
|
||||
background: var(--grey13);
|
||||
color: var(--grey9);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.gh-portal-input:disabled::placeholder {
|
||||
.gh-portal-popup-container:not(.preview) .gh-portal-input:disabled::placeholder {
|
||||
color: var(--grey9);
|
||||
}
|
||||
`;
|
||||
|
@ -13,6 +13,7 @@ const FormInput = ({field, onChange, onBlur = () => { }, onKeyDown = () => {}})
|
||||
type={field.type}
|
||||
name={field.name}
|
||||
placeholder={field.placeholder}
|
||||
disabled={field.disabled}
|
||||
value={field.value}
|
||||
onKeyDown={onKeyDown}
|
||||
onChange={e => onChange(e, field)}
|
||||
|
@ -7,6 +7,7 @@ import InputForm from '../common/InputForm';
|
||||
import {ValidateInputForm} from '../../utils/form';
|
||||
import {getSiteProducts, getSitePrices, hasMultipleProducts, hasOnlyFreePlan, isInviteOnlySite, getAvailableProducts, hasMultipleProductsFeature} from '../../utils/helpers';
|
||||
import {ReactComponent as InvitationIcon} from '../../images/icons/invitation.svg';
|
||||
import {hasMode} from '../../utils/check-mode';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
@ -345,6 +346,7 @@ class SignupPage extends React.Component {
|
||||
type: 'email',
|
||||
value: state.email,
|
||||
placeholder: 'jamie@example.com',
|
||||
disabled: (hasMode(['preview']) ? 'disabled' : ''),
|
||||
label: 'Email',
|
||||
name: 'email',
|
||||
required: true,
|
||||
@ -359,6 +361,7 @@ class SignupPage extends React.Component {
|
||||
type: 'text',
|
||||
value: state.name,
|
||||
placeholder: 'Jamie Larson',
|
||||
disabled: (hasMode(['preview']) ? 'disabled' : ''),
|
||||
label: 'Name',
|
||||
name: 'name',
|
||||
required: true,
|
||||
|
Loading…
Reference in New Issue
Block a user