diff --git a/app/frontend/src/javascript/directives/cart.js b/app/frontend/src/javascript/directives/cart.js index 9e35c2f6e..6d492014b 100644 --- a/app/frontend/src/javascript/directives/cart.js +++ b/app/frontend/src/javascript/directives/cart.js @@ -724,11 +724,14 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs', }, coupon () { return $scope.coupon.applied; + }, + selectedPlan () { + return $scope.selectedPlan; } }, - controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'Auth', 'Reservation', 'wallet', 'helpers', '$filter', 'coupon', - function ($scope, $uibModalInstance, $state, reservation, price, Auth, Reservation, wallet, helpers, $filter, coupon) { - // user wallet amount + controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'Auth', 'Reservation', 'wallet', 'helpers', '$filter', 'coupon', 'selectedPlan', + function ($scope, $uibModalInstance, $state, reservation, price, Auth, Reservation, wallet, helpers, $filter, coupon, selectedPlan) { + // user wallet amount $scope.walletAmount = wallet.amount; // Global price (total of all items) @@ -740,6 +743,9 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs', // Reservation $scope.reservation = reservation; + // Subscription + $scope.plan = selectedPlan; + // Used in wallet info template to interpolate some translations $scope.numberFilter = $filter('number'); diff --git a/app/frontend/templates/plans/payment_modal.html b/app/frontend/templates/plans/payment_modal.html deleted file mode 100644 index 2592dd758..000000000 --- a/app/frontend/templates/plans/payment_modal.html +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/app/frontend/templates/shared/valid_reservation_modal.html b/app/frontend/templates/shared/valid_reservation_modal.html index bd9bd28bf..06a879fd3 100644 --- a/app/frontend/templates/shared/valid_reservation_modal.html +++ b/app/frontend/templates/shared/valid_reservation_modal.html @@ -1,18 +1,24 @@ - diff --git a/config/locales/app.public.en.yml b/config/locales/app.public.en.yml index 9be6cee90..33f11d874 100644 --- a/config/locales/app.public.en.yml +++ b/config/locales/app.public.en.yml @@ -254,8 +254,6 @@ en: the_user_s_group_was_successfully_changed: "The user's group was successfully changed." an_error_prevented_your_group_from_being_changed: "An error prevented your group from being changed." an_error_prevented_to_change_the_user_s_group: "An error prevented to change the user's group." - subscription_confirmation: "Subscription confirmation" - here_is_the_NAME_subscription_summary: "Here is the {NAME}'s subscription summary:" #Fablab's events list events_list: the_fablab_s_events: "The Fablab's events" diff --git a/config/locales/app.public.fr.yml b/config/locales/app.public.fr.yml index ec7297d12..9beea739c 100644 --- a/config/locales/app.public.fr.yml +++ b/config/locales/app.public.fr.yml @@ -254,8 +254,6 @@ fr: the_user_s_group_was_successfully_changed: "Le groupe de l'utilisateur a bien été changé." an_error_prevented_your_group_from_being_changed: "Une erreur a empêché votre changement de groupe." an_error_prevented_to_change_the_user_s_group: "Une erreur a empêché le changement de groupe de l'utilisateur." - subscription_confirmation: "Validation de l'abonnement" - here_is_the_NAME_subscription_summary: "Voici le récapitulatif de l'abonnement de {NAME} :" #Fablab's events list events_list: the_fablab_s_events: "Les événements du Fab Lab" diff --git a/config/locales/app.shared.en.yml b/config/locales/app.shared.en.yml index 3d59b4291..2fb66de0f 100644 --- a/config/locales/app.shared.en.yml +++ b/config/locales/app.shared.en.yml @@ -126,6 +126,8 @@ en: valid_reservation_modal: booking_confirmation: "Booking confirmation" here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Here is the summary of the slots to book for the current user:" + subscription_confirmation: "Subscription confirmation" + here_is_the_subscription_summary: "Here is the subscription summary:" #event edition form event: title: "Title" @@ -212,7 +214,7 @@ en: number_of_tickets: "Number of tickets" public_page: "Show in training lists" disable_training: "Disable the training" - #partial form to edit/create an user (admin view) + #partial form to edit/create a user (admin view) user_admin: user: "User" incomplete_profile: "Incomplete profile" @@ -265,12 +267,12 @@ en: do_you_want_to_change_NAME_s_booking_slot_initially_planned_at: "Do you want to change {NAME}'s booking slot, initially planned at:" cancel_this_reservation: "Cancel this reservation" i_want_to_change_date: "I want to change date" - #modal introducing that a training is requested before booking a machine + #modal telling users that they need to pass a training before booking a machine request_training_modal: to_book_the_MACHINE_you_must_have_completed_the_TRAINING: "To book the \"{MACHINE}\" you must have completed the {TRAINING}." register_for_the_training: "Enroll in the training" i_dont_want_to_register_now: "I don't want to enroll now" - #modal introducing that a user must wait for his training being validated before booking a machine + #modal telling users that they must wait for their training validation before booking a machine training_reservation_modal: machine_reservation: "Machine reservation" you_must_wait_for_your_training_is_being_validated_by_the_fablab_team_to_book_this_machine: "You must wait for your training is being validated by the FabLab team to book this machine." @@ -326,7 +328,7 @@ en: debit_reservation_machine: "Pay for a machine reservation" debit_reservation_event: "Pay for an event reservation" warning_uneditable_credit: "Warning: once validated, the credited amount won't be editable anymore." - #promotional coupon (creation/edition form) + #coupon (promotional) (creation/edition form) coupon: name: "Name" name_is_required: "Name is required." @@ -383,7 +385,7 @@ en: summary: "Summary" select_one_or_more_slots_in_the_calendar: "Select one {SINGLE, select, true{slot} other{or more slots}} in the calendar" you_ve_just_selected_the_slot: "You've just selected the slot:" - datetime_to_time: "{START_DATETIME} to {END_TIME}" #eg: Thursday, September 4 1986 8:30 PM to 10:00 PM + datetime_to_time: "{START_DATETIME} to {END_TIME}" #eg: Thursday, September 4, 1986 8:30 PM to 10:00 PM cost_of_TYPE: "Cost of the {TYPE, select, Machine{machine slot} Training{training} Space{space slot} other{element}}" offer_this_slot: "Offer this slot" confirm_this_slot: "Confirm this slot" @@ -411,7 +413,7 @@ en: tags_of_the_destination_slot: "Tags of the destination slot:" confirm_my_modification: "Confirm my modification" your_booking_slot_was_successfully_moved_from_: "Your booking slot was successfully moved from" - to_date: "to" #eg. from 01/01 to 01/05 + to_date: "to" #eg. from 01 to 05 january. please_select_a_member_first: "Please select a member first" unable_to_select_plan_if_slots_in_the_past: "Unable to select a plan if any of the selected slots is in the past" unable_to_change_the_reservation: "Unable to change the reservation" diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index f369d84ce..48d16f847 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -126,6 +126,8 @@ fr: valid_reservation_modal: booking_confirmation: "Validation réservation" here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :" + subscription_confirmation: "Validation de l'abonnement" + here_is_the_subscription_summary: "Voici le récapitulatif de l'abonnement :" #event edition form event: title: "Titre" @@ -212,7 +214,7 @@ fr: number_of_tickets: "Nombre de places" public_page: "Afficher dans la liste de formation" disable_training: "Désactiver la formation" - #partial form to edit/create an user (admin view) + #partial form to edit/create a user (admin view) user_admin: user: "Utilisateur" incomplete_profile: "Profil incomplet" @@ -265,12 +267,12 @@ fr: do_you_want_to_change_NAME_s_booking_slot_initially_planned_at: "Souhaitez-vous changer le créneau de réservation de {NAME}, initialement prévu au :" cancel_this_reservation: "Annuler cette réservation" i_want_to_change_date: "Je veux changer de date" - #modal introducing that a training is requested before booking a machine + #modal telling users that they need to pass a training before booking a machine request_training_modal: to_book_the_MACHINE_you_must_have_completed_the_TRAINING: "Pour réserver la machine \"{MACHINE}\" vous devez avoir suivi la {TRAINING}." register_for_the_training: "S'inscrire à la formation" i_dont_want_to_register_now: "Je ne souhaite pas m'inscrire pour l'instant" - #modal introducing that a user must wait for his training being validated before booking a machine + #modal telling users that they must wait for their training validation before booking a machine training_reservation_modal: machine_reservation: "Réservation machine" you_must_wait_for_your_training_is_being_validated_by_the_fablab_team_to_book_this_machine: "Il faut attendre que votre formation soit validée par l'équipe du Fab Lab pour réserver cette machine." @@ -326,7 +328,7 @@ fr: debit_reservation_machine: "Payer une réservation de machine" debit_reservation_event: "Payer une réservation d'événement" warning_uneditable_credit: "Attention : une fois validé, le montant crédité ne sera plus modifiable." - #promotional coupon (creation/edition form) + #coupon (promotional) (creation/edition form) coupon: name: "Nom" name_is_required: "Le nom est requis." @@ -383,7 +385,7 @@ fr: summary: "Résumé" select_one_or_more_slots_in_the_calendar: "Sélectionnez un {SINGLE, select, true{créneau} other{ou plusieurs créneaux}} dans le calendrier" you_ve_just_selected_the_slot: "Vous venez de sélectionner le créneau :" - datetime_to_time: "{START_DATETIME} à {END_TIME}" #eg: Thursday, September 4 1986 8:30 PM to 10:00 PM + datetime_to_time: "{START_DATETIME} à {END_TIME}" #eg: Thursday, September 4, 1986 8:30 PM to 10:00 PM cost_of_TYPE: "Coût {TYPE, select, Machine{du créneau machine} Training{de la formation} Space{du créneau espace} other{de l'élément}}" offer_this_slot: "Offrir ce créneau" confirm_this_slot: "Valider ce créneau" @@ -411,7 +413,7 @@ fr: tags_of_the_destination_slot: "Étiquettes du créneau de destination :" confirm_my_modification: "Valider ma modification" your_booking_slot_was_successfully_moved_from_: "Votre créneau de réservation a bien été déplacé du" - to_date: "au" #eg. from 01/01 to 01/05 + to_date: "au" #eg. from 01 to 05 january. please_select_a_member_first: "Veuillez tout d'abord sélectionner un membre" unable_to_select_plan_if_slots_in_the_past: "Impossible de sélectionner un abonnement si l'un des créneaux sélectionné est dans le passé" unable_to_change_the_reservation: "Impossible de modifier la réservation"