import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Modal, ModalHeader, ModalBody, ModalFooter, Alert, Button, Input, InputGroup, InputGroupAddon } from 'reactstrap'; import { gettext } from '../../utils/constants'; import { Utils } from '../../utils/utils'; const propTypes = { removePassword: PropTypes.func.isRequired, toggle: PropTypes.func.isRequired }; class RemoveWebdavPassword extends Component { constructor(props) { super(props); this.state = { btnDisabled: false, errMsg: '' }; } submit = () => { this.setState({ btnDisabled: true }); this.props.removePassword(); } render() { const { toggle } = this.props; let dialogMsg = gettext('Are you sure you want to remove {placeholder} ?').replace('{placeholder}', 'WebDAV password'); return ( {gettext('Remove WebDAV Password')}

{dialogMsg}

{this.state.errMsg && {gettext(this.state.errMsg)}}
); } } RemoveWebdavPassword.propTypes = propTypes; export default RemoveWebdavPassword;