Commit 023d7011 by Damien Moulard

Merge branch 'dev' into master

parents 711202e6 6620571f
......@@ -39,3 +39,12 @@ yarn-error.log
###> payum ###
/transactions/
###< payum ###
###> ui customization ###
/public/images/logo.png
/public/images/favicon/
###< ui customization ###
###>bin ###
/bin/composer
###< bin ###
......@@ -23,4 +23,12 @@ label.required:after {
}
.leaflet-container {
z-index: 4;
}
\ No newline at end of file
}
.kohinos-montant-radio .form-check {
margin: 10px;
}
.kohinos-montant-radio label {
margin-left: 5px;
}
......@@ -3,8 +3,8 @@
*
* @import "~bootswatch/dist/[theme]/variables";
* @import "~bootswatch/dist/[theme]/bootswatch";
*
* Remplacer [theme] par un des thèmes possibles :
*
* Remplacer [theme] par un des thèmes possibles :
* cerulean, cosmo, cyborg, darkly, flatly, journal, litera, lumen, lux, materia, minty, pulse, sandstone, simplex, sketchy, slate, solar, spacelab, superhero, united, yeti
*/
@import "~bootswatch/dist/lumen/variables";
......@@ -19,4 +19,3 @@
// Modifier les couleurs de l'application :
// $primary: darken(#428bca, 20%);
// $secondary: darken(#428bca, 20%);
......@@ -13,6 +13,35 @@ require('../js/geoloc.js');
$('#flash-messages').flashNotification('init');
$(document).ready(function() {
/*
* On user edit page, on the rolesgroup checkbox:
* - display 'group' select if "Gestionnaire de groupe" is checked
* - display 'comptoir' select if "Comptoir" is checked
*/
function possiblegroups_display_selects(e) {
var label = $(this).closest('li').find('.control-label__text')[0].textContent.trim().toLowerCase()
var isChecked = $(this).closest('li').find('.checked').length > 0
if (label.includes('comptoir')) {
if (isChecked) {
$('.comptoirsgeres_select').removeClass('hide')
} else {
$('.comptoirsgeres_select').addClass('hide')
}
} else if (label.includes('groupe')) {
if (isChecked) {
$('.groupesgeres_select').removeClass('hide')
} else {
$('.groupesgeres_select').addClass('hide')
}
}
}
$('.possible_group_cblist li .checkbox label').on('click', possiblegroups_display_selects);
$('.possible_group_cblist li .checkbox label ins').on('click', possiblegroups_display_selects);
$('.editableboolean').on('click', function (e) {
e.preventDefault();
var self = $(this);
......@@ -39,4 +68,4 @@ $(document).ready(function() {
}
});
});
});
\ No newline at end of file
});
......@@ -7,7 +7,7 @@
// any CSS you require will output into a single css file (app.css in this case)
// UTILISER LES FONT AWESOME POUR L'ICONOGRAPHIE
// UTILISER LES FONT AWESOME POUR L'ICONOGRAPHIE
require('../../public/fontawesome/css/all.min.css');
// CSS DU KOHINOS
require('../css/app.css');
......@@ -26,6 +26,10 @@ global.$ = global.jQuery = $;
// require('popper.js/dist/popper.js');
require('bootstrap');
// BOOTSTRAP plugins
require('bootstrap-slider')
require('bootstrap-slider/dist/css/bootstrap-slider.min.css')
// leaftlet : for openstreetmap
require('../leaflet/leaflet.js');
// for flash message notification
......@@ -64,6 +68,30 @@ function addGroupeForm($collectionHolder, $newLinkLi) {
$newLinkLi.before($newFormLi);
}
function showConfirmTransactionModal(div, form, montant, destinataire = null) {
// Get modal
var modal = $('#confirmTransactionModal')
// Get relevant confirmation message div
var message = modal.find(div)
// Set data in modal
message.find('.montant_transaction').text(montant)
if (destinataire != null) {
message.find('.nom_destinataire').text(destinataire)
}
// Show modal and relevant confirmation message
modal.find(div).show()
modal.modal('show')
// Bind modal validation button with form submition
$('#confirmTransactionModal #confirmTransactionButton').off()
$('#confirmTransactionModal #confirmTransactionButton').on('click', function(e){
form.submit()
});
}
jQuery(document).ready(function() {
// Get the ul that holds the collection of groupes
$collectionHolder = $('.groupeprestas');
......@@ -82,4 +110,78 @@ jQuery(document).ready(function() {
// BOOTSTRAP TOOLTIPS
$('[data-toggle="tooltip"]').tooltip()
$("input:radio[name='formAchatMonnaieAdherent[montantradio]']").change(function() {
var mySlider = $("input.achatmonnaie-montant-slider").slider();
// Set slider value like radio when radio changes
mySlider.slider('setValue', this.value)
$("span.achat_monnaie_montant_choisi").text(this.value + ' €')
});
$('input.achatmonnaie-montant-slider').slider().on('change', function(event){
var value = event.value.newValue;
$("span.achat_monnaie_montant_choisi").text(value + ' €')
});
$('.transactionSubmit').on('click', function(e){
// Stop form submition
e.preventDefault();
var form = this.closest('form')
if (form.checkValidity()) {
// Get destinataire type : presta or adherent
var destinataire_type = $('#' + form.name + '_destinataireType')[0].value
if (destinataire_type == 'prestataire') {
var div = '.confirmTransactionPrestataire'
} else {
var div = '.confirmTransactionAdherent'
}
// Get destinataire
var destinataire_select = $('#' + form.name + '_destinataire')[0]
var destinataire_name = destinataire_select.options[destinataire_select.selectedIndex].text
// Get montant
var montant_field = $('#' + form.name + '_montant')[0]
var montant_value = montant_field.value
showConfirmTransactionModal(div, form, montant_value, destinataire_name)
} else {
// Use symfony validation
form.submit()
}
});
$('.cotisationMLCSubmit').on('click', function(e){
// Stop form submition
e.preventDefault();
var form = this.closest('form')
// Set form moyen
$('#' + form.name + '_moyen')[0].value = 'mlc'
if (form.checkValidity()) {
var div = '.confirmCotisation'
// Get montant
var montant_field = $('#' + form.name + '_montant')[0]
var montant_value = montant_field.value
showConfirmTransactionModal(div, form, montant_value)
} else {
// Use symfony validation
form.submit()
}
});
$('.cotisationCBSubmit').on('click', function(e){
var form = this.closest('form')
// Set form moyen
$('#' + form.name + '_moyen')[0].value = 'cb'
});
});
......@@ -8,6 +8,11 @@
"name": "Julien Jorry",
"email": "julien.jorry@gmail.com",
"homepage": "https://www.malt.fr/profile/julienjorry"
},
{
"name": "Damien Moulard",
"email": "dam.moulard@gmail.com",
"homepage": "https://www.malt.fr/profile/damienmoulard"
}
],
"require": {
......@@ -74,7 +79,8 @@
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"vich/uploader-bundle": "^1.8",
"willdurand/geocoder-bundle": "^5.0"
"willdurand/geocoder-bundle": "^5.0",
"shivas/versioning-bundle": "*"
},
"require-dev": {
"symfony/browser-kit": "4.4.*",
......
......@@ -50,4 +50,5 @@ return [
Sonata\ClassificationBundle\SonataClassificationBundle::class => ['all' => true],
App\Application\Sonata\ClassificationBundle\ApplicationSonataClassificationBundle::class => ['all' => true],
Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true],
Shivas\VersioningBundle\ShivasVersioningBundle::class => ['all' => true],
];
# See https://symfony.com/doc/current/email/dev_environment.html
swiftmailer:
# send all emails to a specific address
delivery_addresses: ['julien.jorry@gmail.com']
delivery_addresses: ['dam.moulard@gmail.com']
......@@ -42,6 +42,6 @@ monolog:
swift_critical:
type: swift_mailer
from_email: noreply@kohinos.fr
to_email: [julien.jorry@gmail.com, stephan@gelberger.com]
to_email: [dam.moulard@gmail.com]
subject: "MLC : PHP Error !"
level: info
......@@ -480,3 +480,7 @@ services:
decorates: 'api_platform.swagger.normalizer.api_gateway'
arguments: [ '@App\Swagger\SwaggerDecorator.inner' ]
autoconfigure: false
App\Serializer\ApiNormalizer:
decorates: 'api_platform.serializer.normalizer.item'
arguments: [ '@App\Serializer\ApiNormalizer.inner' ]
......@@ -587,6 +587,10 @@ App\Entity\Rubrique:
media: '@media17'
App\Entity\GlobalParameter:
gp15:
name: "APP_TITLE"
value: 'Kohinos'
mandatory: 1
gp11:
name: "COTISATION_ADHERENT"
value: '10'
......@@ -818,7 +822,7 @@ App\Entity\CotisationPrestataire:
App\Entity\User:
usersuperadmin:
username: 'adminuser'
email: 'julien.jorry@gmail.com'
email: 'dam.moulard@gmail.com'
plainPassword: 'test'
enabled: true
possiblegroups: ['@usergroup_superadmin', '@usergroup_prestataire']
......
......@@ -15,6 +15,7 @@
},
"dependencies": {
"bootstrap": "^4.4.1",
"bootstrap-slider": "^11.0.2",
"bootswatch": "^4.3.1",
"ckeditor": "^4.0.0",
"jquery": "^3.3.1",
......
......@@ -9,4 +9,6 @@
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
</IfModule>
</IfModule>
\ No newline at end of file
</IfModule>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE "application/atom+xml" "application/javascript" "application/json" "application/ld+json" "application/manifest+json" "application/rdf+xml" "application/rss+xml" "application/schema+json" "application/vnd.geo+json" "application/vnd.ms-fontobject" "application/x-font-ttf" "application/x-javascript" "application/x-web-app-manifest+json" "application/xhtml+xml" "application/xml" "font/eot" "font/opentype" "image/bmp" "image/svg+xml" "image/vnd.microsoft.icon" "image/x-icon" "text/cache-manifest" "text/css" "text/html" "text/javascript" "text/plain" "text/vcard" "text/vnd.rim.location.xloc" "text/vtt" "text/x-component" "text/x-cross-domain-policy" "text/xml"
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
</IfModule>
</IfModule>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,19 +3,19 @@
"app": {
"js": [
"/build/runtime.420770e4.js",
"/build/app.a6090119.js"
"/build/app.a1cf5950.js"
],
"css": [
"/build/app.b1a10d11.css"
"/build/app.0ecb0d81.css"
]
},
"admin": {
"js": [
"/build/runtime.420770e4.js",
"/build/admin.da628ab6.js"
"/build/admin.3024c297.js"
],
"css": [
"/build/admin.b8c3eca8.css"
"/build/admin.4d653142.css"
]
}
}
......
{
"build/admin.css": "/build/admin.b8c3eca8.css",
"build/admin.js": "/build/admin.da628ab6.js",
"build/app.css": "/build/app.b1a10d11.css",
"build/app.js": "/build/app.a6090119.js",
"build/admin.css": "/build/admin.4d653142.css",
"build/admin.js": "/build/admin.3024c297.js",
"build/app.css": "/build/app.0ecb0d81.css",
"build/app.js": "/build/app.a1cf5950.js",
"build/runtime.js": "/build/runtime.420770e4.js",
"build/ckeditor/adapters/jquery.js": "/build/ckeditor/adapters/jquery.js",
"build/ckeditor/ckeditor.js": "/build/ckeditor/ckeditor.js",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment