annotate shared_view/includes/dojo/form.tt @ 12:d9551c7e7101

improved dox library
author sergey
date Fri, 16 May 2014 16:47:50 +0400
parents 573272ec604b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
1 [%
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
2 BLOCK INIT;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
3 document.dojo.modules.push("dijit/form/Form");
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
4 END;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
5
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
6 FormResult = import('IMPL::Web::View::FormResult');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
7 Metadata = import('IMPL::Web::View::Metadata::FormMeta');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
8
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
9 UNLESS is(model,FormResult);
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
10 THROW form 'The form result is required';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
11 END;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
12
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
13 # defaults
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
14 content = layout.content || 'form/group';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
15 enctype = enctype || 'application/x-www-form-urlencoded';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
16 method = method || 'POST';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
17 formMeta = Metadata.GetMetadataForModel(model.node, errors = model.errors, nodes = [model.node]);
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
18 %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
19 <form data-dojo-type="dijit/form/Form" class="form-control" method="$method" [% IF action %]action="$action" [% END %] enctype="$enctype">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
20 [% display_model(formMeta, content, layout.args) %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
21 </form>