mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Add type password
This commit is contained in:
parent
703223687f
commit
362f7badb0
@ -250,7 +250,7 @@ class Input extends React.Component { // eslint-disable-line react/prefer-statel
|
||||
<input
|
||||
className={`form-control ${!this.props.deactivateErrorHighlight && !isEmpty(this.state.errors) ? 'is-invalid': ''}`}
|
||||
onChange={this.props.onChange}
|
||||
value={this.props.value}
|
||||
value={type === 'password' ? '********' : this.props.value}
|
||||
name={this.props.name}
|
||||
id={this.props.label}
|
||||
onBlur={handleBlur}
|
||||
|
||||
@ -14,6 +14,7 @@ module.exports = mongoose => {
|
||||
convertType: mongooseType => {
|
||||
switch (mongooseType.toLowerCase()) {
|
||||
case 'string':
|
||||
case 'password':
|
||||
case 'text':
|
||||
return 'String';
|
||||
case 'integer':
|
||||
|
||||
@ -25,6 +25,8 @@ class EditForm extends React.Component {
|
||||
|
||||
getInputType = (type = '') => {
|
||||
switch (type.toLowerCase()) {
|
||||
case 'password':
|
||||
return 'password';
|
||||
case 'boolean':
|
||||
return 'checkbox';
|
||||
case 'text':
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"type": "password",
|
||||
"minLength": 6
|
||||
},
|
||||
"resetPasswordToken": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user