mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	better job form handling
This commit is contained in:
		@@ -72,11 +72,9 @@ class CreateTesseractOCRPipelineJobForm(CreateJobBaseForm):
 | 
			
		||||
        self.ocropus_nlbin_threshold.render_kw['disabled'] = True
 | 
			
		||||
        if 'methods' in service_info:
 | 
			
		||||
            if 'binarization' in service_info['methods']:
 | 
			
		||||
                if 'disabled' in self.binarization.render_kw:
 | 
			
		||||
                    del self.binarization.render_kw['disabled']
 | 
			
		||||
                del self.binarization.render_kw['disabled']
 | 
			
		||||
            if 'ocropus_nlbin_threshold' in service_info['methods']:
 | 
			
		||||
                if 'disabled' in self.ocropus_nlbin_threshold.render_kw:
 | 
			
		||||
                    del self.ocropus_nlbin_threshold.render_kw['disabled']
 | 
			
		||||
                del self.ocropus_nlbin_threshold.render_kw['disabled']
 | 
			
		||||
        models = [
 | 
			
		||||
            x for x in TesseractOCRPipelineModel.query.order_by(TesseractOCRPipelineModel.title).all()
 | 
			
		||||
            if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
 | 
			
		||||
@@ -118,8 +116,7 @@ class CreateTranskribusHTRPipelineJobForm(CreateJobBaseForm):
 | 
			
		||||
        self.binarization.render_kw['disabled'] = True
 | 
			
		||||
        if 'methods' in service_info:
 | 
			
		||||
            if 'binarization' in service_info['methods']:
 | 
			
		||||
                if 'disabled' in self.binarization.render_kw:
 | 
			
		||||
                    del self.binarization.render_kw['disabled']
 | 
			
		||||
                del self.binarization.render_kw['disabled']
 | 
			
		||||
        self.model.choices = [('', 'Choose your option')]
 | 
			
		||||
        self.model.choices += [(x['modelId'], x['name']) for x in transkribus_htr_pipeline_models]
 | 
			
		||||
        self.model.default = ''
 | 
			
		||||
@@ -157,8 +154,7 @@ class CreateSpacyNLPPipelineJobForm(CreateJobBaseForm):
 | 
			
		||||
        self.encoding_detection.render_kw['disabled'] = True
 | 
			
		||||
        if 'methods' in service_info:
 | 
			
		||||
            if 'encoding_detection' in service_info['methods']:
 | 
			
		||||
                if 'disabled' in self.encoding_detection.render_kw:
 | 
			
		||||
                    del self.encoding_detection.render_kw['disabled']
 | 
			
		||||
                del self.encoding_detection.render_kw['disabled']
 | 
			
		||||
        models = [
 | 
			
		||||
            x for x in SpaCyNLPPipelineModel.query.order_by(SpaCyNLPPipelineModel.title).all()
 | 
			
		||||
            if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user