0
<h2>Identity request from <%=h extract_host(@site.url) %></h2>
0
-<p>The realm for this request is <strong><%=h checkid_request.trust_root %></strong></p>
0
+<% if sreg_request || ax_fetch_request %>
0
+<p><strong><%=h checkid_request.trust_root %></strong> requests some personal data.<br />
0
+Please select the information you would like to submit.</p>
0
+<p class="note">The attributes shown are from your persona <strong><%=h @site.persona.title %></strong>.<br />
0
+To submit other values you can <%= link_to "edit the persona", edit_account_persona_path(@site.persona, :return => decide_path(:persona_id => @site.persona.id)) %>
0
+or <%= link_to_function "choose another persona", 'Element.toggle("persona_select")' %>.</p>
0
+<p><strong><%=h checkid_request.trust_root %></strong> requires your authentication.</p>
0
-<% form_tag decide_path, :method => :get
do %>
0
+<% form_tag decide_path, :method => :get
, :id => 'persona_select', :style => 'display:none;' do %>
0
<h3>Choose a persona</h3>
0
- <p><%=h extract_host(@site.url) %> requests your data.<br />
0
- Please select a persona to choose this data from.</p>
0
+ <% unless current_account.personas.empty? %>
0
- <%= content_tag :label, 'Persona', :for => 'persona_id' %>
0
<select id="persona_id" name="persona_id">
0
<%= options_from_collection_for_select(current_account.personas, :id, :title, @site.persona.id) %>
0
<%= submit_tag "choose persona" %> or
0
- <%= link_to "create
new persona", new_account_persona_path(:return => decide_path) %>
0
+ <%= link_to "create
a new persona", new_account_persona_path(:return => decide_path) %>
0
<% end if sreg_request || ax_fetch_request %>
0
<% form_for @site, :url => complete_path do |f| %>
0
<% if sreg_request || ax_fetch_request %>
0
- <h3><%=h @site.persona.title %> <span class="note"><%= link_to "edit persona", edit_account_persona_path(@site.persona, :return => decide_path(:persona_id => @site.persona.id)) %></span></h3>
0
- <p>Please choose the data that you would like to pass on.
0
- <%= link_to "#{h extract_host(@site.url)} privacy policy", sreg_request.policy_url unless !sreg_request || sreg_request.policy_url.blank? %></p>
0
- <table cellspacing="0">
0
- <th colspan="2"><h4>Simple Registration data</h4></th>
0
- <% (sreg_request.required + sreg_request.optional).each do |property| %>
0
- <td><%= label_tag "site_sreg_#{property}", property_label_text(property) %></td>
0
- <td><%= label_tag "site_sreg_#{property}", @site.persona.property(property) %></td>
0
- <%= check_box_tag "site[sreg][#{property}]", @site.persona.property(property), sreg_request_for_field(property) == 'required', :id => "site_sreg_#{property}", :class => sreg_request_for_field(property) %>
0
- <%= label_tag "site_sreg_#{property}", sreg_request_for_field(property), :class => 'note' %>
0
- <% if ax_fetch_request %>
0
- <table cellspacing="0">
0
- <th colspan="2"><h4>Attribute Exchange</h4></th>
0
- <% ax_fetch_request.attributes.each do |property| %>
0
- <td><%= label_tag "site_ax_#{property.ns_alias}", property_label_text(property.ns_alias) %></td>
0
- <td><%= label_tag "site_ax_#{property.ns_alias}", @site.persona.property(property.type_uri) %></td>
0
- <%= check_box_tag "site[ax][#{property.ns_alias}][value]", @site.persona.property(property.type_uri), ax_request_for_field(property) == 'required', :id => "site_ax_#{property.ns_alias}", :class => ax_request_for_field(property) %>
0
- <%= hidden_field_tag "site[ax][#{property.ns_alias}][type]", property.type_uri, :id => "site_ax_type_#{property.ns_alias}" %>
0
- <%= label_tag "site_ax_#{property.ns_alias}", ax_request_for_field(property), :class => 'note' %>
0
+ <table cellspacing="0">
0
+ <th colspan="2"><h4>Requested information</h4></th>
0
+ <th class="disclosure">disclosure</th>
0
+ <% (sreg_request.required + sreg_request.optional).each do |property| %>
0
+ <td><%= label_tag "site_sreg_#{property}", property_label_text(property) %></td>
0
+ <td><%= label_tag "site_sreg_#{property}", @site.persona.property(property) %></td>
0
+ <%= check_box_tag "site[sreg][#{property}]", @site.persona.property(property), sreg_request.required.include?(property), :id => "site_sreg_#{property}", :class => sreg_request_for_field(property) %>
0
+ <%= label_tag "site_sreg_#{property}", sreg_request_for_field(property), :class => 'note' %>
0
+ <% end if sreg_request %>
0
+ <% ax_fetch_request.attributes.each do |property| %>
0
+ <td><%= label_tag "site_ax_#{property.ns_alias}", property.ns_alias %></td>
0
+ <td><%= label_tag "site_ax_#{property.ns_alias}", @site.persona.property(property.type_uri) %></td>
0
+ <%= check_box_tag "site[ax][#{property.ns_alias}][value]", @site.persona.property(property.type_uri), property.required, :id => "site_ax_#{property.ns_alias}", :class => ax_request_for_field(property) %>
0
+ <%= hidden_field_tag "site[ax][#{property.ns_alias}][type]", property.type_uri, :id => "site_ax_type_#{property.ns_alias}" %>
0
+ <%= label_tag "site_ax_#{property.ns_alias}", ax_request_for_field(property), :class => 'note' %>
0
+ <% end if ax_fetch_request %>
0
<% if sreg_request || ax_fetch_request %>
0
<%= f.hidden_field :persona_id %>
0
<%= f.hidden_field :url %>
0
- <%= submit_tag 'Always trust this site', :name => 'always', :class => 'space' %>
0
<%= submit_tag 'Trust this site only this time', :name => 'temporary', :class => 'space' %>
0
+ <%= submit_tag 'Always trust this site', :name => 'always', :class => 'space' %>
0
<%= submit_tag 'Approve this request', :name => 'temporary', :class => 'space' %>
0
<%= submit_tag 'Cancel this request', :name => 'cancel' %>
0
+<% end unless current_account.personas.empty? %>
Comments
No one has commented yet.