Преглед на файлове

Merge branch 'develop'

prodstable
Guillaume Bourgeois преди 1 година
родител
ревизия
b9090a4c16
променени са 4 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. +1
    -1
      common/models/SubscriptionForm.php
  2. +1
    -2
      producer/controllers/SubscriptionController.php
  3. +1
    -1
      producer/views/subscription/_form.php
  4. +2
    -1
      producer/web/js/vuejs/subscription-form.js

+ 1
- 1
common/models/SubscriptionForm.php Целия файл

@@ -149,7 +149,7 @@ class SubscriptionForm extends Model
$subscription->saturday = $this->saturday;
$subscription->sunday = $this->sunday;
$subscription->week_frequency = $this->week_frequency;
$subscription->auto_payment = $this->auto_payment;
$subscription->auto_payment = (int) $this->auto_payment;
$subscription->comment = $this->comment;

$subscription->save();

+ 1
- 2
producer/controllers/SubscriptionController.php Целия файл

@@ -104,8 +104,7 @@ class SubscriptionController extends ProducerBaseController
}
}

if ($model->load($posts) && $model->validate()
&& $model->save()) {
if ($model->load($posts) && $model->validate() && $model->save()) {
$subscription = Subscription::searchOne([
'id' => $model->id
]);

+ 1
- 1
producer/views/subscription/_form.php Целия файл

@@ -137,7 +137,7 @@ use common\models\PointSale ;
<?php if(Producer::getConfig('credit')): ?>
<div class="form-group field-subscriptionform-auto_payment">
<label><input type="checkbox" id="subscriptionform-auto_payment" name="SubscriptionForm[auto_payment]" v-model="autoPayment"> Paiement automatique</label>
<div class="hint-block">Cochez cette case si vous souhaitez que votre Crédit soit automatiquement débité.</div>
<div class="hint-block">Cochez cette case si vous souhaitez que votre Crédit soit automatiquement débité.</div>
<div class="help-block"></div>
</div>
<?php endif; ?>

+ 2
- 1
producer/web/js/vuejs/subscription-form.js Целия файл

@@ -190,6 +190,7 @@ var app = new Vue({
}
}

console.log(this.autoPayment);
axios.post('ajax-process', {
idSubscription: this.idSubscription,
SubscriptionForm: {
@@ -197,7 +198,7 @@ var app = new Vue({
date_begin: this.dateBegin ? this.formatDate(this.dateBegin) : '',
date_end: this.dateEnd ? this.formatDate(this.dateEnd) : '',
week_frequency: this.weekFrequency,
auto_payment: parseInt(this.autoPayment),
auto_payment: this.autoPayment ? 1 : 0,
monday: this.monday == true ? 1 : 0,
tuesday: this.tuesday == true ? 1 : 0,
wednesday: this.wednesday == true ? 1 : 0,

Loading…
Отказ
Запис