Last step
- improved watch command (much simpler robofile + truly recursive) - split all form fields into separate files (JSX) - improved form to allow multiple fields per row - added selection react class for multi select using select2 - added missing files for select2 (webpack doesn't include them)
This commit is contained in:
24
assets/js/src/form/fields/text.jsx
Normal file
24
assets/js/src/form/fields/text.jsx
Normal file
@@ -0,0 +1,24 @@
|
||||
define([
|
||||
'react'
|
||||
],
|
||||
function(
|
||||
React
|
||||
) {
|
||||
var FormFieldText = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<input
|
||||
type="text"
|
||||
className={ (this.props.field.size) ? '' : 'regular-text' }
|
||||
size={ (this.props.field.size !== 'auto') ? this.props.field.size : false }
|
||||
name={ this.props.field.name }
|
||||
id={ 'field_'+this.props.field.name }
|
||||
value={ this.props.item[this.props.field.name] }
|
||||
placeholder={ this.props.field.placeholder }
|
||||
onChange={ this.props.onValueChange } />
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return FormFieldText;
|
||||
});
|
Reference in New Issue
Block a user