Ability to enter purpose on createlog form

This commit is contained in:
2013-03-02 14:24:41 -05:00
parent 4b9d7010d5
commit e911dfced7
10 changed files with 81 additions and 14 deletions
@@ -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)]
+10
View File
@@ -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; }
}
}