[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/messages...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Oct 17 22:14:38 EDT 2014
Author: tzeller
Date: Fri Oct 17 22:14:38 2014
New Revision: 6734
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6734&view=rev
Log:
Provide feedback to user that the terms-of-use checkbox is required.
Add the HTML5 "required" attribute to checkbox element.
Add a decision-state and action-state to redisplay view with message for browsers like Safari that do not enforce "required".
Copy form-error CSS declaration from main.css to consent.css
Modified:
trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/messages.properties
trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/terms-of-use-flow.xml
trunk/idp-conf/src/main/resources/views/post-authn/consent/terms-of-use.vm
trunk/idp-war/src/main/webapp/css/consent.css
Modified: trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/messages.properties
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/messages.properties?rev=6734&r1=6733&r2=6734&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/messages.properties (original)
+++ trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/messages.properties Fri Oct 17 22:14:38 2014
@@ -1,12 +1,14 @@
# Messages related to Terms of Use consent.
-idp.tou.title = Terms of Use
+idp.tou.title = Terms of Use
-idp.tou.accept = I accept the terms of use
+idp.tou.accept = I accept the terms of use
-idp.tou.submit = Confirm
+idp.tou.submit = Confirm
-idp.tou.id = tou-1.0
+idp.tou.required = Please check this box if you want to proceed.
+
+idp.tou.id = tou-1.0
idp.tou.text = <em>*** This is an example ToU - tailor due to your needs ***</em> \
<p>Example organization AAI services: Terms of Use (ToU)</p> \
Modified: trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/terms-of-use-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/terms-of-use-flow.xml?rev=6734&r1=6733&r2=6734&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/terms-of-use-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/flows/post-authn/consent/terms-of-use/terms-of-use-flow.xml Fri Oct 17 22:14:38 2014
@@ -36,8 +36,17 @@
<evaluate expression="T(net.shibboleth.utilities.java.support.codec.HTMLEncoder)" result="requestScope.encoder" />
<evaluate expression="SetRPUIInformation.getRPUIContextCreateStrategy().apply(opensamlProfileRequestContext)" result="viewScope.rpUIContext" />
</on-render>
- <transition on="proceed" to="ExtractConsent" />
+ <transition on="proceed" to="TestForCheckbox" />
</view-state>
+
+ <decision-state id="TestForCheckbox">
+ <if test="requestParameters.consentIds != null" then="ExtractConsent" else="RequireCheckbox" />
+ </decision-state>
+
+ <action-state id="RequireCheckbox">
+ <evaluate expression="true" result="flowScope.requireCheckbox" />
+ <transition to="DisplayTermsOfUsePage" />
+ </action-state>
<action-state id="ExtractConsent">
<evaluate expression="ExtractConsent" />
Modified: trunk/idp-conf/src/main/resources/views/post-authn/consent/terms-of-use.vm
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/views/post-authn/consent/terms-of-use.vm?rev=6734&r1=6733&r2=6734&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/views/post-authn/consent/terms-of-use.vm (original)
+++ trunk/idp-conf/src/main/resources/views/post-authn/consent/terms-of-use.vm Fri Oct 17 22:14:38 2014
@@ -38,8 +38,11 @@
<div id="tou-acceptance">
<form action="$flowExecutionUrl" method="post" >
<div style="float:left;">
- <input id="accept" type="checkbox" name="consentIds" value="$encoder.encodeForHTML($termsOfUseId)" />
+ <input id="accept" type="checkbox" name="consentIds" value="$encoder.encodeForHTML($termsOfUseId)" required />
<label for="accept">#springMessage("idp.tou.accept")</label>
+ #if($requireCheckbox)
+ <p class="form-error">#springMessage("idp.tou.required")</p>
+ #end
</div>
<div style="float:right;">
<input type="submit" name="_eventId_proceed" value="#springMessage("idp.tou.submit")" />
Modified: trunk/idp-war/src/main/webapp/css/consent.css
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-war/src/main/webapp/css/consent.css?rev=6734&r1=6733&r2=6734&view=diff
[... 16 lines stripped ...]
More information about the commits
mailing list