@components.Card("Vehicle Information", "car") {
@components.Form("post", fmt.Sprintf("/vehicles/edit/%d", vehicle.ID)) {
@components.FormGroup("Vehicle Name", "A friendly name for your vehicle") {
@components.Input("name", "text", "e.g., My Car, Work Van", vehicle.Name, true)
}
@components.FormGroup("License Plate", "Vehicle registration number") {
@components.Input("license_plate", "text", "e.g., ABC-123", vehicle.LicensePlate, false)
}
@components.FormGroup("Make", "Vehicle manufacturer") {
@VehicleBrandSelect("make", vehicle.Make)
}
@components.FormGroup("Model", "Vehicle model") {
@components.Input("model", "text", "e.g., Corolla, Golf", vehicle.Model, true)
}
@components.FormGroup("Year", "Manufacturing year") {
@components.NumberInput("year", "2024", float64(vehicle.Year), "1", 1900, true)
}
@components.FormGroup("Fuel Type", "Primary fuel type") {
@components.FuelTypeSelect("fuel_type", vehicle.FuelType, true)
}
@components.FormGroup("Active", "Vehicle status") {
@components.Switch("is_active", "Vehicle is active", vehicle.IsActive)
}
@components.FormGroup("Notes", "Additional information (optional)") {
@components.TextArea("notes", "Add any additional notes about this vehicle...", vehicle.Notes, 3)
}
@components.FormButtons("/vehicles", "Update Vehicle", "save")
}
}