Added template for on demand restricting

Closes #1376
Refs #1395