add length limits to all items
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		| @@ -39,6 +39,7 @@ | ||||
|     <%= textarea(f, :notes, | ||||
|       id: "add-shot-group-form-notes", | ||||
|       class: "input input-primary col-span-2", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Really great weather"), | ||||
|       phx_hook: "MaintainAttrs", | ||||
|       phx_update: "ignore" | ||||
|   | ||||
| @@ -19,7 +19,10 @@ | ||||
|     </div> | ||||
|  | ||||
|     <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :name, class: "text-center col-span-2 input input-primary") %> | ||||
|     <%= text_input(f, :name, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= error_tag(f, :name, "col-span-3 text-center") %> | ||||
|  | ||||
|     <%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %> | ||||
| @@ -40,6 +43,7 @@ | ||||
|     <%= label(f, :bullet_type, gettext("Bullet type"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :bullet_type, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("FMJ") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :bullet_type, "col-span-3 text-center") %> | ||||
| @@ -47,6 +51,7 @@ | ||||
|     <%= label(f, :bullet_core, gettext("Bullet core"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :bullet_core, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Steel") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :bullet_core, "col-span-3 text-center") %> | ||||
| @@ -54,6 +59,7 @@ | ||||
|     <%= label(f, :cartridge, gettext("Cartridge"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :cartridge, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("5.56x46mm NATO") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :cartridge, "col-span-3 text-center") %> | ||||
| @@ -61,6 +67,7 @@ | ||||
|     <%= label(f, :caliber, gettext("Caliber"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :caliber, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext(".223") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :caliber, "col-span-3 text-center") %> | ||||
| @@ -68,6 +75,7 @@ | ||||
|     <%= label(f, :case_material, gettext("Case material"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :case_material, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Brass") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :case_material, "col-span-3 text-center") %> | ||||
| @@ -75,6 +83,7 @@ | ||||
|     <%= label(f, :jacket_type, gettext("Jacket type"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :jacket_type, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Bimetal") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :case_material, "col-span-3 text-center") %> | ||||
| @@ -90,7 +99,10 @@ | ||||
|     <%= error_tag(f, :muzzle_velocity, "col-span-3 text-center") %> | ||||
|  | ||||
|     <%= label(f, :powder_type, gettext("Powder type"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :powder_type, class: "text-center col-span-2 input input-primary") %> | ||||
|     <%= text_input(f, :powder_type, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= error_tag(f, :powder_type, "col-span-3 text-center") %> | ||||
|  | ||||
|     <%= label(f, :powder_grains_per_charge, gettext("Powder grains per charge"), | ||||
| @@ -114,6 +126,7 @@ | ||||
|     <%= label(f, :pressure, gettext("Pressure"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :pressure, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("+P") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :pressure, "col-span-3 text-center") %> | ||||
| @@ -121,6 +134,7 @@ | ||||
|     <%= label(f, :primer_type, gettext("Primer type"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :primer_type, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Boxer") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :primer_type, "col-span-3 text-center") %> | ||||
| @@ -128,6 +142,7 @@ | ||||
|     <%= label(f, :firing_type, gettext("Firing type"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :firing_type, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Centerfire") | ||||
|     ) %> | ||||
|     <%= error_tag(f, :firing_type, "col-span-3 text-center") %> | ||||
| @@ -149,11 +164,17 @@ | ||||
|     <%= error_tag(f, :corrosive, "col-span-3 text-center") %> | ||||
|  | ||||
|     <%= label(f, :manufacturer, gettext("Manufacturer"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :manufacturer, class: "text-center col-span-2 input input-primary") %> | ||||
|     <%= text_input(f, :manufacturer, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= error_tag(f, :manufacturer, "col-span-3 text-center") %> | ||||
|  | ||||
|     <%= label(f, :upc, gettext("UPC"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :upc, class: "text-center col-span-2 input input-primary") %> | ||||
|     <%= text_input(f, :upc, | ||||
|       class: "text-center col-span-2 input input-primary", | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= error_tag(f, :upc, "col-span-3 text-center") %> | ||||
|  | ||||
|     <%= submit(dgettext("actions", "Save"), | ||||
|   | ||||
| @@ -21,7 +21,8 @@ | ||||
|     <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :name, | ||||
|       class: "input input-primary col-span-2", | ||||
|       placeholder: gettext("My cool ammo can") | ||||
|       placeholder: gettext("My cool ammo can"), | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= error_tag(f, :name, "col-span-3 text-center") %> | ||||
|  | ||||
| @@ -38,7 +39,8 @@ | ||||
|     <%= label(f, :type, gettext("Type"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :type, | ||||
|       class: "input input-primary col-span-2", | ||||
|       placeholder: gettext("Magazine, Clip, Ammo Box, etc") | ||||
|       placeholder: gettext("Magazine, Clip, Ammo Box, etc"), | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= error_tag(f, :type, "col-span-3 text-center") %> | ||||
|  | ||||
|   | ||||
| @@ -18,7 +18,10 @@ | ||||
|       <%= changeset_errors(@changeset) %> | ||||
|     </div> | ||||
|  | ||||
|     <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %> | ||||
|     <%= label(f, :name, gettext("Name"), | ||||
|       class: "title text-lg text-primary-600", | ||||
|       maxlength: 255 | ||||
|     ) %> | ||||
|     <%= text_input(f, :name, class: "input input-primary col-span-2") %> | ||||
|     <%= error_tag(f, :name, "col-span-3") %> | ||||
|  | ||||
|   | ||||
| @@ -31,6 +31,7 @@ | ||||
|     <%= textarea(f, :notes, | ||||
|       id: "shot-group-form-notes", | ||||
|       class: "input input-primary col-span-2", | ||||
|       maxlength: 255, | ||||
|       placeholder: gettext("Really great weather"), | ||||
|       phx_hook: "MaintainAttrs", | ||||
|       phx_update: "ignore" | ||||
|   | ||||
| @@ -19,7 +19,7 @@ | ||||
|     </div> | ||||
|  | ||||
|     <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %> | ||||
|     <%= text_input(f, :name, class: "input input-primary col-span-2") %> | ||||
|     <%= text_input(f, :name, class: "input input-primary col-span-2", maxlength: 255) %> | ||||
|     <%= error_tag(f, :name, "col-span-3") %> | ||||
|  | ||||
|     <%= label(f, :bg_color, gettext("Background color"), class: "title text-lg text-primary-600") %> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user