import React, { Component } from 'react'; import { connect } from 'react-redux'; import { setPassword } from '../../base/conference'; import { translate } from '../../base/i18n'; /** * A React {@code Component} for removing a lock from a JitsiConference. */ class RemovePasswordForm extends Component { /** * {@code RemovePasswordForm}'s property types. * * @static */ static propTypes = { /** * The JitsiConference on which remove a lock. * * @type {JitsiConference} */ conference: React.PropTypes.object, /** * Invoked to send a password removal request. */ dispatch: React.PropTypes.func, /** * Whether or not the room lock, if any, was set by the local user. */ lockedLocally: React.PropTypes.bool, /** * The current known password for the JitsiConference. */ password: React.PropTypes.string, /** * Invoked to obtain translated strings. */ t: React.PropTypes.func }; /** * Initializes a new {@code RemovePasswordForm} instance. * * @param {Object} props - The read-only properties with which the new * instance is to be initialized. */ constructor(props) { super(props); // Bind event handlers so they are only bound once for every instance. this._onClick = this._onClick.bind(this); } /** * Implements React's {@link Component#render()}. * * @private * @returns {ReactElement} */ render() { return (