annotate shared_view/includes/form/box.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 [% labels(
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
2 InvalidForm = 'Invalid form data, please review.'
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
3 )%]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
4 [% MACRO element(control) BLOCK;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
5 ers = control.GetOwnErrors().join(', ');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
6 %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
7 <div class='input-control'>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
8 <div class='control-label'>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
9 [% control.label %][% IF ers %] <span class="control-errors">$ers</span>[% END %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
10 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
11 <div class='control-content'>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
12 [% display_model(control, path = control.name) %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
13 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
14 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
15 [% END %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
16 [% BLOCK CONTENT %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
17 [% element(prop) FOREACH prop IN metadata.GetProperties() %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
18 [% END %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
19 [% BLOCK FOOTER %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
20 [% render('dojo/form/Button', button) FOREACH button IN buttons %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
21 [% END %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
22 <script type="dojo/on" data-dojo-event="submit">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
23 if(!this.validate()){
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
24 alert('$InvalidForm');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
25 return false;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
26 }
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
27 return true;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
28 </script>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
29 <div class="box-form">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
30 <div class="title">$document.title</div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
31 <div class="content">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
32 <div class="group-control">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
33 [% FOR error IN metadata.GetOwnErrors() %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
34 <div class="control-errors">$error</div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
35 [% END %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
36 <div class="control-content">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
37 [% INCLUDE CONTENT %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
38 <br style="clear:both">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
39 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
40 <div class="form-footer">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
41 [% INCLUDE FOOTER %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
42 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
43 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
44 </div>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
45 </div>