Project

General

Profile

1
##
2
## Velocity Template for DisplayAttributeReleasePage view-state
3
##
4
## Velocity context will contain the following properties :
5
##
6
## attributeReleaseContext - context holding consentable attributes
7
## attributeReleaseFlowDescriptor - attribute consent flow descriptor
8
## attributeDisplayNameFunction - function to display attribute name
9
## consentContext - context representing the state of a consent flow
10
## encoder - HTMLEncoder class
11
## flowExecutionKey - SWF execution key (this is built into the flowExecutionUrl)
12
## flowExecutionUrl - form action location
13
## flowRequestContext - Spring Web Flow RequestContext
14
## profileRequestContext - OpenSAML profile request context
15
## request - HttpServletRequest
16
## response - HttpServletResponse
17
## rpUIContext - context with SP UI information from the metadata
18
## environment - Spring Environment object for property resolution
19
#set ($serviceName = $rpUIContext.serviceName)
20
#set ($serviceDescription = $rpUIContext.serviceDescription)
21
#set ($informationURL = $rpUIContext.informationURL)
22
#set ($privacyStatementURL = $rpUIContext.privacyStatementURL)
23
#set ($rpOrganizationLogo = $rpUIContext.getLogo())
24
#set ($rpOrganizationName = $rpUIContext.organizationName)
25
#set ($replaceDollarWithNewline = true)
26
##
27
<!DOCTYPE html>
28
<html>
29
    <head>
30
        <meta charset="UTF-8">
31
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
32
        <link rel="stylesheet" type="text/css" href="$request.getContextPath()/css/consent.css">
33
        <title>#springMessageText("idp.attribute-release.title", "Information Release")</title>
34
    </head>
35
    <body>
36
        <form action="$flowExecutionUrl" method="post" style="padding:10px" >
37
            <div class="box">
38
                <header>
39
                    <img src="$request.getContextPath()#springMessage("idp.logo")" alt="#springMessageText("idp.logo.alt-text", "logo")" class="federation_logo">
40
                    #if ($rpOrganizationLogo)
41
                        <img src="$encoder.encodeForHTMLAttribute($rpOrganizationLogo)" alt="logo for $encoder.encodeForHTMLAttribute($serviceName)" class="organization_logo">
42
                    #end
43
                </header>
44
                #if ($serviceName)
45
                    <p style="margin-top: 70px;">
46
                        #springMessageText("idp.attribute-release.serviceNameLabel", "You are about to access the service:")<br>
47
                        <span class="service_name">$serviceName</span>
48
                        #if ($rpOrganizationName)
49
                            #springMessageText("idp.attribute-release.of", "of") <span class="organization_name">$encoder.encodeForHTML($rpOrganizationName)</span>
50
                        #end
51
                    </p>
52
                #end
53
                #if ($serviceDescription)
54
                    <p style="margin-top: 10px;">
55
                        #springMessageText("idp.attribute-release.serviceDescriptionLabel", "Description as provided by this service:")<br>
56
                        <span class="service_description">$encoder.encodeForHTML($serviceDescription)</span>
57
                        <br>
58
                    </p>
59
                #end
60
                #if ($informationURL)
61
                    <p style="margin-top: 10px;">
62
                        <a href="$informationURL">#springMessageText("idp.attribute-release.informationURLLabel", "Additional information about the service")</a>
63
                    </p>
64
                #end
65
                <div id="attributeRelease">
66
                    <table>
67
                        <thead>
68
                            <tr>
69
                                <th colspan="3">
70
                                    #springMessageText("idp.attribute-release.attributesHeader", "Information to be Provided to Service")
71
                                </th>
72
                            </tr>
73
                        </thead>
74
                        <tbody>
75
                            #foreach ($attribute in $attributeReleaseContext.getConsentableAttributes().values())
76
                                <tr>
77
                                    <td>$encoder.encodeForHTML($attributeDisplayNameFunction.apply($attribute))</td>
78
                                    <td>
79
                                        #foreach ($value in $attribute.values)
80
                                            #if ($replaceDollarWithNewline)
81
                                                #set ($encodedValue = $encoder.encodeForHTML($value.getDisplayValue()).replaceAll($encoder.encodeForHTML("$"),"<br>"))
82
                                            #else
83
                                                #set ($encodedValue = $encoder.encodeForHTML($value.getDisplayValue()))
84
                                            #end
85
                                            #if ($attributeReleaseFlowDescriptor.perAttributeConsentEnabled)
86
                                                <label for="$attribute.id"><strong>$encodedValue</strong></label>
87
                                            #else
88
                                                <strong>$encodedValue</strong>
89
                                            #end
90
                                            <br>
91
                                        #end
92
                                    </td>
93
                                    <td style="vertical-align: top">
94
                                        #if ($attributeReleaseFlowDescriptor.perAttributeConsentEnabled)
95
                                            #set ($inputType = "checkbox")
96
                                        #else
97
                                            #set ($inputType = "hidden")
98
                                        #end
99
                                        <input id="$attribute.id" type="$inputType" name="_shib_idp_consentIds" value="$encoder.encodeForHTML($attribute.id)" checked>
100
                                    </td>
101
                                </tr>
102
                            #end
103
                        </tbody>
104
                    </table>
105
                </div>
106
                #if ($privacyStatementURL)
107
                    <p style="margin-top: 10px;">
108
                        <a href="$privacyStatementURL">#springMessageText("idp.attribute-release.privacyStatementURLLabel", "Data privacy information of the service")</a>
109
                    </p>
110
                #end
111
                <div style="float:left;">
112
                    <p>
113
                        #springMessageText("idp.attribute-release.confirmationQuestion", "The information above would be shared with the service if you proceed. Do you agree to release this information to the service every time you access it?")
114
                    </p>
115
                    #if ($attributeReleaseFlowDescriptor.doNotRememberConsentAllowed || $attributeReleaseFlowDescriptor.globalConsentAllowed)
116
                        <div id="generalConsentDiv" style="display: block; background-color: #F6F6F6;border: 1px gray solid; padding: 10px; width: 92%;">
117
                        #springMessageText("idp.attribute-release.consentMethod", "Select an information release consent duration:")
118
                    #end
119
                    #if ($attributeReleaseFlowDescriptor.doNotRememberConsentAllowed)
120
                        <p>
121
                            <input id="_shib_idp_doNotRememberConsent" type="radio" name="_shib_idp_consentOptions" value="_shib_idp_doNotRememberConsent">
122
                            <label for="_shib_idp_doNotRememberConsent">#springMessageText("idp.attribute-release.doNotRememberConsent", "Ask me again at next login")</label>
123
                            <ul>
124
                                <li>#springMessageText("idp.attribute-release.doNotRememberConsentItem", "I agree to send my information this time.")</li>
125
                            </ul>
126
                        </p>
127
                    #end
128
                    #if ($attributeReleaseFlowDescriptor.doNotRememberConsentAllowed || $attributeReleaseFlowDescriptor.globalConsentAllowed)
129
                        <p>
130
                            <input id="_shib_idp_rememberConsent" type="radio" name="_shib_idp_consentOptions" value="_shib_idp_rememberConsent" checked>
131
                            <label for="_shib_idp_rememberConsent">#springMessageText("idp.attribute-release.rememberConsent", "Ask me again if information changes")</label>
132
                            <ul>
133
                                <li>#springMessageText("idp.attribute-release.rememberConsentItem", "I agree that the same information will be sent automatically to this service in the future.")</li>
134
                            </ul>
135
                        </p>
136
                    #end
137
                    #if ($attributeReleaseFlowDescriptor.globalConsentAllowed)
138
                        <p>
139
                            <input id="_shib_idp_globalConsent" type="radio" name="_shib_idp_consentOptions" value="_shib_idp_globalConsent">
140
                            <label for="_shib_idp_globalConsent">#springMessageText("idp.attribute-release.globalConsent", "Do not ask me again")</label>
141
                            <ul>
142
                                <li>#springMessageText("idp.attribute-release.globalConsentItem", "I agree that <strong>all</strong> of my information will be released to <strong>any</strong> service.")</li>
143
                            </ul>
144
                        </p>
145
                    #end
146
                    #if ($attributeReleaseFlowDescriptor.doNotRememberConsentAllowed || $attributeReleaseFlowDescriptor.globalConsentAllowed)
147
                        #springMessageText("idp.attribute-release.consentMethodRevoke", "This setting can be revoked at any time with the checkbox on the login page.")
148
                        </div>
149
                    #end
150
                    <p style="text-align: center;">
151
                        <input type="submit" name="_eventId_AttributeReleaseRejected" value="#springMessageText("idp.attribute-release.reject", "Reject")" style="margin-right: 30px;">
152
                        <input type="submit" name="_eventId_proceed" value="#springMessageText("idp.attribute-release.accept", "Accept")">
153
                    </p>
154
                </div>
155
            </div>
156
        </form>
157
    </body>
158
</html>
(2-2/4)