diff --git a/frontend/lib/screens/auth/am_register_step4_screen.dart b/frontend/lib/screens/auth/am_register_step4_screen.dart index 909ea88..6d97e45 100644 --- a/frontend/lib/screens/auth/am_register_step4_screen.dart +++ b/frontend/lib/screens/auth/am_register_step4_screen.dart @@ -7,7 +7,9 @@ import 'dart:math' as math; import '../../models/am_registration_data.dart'; import '../../models/card_assets.dart'; import '../../config/display_config.dart'; +import '../../widgets/hover_relief_widget.dart'; import '../../widgets/image_button.dart'; +import '../../widgets/custom_navigation_button.dart'; import '../../widgets/personal_info_form_screen.dart'; import '../../widgets/professional_info_form_screen.dart'; import '../../widgets/presentation_form_screen.dart'; @@ -60,18 +62,62 @@ class _AmRegisterStep4ScreenState extends State { _buildPresentation(context, registrationData), const SizedBox(height: 40), - ImageButton( - bg: 'assets/images/bg_green.png', - text: 'Soumettre ma demande', - textColor: const Color(0xFF2D6A4F), - width: config.isMobile ? 300 : 350, - height: 50, - fontSize: 18, - onPressed: () { - print("Données AM finales: ${registrationData.firstName} ${registrationData.lastName}"); - _showConfirmationModal(context); - }, - ), + // Boutons Mobile (Retour + Soumettre) ou Bouton Soumettre Desktop + if (config.isMobile) + Padding( + padding: EdgeInsets.symmetric(horizontal: screenSize.width * 0.05), + child: Row( + children: [ + Expanded( + child: HoverReliefWidget( + child: CustomNavigationButton( + text: 'Précédent', + style: NavigationButtonStyle.purple, + onPressed: () { + if (context.canPop()) { + context.pop(); + } else { + context.go('/am-register-step3'); + } + }, + width: double.infinity, + height: 50, + fontSize: 16, + ), + ), + ), + const SizedBox(width: 16), + Expanded( + child: HoverReliefWidget( + child: CustomNavigationButton( + text: 'Soumettre', + style: NavigationButtonStyle.green, + onPressed: () { + print("Données AM finales: ${registrationData.firstName} ${registrationData.lastName}"); + _showConfirmationModal(context); + }, + width: double.infinity, + height: 50, + fontSize: 16, + ), + ), + ), + ], + ), + ) + else + ImageButton( + bg: 'assets/images/bg_green.png', + text: 'Soumettre ma demande', + textColor: const Color(0xFF2D6A4F), + width: 350, + height: 50, + fontSize: 18, + onPressed: () { + print("Données AM finales: ${registrationData.firstName} ${registrationData.lastName}"); + _showConfirmationModal(context); + }, + ), ], ), ), diff --git a/frontend/lib/screens/auth/parent_register_step5_screen.dart b/frontend/lib/screens/auth/parent_register_step5_screen.dart index e198b84..71047e1 100644 --- a/frontend/lib/screens/auth/parent_register_step5_screen.dart +++ b/frontend/lib/screens/auth/parent_register_step5_screen.dart @@ -7,7 +7,9 @@ import 'dart:math' as math; import '../../models/user_registration_data.dart'; import '../../models/card_assets.dart'; import '../../config/display_config.dart'; +import '../../widgets/hover_relief_widget.dart'; import '../../widgets/image_button.dart'; +import '../../widgets/custom_navigation_button.dart'; import '../../widgets/personal_info_form_screen.dart'; import '../../widgets/child_card_widget.dart'; import '../../widgets/presentation_form_screen.dart'; @@ -72,18 +74,62 @@ class _ParentRegisterStep5ScreenState extends State { _buildMotivation(context, registrationData), const SizedBox(height: 40), - ImageButton( - bg: 'assets/images/bg_green.png', - text: 'Soumettre ma demande', - textColor: const Color(0xFF2D6A4F), - width: config.isMobile ? 300 : 350, - height: 50, - fontSize: 18, - onPressed: () { - print("Données finales: ${registrationData.parent1.firstName}, Enfant(s): ${registrationData.children.length}"); - _showConfirmationModal(context); - }, - ), + // Boutons Mobile (Retour + Soumettre) ou Bouton Soumettre Desktop + if (config.isMobile) + Padding( + padding: EdgeInsets.symmetric(horizontal: screenSize.width * 0.05), + child: Row( + children: [ + Expanded( + child: HoverReliefWidget( + child: CustomNavigationButton( + text: 'Précédent', + style: NavigationButtonStyle.purple, + onPressed: () { + if (context.canPop()) { + context.pop(); + } else { + context.go('/parent-register-step4'); + } + }, + width: double.infinity, + height: 50, + fontSize: 16, + ), + ), + ), + const SizedBox(width: 16), + Expanded( + child: HoverReliefWidget( + child: CustomNavigationButton( + text: 'Soumettre', + style: NavigationButtonStyle.green, + onPressed: () { + print("Données finales: ${registrationData.parent1.firstName}, Enfant(s): ${registrationData.children.length}"); + _showConfirmationModal(context); + }, + width: double.infinity, + height: 50, + fontSize: 16, + ), + ), + ), + ], + ), + ) + else + ImageButton( + bg: 'assets/images/bg_green.png', + text: 'Soumettre ma demande', + textColor: const Color(0xFF2D6A4F), + width: 350, + height: 50, + fontSize: 18, + onPressed: () { + print("Données finales: ${registrationData.parent1.firstName}, Enfant(s): ${registrationData.children.length}"); + _showConfirmationModal(context); + }, + ), ], ), ),