mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Limit edition creation to between 1-100
This commit is contained in:
parent
1b4c6938f6
commit
75fe89a0ff
@ -19,7 +19,7 @@ let CreateEditionsForm = React.createClass({
|
|||||||
pieceId: React.PropTypes.number
|
pieceId: React.PropTypes.number
|
||||||
},
|
},
|
||||||
|
|
||||||
getFormData(){
|
getFormData() {
|
||||||
return {
|
return {
|
||||||
piece_id: parseInt(this.props.pieceId, 10)
|
piece_id: parseInt(this.props.pieceId, 10)
|
||||||
};
|
};
|
||||||
@ -58,7 +58,8 @@ let CreateEditionsForm = React.createClass({
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="(e.g. 32)"
|
placeholder="(e.g. 32)"
|
||||||
min={1}/>
|
min={1}
|
||||||
|
max={100} />
|
||||||
</Property>
|
</Property>
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
@ -65,7 +65,7 @@ let RegisterPiece = React.createClass( {
|
|||||||
this.setState(state);
|
this.setState(state);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSuccess(response){
|
handleSuccess(response) {
|
||||||
let notification = new GlobalNotificationModel(response.notification, 'success', 10000);
|
let notification = new GlobalNotificationModel(response.notification, 'success', 10000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
|
|
||||||
@ -94,7 +94,8 @@ let RegisterPiece = React.createClass( {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="(e.g. 32)"
|
placeholder="(e.g. 32)"
|
||||||
min={0}/>
|
min={1}
|
||||||
|
max={100} />
|
||||||
</Property>
|
</Property>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user