Ability to enter purpose on createlog form
This commit is contained in:
@@ -39,6 +39,13 @@ namespace MileageTraker.Web.ViewModels.CreateLog
|
||||
[StringLength(64, MinimumLength = 3, ErrorMessage = "Minimum 3 characters")]
|
||||
public string CityName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Required")]
|
||||
[Display(Name = "Trip Purpose")]
|
||||
public SelectListViewModel Purpose { get; set; }
|
||||
|
||||
[InputSize("large")]
|
||||
public string Notes { get; set; }
|
||||
|
||||
[RegularExpression(@"\d+\.\d{3}", ErrorMessage = "Enter all 3 decimal places")]
|
||||
[Display(Name = "Gas Purchased")]
|
||||
[DisplayFormat(DataFormatString = "{0:0.000}", ApplyFormatInEditMode = true)]
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace MileageTraker.Web.ViewModels
|
||||
{
|
||||
public class SelectListViewModel
|
||||
{
|
||||
public SelectList Available { get; set; }
|
||||
public int Selected { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user