mirror of
				https://gitlab.crans.org/mediatek/med.git
				synced 2025-11-04 15:22:27 +01:00 
			
		
		
		
	Fix isbn widget
This commit is contained in:
		
							
								
								
									
										2
									
								
								TODO
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								TODO
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
régler pq de permission sur app sporz : permettre d'afficher seulement nos gamesave à tout le monde
 | 
			
		||||
 | 
			
		||||
@@ -19,8 +19,10 @@ class EmpruntForm(ModelForm):
 | 
			
		||||
class MediaAdminForm(ModelForm):
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
        self.fields['isbn'].widget.template_name = "media/isbn_button.html"
 | 
			
		||||
        self.fields['isbn'].widget.attrs.update({'autofocus': 'autofocus'})
 | 
			
		||||
        isbn_field = self.fields.get('isbn')
 | 
			
		||||
        if isbn_field:
 | 
			
		||||
            isbn_field.widget.template_name = "media/isbn_button.html"
 | 
			
		||||
            isbn_field.widget.attrs.update({'autofocus': 'autofocus'})
 | 
			
		||||
 | 
			
		||||
    def download_data(self, isbn):
 | 
			
		||||
        """
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user