mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
573097c2a3
The final PR for the UI Refresh #38. - Complete UI issues caught during the Dec. 09 QA pass. - Update button and color styles, including hover and active states, to align with the mockups. - Update status labels in the hosts list and users list. The status label now includes a colored circle along with a text description. - Fixes #138.
56 lines
1.6 KiB
JavaScript
56 lines
1.6 KiB
JavaScript
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Form from 'components/forms/Form';
|
|
import formFieldInterface from 'interfaces/form_field';
|
|
import Button from 'components/buttons/Button';
|
|
import InputFieldWithIcon from 'components/forms/fields/InputFieldWithIcon';
|
|
import helpers from './helpers';
|
|
|
|
const formFields = ['name', 'username', 'password', 'password_confirmation'];
|
|
const { validate } = helpers;
|
|
|
|
class ConfirmSSOInviteForm extends Component {
|
|
static propTypes = {
|
|
baseError: PropTypes.string,
|
|
className: PropTypes.string,
|
|
fields: PropTypes.shape({
|
|
name: formFieldInterface.isRequired,
|
|
username: formFieldInterface.isRequired,
|
|
password: formFieldInterface.isRequired,
|
|
password_confirmation: formFieldInterface.isRequired,
|
|
}).isRequired,
|
|
handleSubmit: PropTypes.func.isRequired,
|
|
};
|
|
|
|
render () {
|
|
const { baseError, className, fields, handleSubmit } = this.props;
|
|
|
|
return (
|
|
<form className={className}>
|
|
{baseError && <div className="form__base-error">{baseError}</div>}
|
|
<div className="fields">
|
|
<InputFieldWithIcon
|
|
{...fields.name}
|
|
autofocus
|
|
placeholder="Full Name"
|
|
/>
|
|
<InputFieldWithIcon
|
|
{...fields.username}
|
|
iconName="username"
|
|
placeholder="Username"
|
|
/>
|
|
</div>
|
|
<Button onClick={handleSubmit} type="Submit" variant="brand">
|
|
Submit
|
|
</Button>
|
|
</form>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Form(ConfirmSSOInviteForm, {
|
|
fields: formFields,
|
|
validate,
|
|
});
|