mixin labelprinter_settings(parishes, parishid, formats, formatid, last_field_is_postman, generate_detailed_postmeninfo)
	form(class="form-horizontal", role="form", id="form")
		.form-group
			label(for='combo_parish', class="col-sm-2 control-label") Pfarrei
			.col-sm-10
				select(id='combo_parish', class="form-control")
					- var id=0;
					- each parish in parishes
						option(value="#{id}") #{parish.name}
						- id++;
				script.
					$("#combo_parish").val("#{parishid}")	
						
		.form-group
			label(for='combo_format', class="col-sm-2 control-label") Format
			.col-sm-10
				select(id='combo_format', class="form-control")
					- var id=0;
					- each format in formats
						option(value="#{id}") #{format}
						- id++;
				script.
					$("#combo_format").val("#{formatid}")
		.form-group
			label(for='check_last_field_is_postman', class="col-sm-2 control-label") Letztes Feld ist Austräger
			.col-sm-5.checkbox
				label
					input(id='check_last_field_is_postman', type="checkbox", name="check_last_field_is_postman", checked=last_field_is_postman)

		.form-group
			label(for='check_generate_detailed_postmeninfo', class="col-sm-2 control-label", id="check_generate_detailed_postmeninfo_label") Ausführliche Austrägerliste erstellen (mit einzelnen Adressaten)
			.col-sm-5.checkbox
				label
					input(id='check_generate_detailed_postmeninfo', type="checkbox", name="check_generate_detailed_postmeninfo", checked=generate_detailed_postmeninfo)
						
		script.
			if($('#check_last_field_is_postman').prop('checked') === false)
			{
				$('#check_generate_detailed_postmeninfo').prop('disabled', true);
				$('#check_generate_detailed_postmeninfo_label').css('color','grey');
			}
			
			$("#check_last_field_is_postman").on('change', function(){
				var disable = ($(this).prop('checked') === false);
				$('#check_generate_detailed_postmeninfo').prop('disabled', disable);
				$('#check_generate_detailed_postmeninfo_label').css('color', (disable ? "grey" : "black"));
			});


mixin labelprinter_omitted_lines(omitted_lines)
	fieldset(style="margin-bottom: 20px;")
		legend(style="font-size: 120%; margin-bottom: 0px;") Übersprungene Zeilen
		div(style="margin-left: 10px; background-color: lightgrey;")
			p.
				!{omitted_lines}
