1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Limit edition creation to between 1-100

This commit is contained in:
Brett Sun 2015-12-16 14:48:43 +01:00
parent 1b4c6938f6
commit 75fe89a0ff
2 changed files with 7 additions and 5 deletions

View File

@ -19,7 +19,7 @@ let CreateEditionsForm = React.createClass({
pieceId: React.PropTypes.number
},
getFormData(){
getFormData() {
return {
piece_id: parseInt(this.props.pieceId, 10)
};
@ -58,11 +58,12 @@ let CreateEditionsForm = React.createClass({
<input
type="number"
placeholder="(e.g. 32)"
min={1}/>
min={1}
max={100} />
</Property>
</Form>
);
}
});
export default CreateEditionsForm;
export default CreateEditionsForm;

View File

@ -65,7 +65,7 @@ let RegisterPiece = React.createClass( {
this.setState(state);
},
handleSuccess(response){
handleSuccess(response) {
let notification = new GlobalNotificationModel(response.notification, 'success', 10000);
GlobalNotificationActions.appendGlobalNotification(notification);
@ -94,7 +94,8 @@ let RegisterPiece = React.createClass( {
<input
type="number"
placeholder="(e.g. 32)"
min={0}/>
min={1}
max={100} />
</Property>
);
}