yrexpert-js
Version:
L'interface Web pour votre système expert...
91 lines (75 loc) • 2.57 kB
JavaScript
/*
!----------------------------------------------------------------------------!
! !
! Yexpert : (your) Système Expert sous Mumps GT.M et GNU/Linux !
! Copyright (C) 2001-2015 by Hamid LOUAKED (HL). !
! !
!----------------------------------------------------------------------------!
*/
var React = require('react')
var createReactClass = require('create-react-class')
var ReactBootstrap = require('react-bootstrap')
var {
FormGroup,
ControlLabel,
FormControl,
HelpBlock
} = ReactBootstrap
var LoginRpcField = createReactClass({
getInitialState: function () {
return {
value: '',
valueAc: '',
valueVc: ''
}
},
componentWillMount: function () {
this.controller = require('./controller-LoginRpcField')(this.props.controller, this)
},
render: function () {
// console.log('LoginRpcField rendering');
// this.controller.updateComponentPath(this);
return (
<div>
<form>
<FormGroup
controlId='formAc'
>
<ControlLabel>{this.props.labelAc}</ControlLabel>
<FormControl
type='text'
autoFocus={this.props.focusAc}
value={this.state.valueAc}
placeholder={this.props.placeholderAc}
bsStyle='primary'
ref={this.props.fieldnameAc}
onChange={this.handleChangeAc}
/>
<FormControl.Feedback />
<HelpBlock />
</FormGroup>
<FormGroup
controlId='formVc'
>
<ControlLabel>{this.props.labelVc}</ControlLabel>
<FormControl
type='password'
autoFocus={this.props.focusVc}
value={this.state.valueVc}
placeholder={this.props.placeholderVc}
bsStyle='primary'
ref={this.props.fieldnameVc}
onChange={this.handleChangeVc}
/>
<FormControl.Feedback />
<HelpBlock />
</FormGroup>
</form>
</div>
)
}
})
module.exports = LoginRpcField
// Votre code d'accès est habituellement la première lettre du prénom suivi de votre nom.
// Votre code de vérification est celui que vous avez vous-même choisi.