| 
						
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -1,5 +1,6 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				use crate::locales::trl;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				use leptos::*;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				use crate::validator::Validator;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#[derive(Copy, Clone)]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				pub struct DialogOpener {
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -65,6 +66,8 @@ impl DialogOpener {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				pub fn ModalDialog(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    opener: DialogOpener,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    title: &'static str,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    #[prop(optional)]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    validator: Option<Validator>,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    children: Children,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				) -> impl IntoView {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    view! {
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -80,7 +83,12 @@ pub fn ModalDialog(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            class="btn-close"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            data-bs-dismiss="modal"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            aria-label="Close"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            on:click=move |_| opener.hide()/>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            on:click=move |_| {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                if let Some(v) = validator {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    v.reset();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                opener.hide();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            }/>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        </div>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        {children()}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    </div>
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |