Merge pull request #3516 from matrix-org/t3chguy/clean_out_useless_errors

Cull some easily fixable errors which make the console a mess
This commit is contained in:
Michael Telatynski 2019-10-04 10:20:34 +01:00 committed by GitHub
commit 06c612ba3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 16 additions and 25 deletions

View file

@ -61,7 +61,7 @@ export function showGroupAddRoomDialog(groupId) {
</div>;
const checkboxContainer = <label className="mx_GroupAddressPicker_checkboxContainer">
<input type="checkbox" onClick={onCheckboxClicked} />
<input type="checkbox" onChange={onCheckboxClicked} />
<div>
{ _t("Show these rooms to non-members on the community page and room list?") }
</div>

View file

@ -409,10 +409,6 @@ export default createReactClass({
groupIsNew: PropTypes.bool,
},
childContextTypes: {
groupStore: PropTypes.instanceOf(GroupStore),
},
getInitialState: function() {
return {
summary: null,

View file

@ -319,7 +319,7 @@ export const TermsAuthEntry = createReactClass({
checkboxes.push(
<label key={"policy_checkbox_" + policy.id} className="mx_InteractiveAuthEntryComponents_termsPolicy">
<input type="checkbox" onClick={() => this._togglePolicy(policy.id)} checked={checked} />
<input type="checkbox" onChange={() => this._togglePolicy(policy.id)} checked={checked} />
<a href={policy.url} target="_blank" rel="noopener">{ policy.name }</a>
</label>,
);

View file

@ -104,7 +104,7 @@ export default class ModularServerConfig extends ServerConfig {
</a>,
},
)}
<form onSubmit={this.onSubmit} autoComplete={false} action={null}>
<form onSubmit={this.onSubmit} autoComplete="off" action={null}>
<div className="mx_ServerConfig_fields">
<Field id="mx_ServerConfig_hsUrl"
label={_t("Server Name")}

View file

@ -279,7 +279,7 @@ export default class ServerConfig extends React.PureComponent {
{errorText}
{this._renderHomeserverSection()}
{this._renderIdentityServerSection()}
<form onSubmit={this.onSubmit} autoComplete={false} action={null}>
<form onSubmit={this.onSubmit} autoComplete="off" action={null}>
{submitButton}
</form>
</div>

View file

@ -153,7 +153,7 @@ export default class ShareDialog extends React.Component {
<input type="checkbox"
id="mx_ShareDialog_checkbox"
checked={this.state.linkSpecificEvent}
onClick={this.onLinkSpecificEventCheckboxClick} />
onChange={this.onLinkSpecificEventCheckboxClick} />
<label htmlFor="mx_ShareDialog_checkbox">
{ _t('Link to most recent message') }
</label>

View file

@ -120,7 +120,7 @@ export default class EditableItemList extends React.Component {
_renderNewItemField() {
return (
<form onSubmit={this._onItemAdded} autoComplete={false}
<form onSubmit={this._onItemAdded} autoComplete="off"
noValidate={true} className="mx_EditableItemList_newItem">
<Field id={`mx_EditableItemList_new_${this.props.id}`} label={this.props.placeholder} type="text"
autoComplete="off" value={this.props.newItem || ""} onChange={this._onNewItemChanged} />

View file

@ -181,7 +181,7 @@ module.exports = createReactClass({
<input type="radio"
value="public"
checked={this.state.groupRoom.isPublic}
onClick={this._changeGroupRoomPublicity}
onChange={this._changeGroupRoomPublicity}
/>
<div className="mx_MemberInfo_label_text">
{ _t('Visible to everyone') }
@ -193,7 +193,7 @@ module.exports = createReactClass({
<input type="radio"
value="private"
checked={!this.state.groupRoom.isPublic}
onClick={this._changeGroupRoomPublicity}
onChange={this._changeGroupRoomPublicity}
/>
<div className="mx_MemberInfo_label_text">
{ _t('Only visible to community members') }

View file

@ -177,7 +177,7 @@ export default class RoomProfileSettings extends React.Component {
}
return (
<form onSubmit={this._saveProfile} autoComplete={false} noValidate={true}>
<form onSubmit={this._saveProfile} autoComplete="off" noValidate={true}>
<input type="file" ref="avatarUpload" className="mx_ProfileSettings_avatarUpload"
onChange={this._onAvatarChanged} accept="image/*" />
<div className="mx_ProfileSettings_profile">

View file

@ -81,7 +81,7 @@ export default class DevicesPanelEntry extends React.Component {
{ lastSeen }
</div>
<div className="mx_DevicesPanel_deviceButtons">
<input type="checkbox" onClick={this.onDeviceToggled} checked={this.props.selected} />
<input type="checkbox" onChange={this.onDeviceToggled} checked={this.props.selected} />
</div>
</div>
);

View file

@ -155,7 +155,7 @@ export default class ProfileSettings extends React.Component {
}
return (
<form onSubmit={this._saveProfile} autoComplete={false} noValidate={true}>
<form onSubmit={this._saveProfile} autoComplete="off" noValidate={true}>
<input type="file" ref="avatarUpload" className="mx_ProfileSettings_avatarUpload"
onChange={this._onAvatarChanged} accept="image/*" />
<div className="mx_ProfileSettings_profile">

View file

@ -229,7 +229,7 @@ export default class EmailAddresses extends React.Component {
return (
<div className="mx_EmailAddresses">
{existingEmailElements}
<form onSubmit={this._onAddClick} autoComplete={false}
<form onSubmit={this._onAddClick} autoComplete="off"
noValidate={true} className="mx_EmailAddresses_new">
<Field id="mx_EmailAddressses_newEmailAddress"
type="text"

View file

@ -231,7 +231,7 @@ export default class PhoneNumbers extends React.Component {
<br />
{this.state.verifyError}
</div>
<form onSubmit={this._onContinueClick} autoComplete={false} noValidate={true}>
<form onSubmit={this._onContinueClick} autoComplete="off" noValidate={true}>
<Field id="mx_PhoneNumbers_newPhoneNumberCode"
type="text"
label={_t("Verification code")}
@ -260,8 +260,7 @@ export default class PhoneNumbers extends React.Component {
return (
<div className="mx_PhoneNumbers">
{existingPhoneElements}
<form onSubmit={this._onAddClick} autoComplete={false}
noValidate={true} className="mx_PhoneNumbers_new">
<form onSubmit={this._onAddClick} autoComplete="off" noValidate={true} className="mx_PhoneNumbers_new">
<div className="mx_PhoneNumbers_input">
<Field id="mx_PhoneNumbers_newPhoneNumber"
type="text"

View file

@ -207,11 +207,7 @@ export class PhoneNumber extends React.Component {
<br />
{this.state.verifyError}
</span>
<form
onSubmit={this.onContinueClick}
autoComplete={false}
noValidate={true}
>
<form onSubmit={this.onContinueClick} autoComplete="off" noValidate={true}>
<Field id="mx_PhoneNumbers_newPhoneNumberCode"
type="text"
label={_t("Verification code")}

View file

@ -156,7 +156,7 @@ export default class NotificationsSettingsTab extends React.Component {
</div>
<div>
<h3>{_t("Set a new custom sound")}</h3>
<form autoComplete={false} noValidate={true}>
<form autoComplete="off" noValidate={true}>
<input ref="soundUpload" className="mx_NotificationSound_soundUpload" type="file" onChange={this._onSoundUploadChanged.bind(this)} accept="audio/*" />
</form>