/** * Include this file _after_ the main backbone-forms file to override the default templates. * You only need to include templates you want to override. * * Requirements when customising templates: * - Each template must have one 'parent' element tag. * - "data-type" attributes are required. * - The main placeholder tags such as the following are required: fieldsets, fields */ ;(function() { var Form = Backbone.Form; //TWITTER BOOTSTRAP TEMPLATES //Requires Bootstrap 2.x Form.setTemplates({ //HTML form: '\
{{fieldsets}}
\ ', fieldset: '\
\ {{legend}}\ {{fields}}\
\ ', field: '\
\ \
\ {{editor}}\
{{error}}
\
{{help}}
\
\
\ ', nestedField: '\
\
{{editor}}\
{{error}}
\
\
{{help}}
\
\ ', list: '\
\ \ \
\ ', listItem: '\
  • \
    {{editor}}
    \ \
  • \ ', date: '\
    \ \ \ \
    \ ', dateTime: '\
    \

    {{date}}

    \

    \ \ :\ \

    \
    \ ', 'list.Modal': '\
    \ {{summary}}\
    \ ' }, { //CLASSNAMES error: 'error' //Set on the field tag when validation fails }); })();