This repo contains the code for allReady, an open-source solution focused on increasing awareness, efficiency and impact of preparedness campaigns as they are delivered by humanitarian and disaster response organizations in local communities.
In Campaign\Edit.cshtml the location fields are rendered using
@Html.EditorFor(m => m.Location)
In Event\Edit.cshtml the markup is inline. It looks like we could just re-use the EditorFor here. The only differences I can see are:
if (Model.EventType == EventType.Rally) it sets the "Address 1" field to have data-val-required, but I think we might be requiring an address on all events anyway, and using EditorFor will include this.
There's an extra CSS class location-address1 too but searching the code it seems to be unused.
In Campaign\Edit.cshtml the location fields are rendered using
@Html.EditorFor(m => m.Location)
In Event\Edit.cshtml the markup is inline. It looks like we could just re-use the EditorFor here. The only differences I can see are:
if (Model.EventType == EventType.Rally)
it sets the "Address 1" field to havedata-val-required
, but I think we might be requiring an address on all events anyway, and using EditorFor will include this.There's an extra CSS class
location-address1
too but searching the code it seems to be unused.