adding ams::util::orderby_clause and making ams::values_not_cached and ams::ad_form::elements use it so that attributes are orderby by list then by sort order , not just sort order
Added switch to require Admin Permission for generating templates as some customers do not like the idea of employees being able to change templates easily.