Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo with the whole form autosubmit #509

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Changelog
- Upgrade to Patternslib 9.8.3-alpha.0, fixing auto-submit issues with pat-clone.
[thet]

- The @@identification form now works with autosubmit.
Refs: `#996 <https://github.com/syslabcom/scrum/issues/996>`_.
[ale-rt]

- Foresee the possibility to have banners in the tool homepage
Refs: `#1025 <https://github.com/syslabcom/scrum/issues/1025>`_.
[ale-rt]
Expand Down
138 changes: 71 additions & 67 deletions src/euphorie/client/browser/templates/risk_identification.pt
Original file line number Diff line number Diff line change
Expand Up @@ -28,85 +28,89 @@
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"
data-pat-validation="disable-selector: button[name='next']; ${webhelpers/pat_validation_messages}"
>
<a class="pat-scroll pat-scroll-animated"
hidden
href="#content-pane"
data-pat-scroll="selector: #content-pane; trigger: auto; offset: 0"
>Scroll to top</a>
<div class="pat-scroll-box"
id="content-pane"
<fieldset class="pat-autosubmit pat-inject pat-subform"
data-pat-inject="source: #page-module-training-panel-content; target: #page-module-training-panel-content; history: none;"
>
<metal:call use-macro="webhelpers/macros/toolbar" />
<h2 class="risk-title">${here/title}</h2>
<a class="pat-scroll pat-scroll-animated"
hidden
href="#content-pane"
data-pat-scroll="selector: #content-pane; trigger: auto; offset: 0"
>Scroll to top</a>
<div class="pat-scroll-box"
id="content-pane"
>
<metal:call use-macro="webhelpers/macros/toolbar" />
<h2 class="risk-title">${here/title}</h2>

<!-- Identification -->
<metal:call use-macro="webhelpers/macros/risk_identification" />
<!-- END Identificaton -->
<!-- Identification -->
<metal:call use-macro="webhelpers/macros/risk_identification" />
<!-- END Identificaton -->

<!-- Action Plan -->
<tal:action_plan condition="webhelpers/integrated_action_plan">
<div class="pat-collapsible open risk-module pat-depends hidden form-panel"
id="panel-action-plan"
data-pat-depends="transition: slide; ${view/action_plan_condition}"
>
<h3 class="form-separation-header"
i18n:translate="header_measures"
<!-- Action Plan -->
<tal:action_plan condition="webhelpers/integrated_action_plan">
<div class="pat-collapsible open risk-module pat-depends hidden form-panel"
id="panel-action-plan"
data-pat-depends="transition: slide; ${view/action_plan_condition}"
>
Measures
</h3>
<section class="pat-rich">
<p tal:content="view/action_plan_instruction_text">Instruction</p>
</section>
<metal:call use-macro="webhelpers/macros/action_plan" />
</div>
</tal:action_plan>
<!-- END Action Plan -->
<h3 class="form-separation-header"
i18n:translate="header_measures"
>
Measures
</h3>
<section class="pat-rich">
<p tal:content="view/action_plan_instruction_text">Instruction</p>
</section>
<metal:call use-macro="webhelpers/macros/action_plan" />
</div>
</tal:action_plan>
<!-- END Action Plan -->

<!-- Evaluation -->
<metal:call use-macro="webhelpers/macros/risk_evaluation" />
<!-- END Evaluation -->
<!-- Evaluation -->
<metal:call use-macro="webhelpers/macros/risk_evaluation" />
<!-- END Evaluation -->

<!-- Information -->
<metal:call use-macro="here/risk_macros/macros/riskinfo"
tal:define="
default_state python:view.get_collapsible_section_state('information');
"
/>
<!-- END Information -->
<!-- Information -->
<metal:call use-macro="here/risk_macros/macros/riskinfo"
tal:define="
default_state python:view.get_collapsible_section_state('information');
"
/>
<!-- END Information -->

<!-- Comments -->
<metal:call use-macro="webhelpers/macros/risk_comments"
tal:define="
default_state python:view.get_collapsible_section_state('comments');
"
/>
<!-- END Comments -->
<!-- Comments -->
<metal:call use-macro="webhelpers/macros/risk_comments"
tal:define="
default_state python:view.get_collapsible_section_state('comments');
"
/>
<!-- END Comments -->

<!-- Resources -->
<article class="pat-rich pat-collapsible ${default_state} risk-module form-panel"
tal:define="
default_state python:view.get_collapsible_section_state('resources');
"
tal:condition="view/show_resources"
>
<h3 class="form-separation-header"
i18n:translate="header_resources"
<!-- Resources -->
<article class="pat-rich pat-collapsible ${default_state} risk-module form-panel"
tal:define="
default_state python:view.get_collapsible_section_state('resources');
"
tal:condition="view/show_resources"
>
Resources
</h3>
<!-- Legal references -->
<metal:call use-macro="webhelpers/macros/legal_references" />
<!-- Additional files -->
<metal:call use-macro="webhelpers/macros/additional_files" />
</article>
<!-- END Resources -->
<h3 class="form-separation-header"
i18n:translate="header_resources"
>
Resources
</h3>
<!-- Legal references -->
<metal:call use-macro="webhelpers/macros/legal_references" />
<!-- Additional files -->
<metal:call use-macro="webhelpers/macros/additional_files" />
</article>
<!-- END Resources -->

<!-- Training -->
<metal:call use-macro="webhelpers/macros/training_configuration" />
<!-- END Training -->
<!-- Training -->
<metal:call use-macro="webhelpers/macros/training_configuration" />
<!-- END Training -->


</div>
</div>
</fieldset>
<p class="button-bar pat-bumper"
id="nav-bar"
>
Expand Down
Loading