/* eslint-disable max-len */ import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { createSubscribedElement } from '../../UnstatedUtils'; import AppContainer from '../../../services/AppContainer'; class XssForm extends React.Component { constructor(props) { super(props); const { appContainer } = this.props; this.state = { // TODO GW-304 fetch correct value isEnabledXss: false, // eslint-disable-next-line react/no-unused-state XssOption: 1, tagWhiteList: appContainer.config.tagWhiteList, attrWhiteList: '', }; this.handleInputChange = this.handleInputChange.bind(this); this.onClickSubmit = this.onClickSubmit.bind(this); } handleInputChange(e) { const target = e.target; const value = target.type === 'checkbox' ? target.checked : target.value; const name = target.name; this.setState({ [name]: value }); } async componentDidMount() { await this.syncXssSettings(); } async onClickSubmit() { // TODO GW-303 create apiV3 of update setting } async syncXssSettings() { // TODO GW-304 createApiV3 } xssOptions() { const { t } = this.props; return (