Add "auth" parameter to tune connect form
This commit is contained in:
parent
6039e13411
commit
eef2093c88
3 changed files with 31 additions and 6 deletions
|
@ -98,6 +98,24 @@ export default class ConnectForm extends Component {
|
|||
`;
|
||||
}
|
||||
|
||||
var auth = null;
|
||||
if (this.props.auth !== "disabled") {
|
||||
auth = html`
|
||||
<label>
|
||||
Password:<br/>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
value=${this.state.password}
|
||||
disabled=${disabled}
|
||||
required=${this.props.auth === "mandatory"}
|
||||
placeholder=${this.props.auth !== "mandatory" ? "(optional)" : ""}
|
||||
/>
|
||||
</label>
|
||||
<br/><br/>
|
||||
`;
|
||||
}
|
||||
|
||||
return html`
|
||||
<form onChange=${this.handleChange} onSubmit=${this.handleSubmit}>
|
||||
<h2>Connect to IRC</h2>
|
||||
|
@ -108,11 +126,7 @@ export default class ConnectForm extends Component {
|
|||
</label>
|
||||
<br/><br/>
|
||||
|
||||
<label>
|
||||
Password:<br/>
|
||||
<input type="password" name="password" value=${this.state.password} disabled=${disabled}/>
|
||||
</label>
|
||||
<br/><br/>
|
||||
${auth}
|
||||
|
||||
<label>
|
||||
<input type="checkbox" name="rememberMe" checked=${this.state.rememberMe} disabled=${disabled}/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue