payments
This commit is contained in:
@@ -7,6 +7,7 @@ var React = require('react'),
|
||||
Globals = require('../../globals'),
|
||||
CartTotal = require('./cartTotal'),
|
||||
LinkBanner = require('../linkBanner/linkBanner'),
|
||||
PaymentSelect = require('../payment/paymentSelect'),
|
||||
RibicaFormError = require('../shared/ribicaFormError');
|
||||
|
||||
|
||||
@@ -17,6 +18,13 @@ var CheckoutPage = React.createClass({
|
||||
|
||||
render: function() {
|
||||
|
||||
var choosePayment = (
|
||||
<div>
|
||||
Plaćanje: <br />
|
||||
<PaymentSelect />
|
||||
</div>
|
||||
);
|
||||
|
||||
var supportedPlaceOptions = CartStore.getSupportedPlaces().map ( function (p) { return (<option value={p.code}>{p.placeLabel}</option>)});
|
||||
|
||||
var content = (
|
||||
@@ -87,11 +95,18 @@ var CheckoutPage = React.createClass({
|
||||
Ukupno: <CartTotal items={this.state.items} itemCounts={this.state.itemCounts} deliveryCosts={this.state.deliveryCosts} />
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
{choosePayment}
|
||||
</div>
|
||||
<div><button id="order" name="order" className="mybutton" disabled={!this.state.isDeliveryDestinationValid} onClick={this._onOrderClick}>Završi narudžbu</button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -118,7 +133,8 @@ var CheckoutPage = React.createClass({
|
||||
<div> </div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{choosePayment}
|
||||
</div>);
|
||||
}
|
||||
|
||||
|
||||
26
front-ui/app/components/payment/paymentSelect.js
Normal file
26
front-ui/app/components/payment/paymentSelect.js
Normal file
@@ -0,0 +1,26 @@
|
||||
var React = require('react');
|
||||
var ItemActions = require('../../actions/itemActions');
|
||||
var NavigationActions = require('../../actions/navigationActions');
|
||||
var NavigationStore = require('../../stores/navigationStore');
|
||||
|
||||
var Globals = require('../../globals');
|
||||
var Router = require('react-router');
|
||||
|
||||
var PaymentSelect = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<div className="payment_select">
|
||||
<input name="payment_method" type="radio" value="credit_card" defaultChecked="checked" className="js-payment-method radio-input" id="pay-by-cod" />
|
||||
<label for="pay-by-credit-card" className="radio-label">
|
||||
Gotovinom (prilikom preuzimanja robe)
|
||||
</label>
|
||||
<input name="payment_method" type="radio" value="paypal" className="js-payment-method radio-input" id="pay-by-credit-card" />
|
||||
<label for="pay-with-paypal" className="radio-label">
|
||||
Kreditnom / debitnom karticom
|
||||
</label>
|
||||
</div>);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = PaymentSelect;
|
||||
Reference in New Issue
Block a user