Last used btn
This commit is contained in:
@@ -10,6 +10,7 @@ var React = require('react'),
|
||||
PaymentSelect = require('../payment/paymentSelect'),
|
||||
RibicaFormError = require('../shared/ribicaFormError'),
|
||||
PaypalButton = require('../payment/paypalButton'),
|
||||
PikpayButton = require('../payment/pikpayButton'),
|
||||
CashOnDeliveryButton = require('../payment/cashOnDeliveryButton');
|
||||
|
||||
var Router = require('react-router');
|
||||
@@ -34,10 +35,10 @@ var CheckoutPage = React.createClass({
|
||||
<PaypalButton disabled={!this.state.isDeliveryDestinationValid} onSubmitPaypal={this._handleOnSubmitPaypal} deliveryDestination={this.state.deliveryDestination} amount={CartStore.getAmount()} deliveryCost={CartStore.getDeliveryCost(false)} />
|
||||
);
|
||||
} else if(this.state.deliveryDestination.get('payment_method') == 'pikpay') {
|
||||
|
||||
<PikpaylButton amount={CartStore.getAmount()} deliveryCost={CartStore.getDeliveryCost(false)} disabled={!this.state.isDeliveryDestinationValid} deliveryDestination={this.state.deliveryDestination}/>
|
||||
} else {
|
||||
last_used_payment = (
|
||||
<CashOnDeliveryButton onCashClick={this._onOrderClick} disabled={!this.state.isDeliveryDestinationValid}/>
|
||||
<CashOnDeliveryButton onCashClick={this._onOrderClick} disabled={!this.state.isDeliveryDestinationValid}/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ var CheckoutPage = React.createClass({
|
||||
Ukupno: <CartTotal items={this.state.items} itemCounts={this.state.itemCounts} deliveryCosts={this.state.deliveryCosts} />
|
||||
|
||||
</p>
|
||||
<p>{last_used_payment} ili <button className="btn btn-default" onClick={this._onUncolapseClick}>Promijeni adresu</button>
|
||||
<p className="collapsed_address_container">{last_used_payment} ili <button className="btn btn-default" onClick={this._onUncolapseClick}>Promijeni adresu</button>
|
||||
</p>
|
||||
<div className="form-group">
|
||||
<label className="col-md-4 control-label" htmlFor="order"></label>
|
||||
@@ -176,6 +177,7 @@ var CheckoutPage = React.createClass({
|
||||
},
|
||||
|
||||
_onOrderClick: function (event) {
|
||||
CartActions.changeDeliveryDestinationProperty("payment_method", "cash_on_delivery");
|
||||
CartActions.confirmDelivery();
|
||||
},
|
||||
|
||||
|
||||
@@ -14,3 +14,7 @@
|
||||
.payment-select-mobile .payment-btn {
|
||||
margin-bottom: 6px !important;
|
||||
}
|
||||
|
||||
.collapsed_address_container .mybutton {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user