Skip to content

Commit e1cb1c1

Browse files
committed
Demo with the whole form autosubmit
1 parent 1ac48be commit e1cb1c1

File tree

3 files changed

+317
-305
lines changed

3 files changed

+317
-305
lines changed

docs/changes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Changelog
77
- Upgrade to Patternslib 9.8.3-alpha.0, fixing auto-submit issues with pat-clone.
88
[thet]
99

10+
- The @@identification form now works with autosubmit.
11+
Refs: `#996 <https://github.com/syslabcom/scrum/issues/996>`_.
12+
[ale-rt]
13+
1014
- Foresee the possibility to have banners in the tool homepage
1115
Refs: `#1025 <https://github.com/syslabcom/scrum/issues/1025>`_.
1216
[ale-rt]

src/euphorie/client/browser/templates/risk_identification.pt

Lines changed: 71 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -28,85 +28,89 @@
2828
data-pat-inject="history: record; source: #step-2-topics; target: #step-2-topics &amp;&amp; source: #main-content; target: #main-content &amp;&amp; source: #toolbar; target: #toolbar &amp;&amp; source: #status; target: #status"
2929
data-pat-validation="disable-selector: button[name='next']; ${webhelpers/pat_validation_messages}"
3030
>
31-
<a class="pat-scroll pat-scroll-animated"
32-
hidden
33-
href="#content-pane"
34-
data-pat-scroll="selector: #content-pane; trigger: auto; offset: 0"
35-
>Scroll to top</a>
36-
<div class="pat-scroll-box"
37-
id="content-pane"
31+
<fieldset class="pat-autosubmit pat-inject pat-subform"
32+
data-pat-inject="source: #page-module-training-panel-content; target: #page-module-training-panel-content; history: none;"
3833
>
39-
<metal:call use-macro="webhelpers/macros/toolbar" />
40-
<h2 class="risk-title">${here/title}</h2>
34+
<a class="pat-scroll pat-scroll-animated"
35+
hidden
36+
href="#content-pane"
37+
data-pat-scroll="selector: #content-pane; trigger: auto; offset: 0"
38+
>Scroll to top</a>
39+
<div class="pat-scroll-box"
40+
id="content-pane"
41+
>
42+
<metal:call use-macro="webhelpers/macros/toolbar" />
43+
<h2 class="risk-title">${here/title}</h2>
4144

42-
<!-- Identification -->
43-
<metal:call use-macro="webhelpers/macros/risk_identification" />
44-
<!-- END Identificaton -->
45+
<!-- Identification -->
46+
<metal:call use-macro="webhelpers/macros/risk_identification" />
47+
<!-- END Identificaton -->
4548

46-
<!-- Action Plan -->
47-
<tal:action_plan condition="webhelpers/integrated_action_plan">
48-
<div class="pat-collapsible open risk-module pat-depends hidden form-panel"
49-
id="panel-action-plan"
50-
data-pat-depends="transition: slide; ${view/action_plan_condition}"
51-
>
52-
<h3 class="form-separation-header"
53-
i18n:translate="header_measures"
49+
<!-- Action Plan -->
50+
<tal:action_plan condition="webhelpers/integrated_action_plan">
51+
<div class="pat-collapsible open risk-module pat-depends hidden form-panel"
52+
id="panel-action-plan"
53+
data-pat-depends="transition: slide; ${view/action_plan_condition}"
5454
>
55-
Measures
56-
</h3>
57-
<section class="pat-rich">
58-
<p tal:content="view/action_plan_instruction_text">Instruction</p>
59-
</section>
60-
<metal:call use-macro="webhelpers/macros/action_plan" />
61-
</div>
62-
</tal:action_plan>
63-
<!-- END Action Plan -->
55+
<h3 class="form-separation-header"
56+
i18n:translate="header_measures"
57+
>
58+
Measures
59+
</h3>
60+
<section class="pat-rich">
61+
<p tal:content="view/action_plan_instruction_text">Instruction</p>
62+
</section>
63+
<metal:call use-macro="webhelpers/macros/action_plan" />
64+
</div>
65+
</tal:action_plan>
66+
<!-- END Action Plan -->
6467

65-
<!-- Evaluation -->
66-
<metal:call use-macro="webhelpers/macros/risk_evaluation" />
67-
<!-- END Evaluation -->
68+
<!-- Evaluation -->
69+
<metal:call use-macro="webhelpers/macros/risk_evaluation" />
70+
<!-- END Evaluation -->
6871

69-
<!-- Information -->
70-
<metal:call use-macro="here/risk_macros/macros/riskinfo"
71-
tal:define="
72-
default_state python:view.get_collapsible_section_state('information');
73-
"
74-
/>
75-
<!-- END Information -->
72+
<!-- Information -->
73+
<metal:call use-macro="here/risk_macros/macros/riskinfo"
74+
tal:define="
75+
default_state python:view.get_collapsible_section_state('information');
76+
"
77+
/>
78+
<!-- END Information -->
7679

77-
<!-- Comments -->
78-
<metal:call use-macro="webhelpers/macros/risk_comments"
79-
tal:define="
80-
default_state python:view.get_collapsible_section_state('comments');
81-
"
82-
/>
83-
<!-- END Comments -->
80+
<!-- Comments -->
81+
<metal:call use-macro="webhelpers/macros/risk_comments"
82+
tal:define="
83+
default_state python:view.get_collapsible_section_state('comments');
84+
"
85+
/>
86+
<!-- END Comments -->
8487

85-
<!-- Resources -->
86-
<article class="pat-rich pat-collapsible ${default_state} risk-module form-panel"
87-
tal:define="
88-
default_state python:view.get_collapsible_section_state('resources');
89-
"
90-
tal:condition="view/show_resources"
91-
>
92-
<h3 class="form-separation-header"
93-
i18n:translate="header_resources"
88+
<!-- Resources -->
89+
<article class="pat-rich pat-collapsible ${default_state} risk-module form-panel"
90+
tal:define="
91+
default_state python:view.get_collapsible_section_state('resources');
92+
"
93+
tal:condition="view/show_resources"
9494
>
95-
Resources
96-
</h3>
97-
<!-- Legal references -->
98-
<metal:call use-macro="webhelpers/macros/legal_references" />
99-
<!-- Additional files -->
100-
<metal:call use-macro="webhelpers/macros/additional_files" />
101-
</article>
102-
<!-- END Resources -->
95+
<h3 class="form-separation-header"
96+
i18n:translate="header_resources"
97+
>
98+
Resources
99+
</h3>
100+
<!-- Legal references -->
101+
<metal:call use-macro="webhelpers/macros/legal_references" />
102+
<!-- Additional files -->
103+
<metal:call use-macro="webhelpers/macros/additional_files" />
104+
</article>
105+
<!-- END Resources -->
103106

104-
<!-- Training -->
105-
<metal:call use-macro="webhelpers/macros/training_configuration" />
106-
<!-- END Training -->
107+
<!-- Training -->
108+
<metal:call use-macro="webhelpers/macros/training_configuration" />
109+
<!-- END Training -->
107110

108111

109-
</div>
112+
</div>
113+
</fieldset>
110114
<p class="button-bar pat-bumper"
111115
id="nav-bar"
112116
>

0 commit comments

Comments
 (0)