Make pin form provide type attr (bug 874470)

Adds the type="number" via the form rather than from JS and adds tests to check the output.