Browse Source

Stripe : montant minimum + correctif formulaire abonnements

refactoring
Guillaume 3 years ago
parent
commit
1305000013
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      backend/web/js/vuejs/subscription-form.js
  2. +1
    -1
      producer/models/CreditForm.php
  3. +1
    -1
      producer/views/credit/add.php

+ 1
- 1
backend/web/js/vuejs/subscription-form.js View File

}) ; }) ;
}, },
changeQuantityProductSubscription: function(increase, product) { changeQuantityProductSubscription: function(increase, product) {
var step = step ? parseFloat(product.step) : 1 ;
var step = product.step ? parseFloat(product.step) : 1 ;
if(!product.quantity) product.quantity = 0 ; if(!product.quantity) product.quantity = 0 ;
var quantity = parseFloat(product.quantity) ; var quantity = parseFloat(product.quantity) ;
if(!increase) { if(!increase) {

+ 1
- 1
producer/models/CreditForm.php View File

{ {
return [ return [
[['amount'], 'required'], [['amount'], 'required'],
[['amount'], 'double', 'min' => 15],
[['amount'], 'double', 'min' => 25],
]; ];
} }



+ 1
- 1
producer/views/credit/add.php View File

'template' => '{label}<div class="input-group input-group-lg">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}', 'template' => '{label}<div class="input-group input-group-lg">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}',
]) ])
->label('Quel montant souhaitez-vous créditer ?') ->label('Quel montant souhaitez-vous créditer ?')
->hint('Montant minimum : 15 €'); ?>
->hint('Montant minimum : 25 €'); ?>


<div class="form-group"> <div class="form-group">
<?= Html::submitButton('<span class="glyphicon glyphicon-lock"></span> Payer', ['class' => 'btn btn-primary'] <?= Html::submitButton('<span class="glyphicon glyphicon-lock"></span> Payer', ['class' => 'btn btn-primary']

Loading…
Cancel
Save