Make importing display name and email optional (#9277)
1 files changed, 23 insertions, 0 deletions
diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html
index f22b09aec1..105063825a 100644
--- a/synapse/res/templates/sso_auth_account_details.html
+++ b/synapse/res/templates/sso_auth_account_details.html
@@ -53,6 +53,14 @@
border-top: 1px solid #E9ECF1;
padding: 12px;
}
+ .idp-pick-details .check-row {
+ display: flex;
+ align-items: center;
+ }
+
+ .idp-pick-details .check-row .name {
+ flex: 1;
+ }
.idp-pick-details .use, .idp-pick-details .idp-value {
color: #737D8C;
@@ -91,16 +99,31 @@
<h2><img src="{{ idp.idp_icon | mxc_to_http(24, 24) }}"/>Information from {{ idp.idp_name }}</h2>
{% if user_attributes.avatar_url %}
<div class="idp-detail idp-avatar">
+ <div class="check-row">
+ <label for="idp-avatar" class="name">Avatar</label>
+ <label for="idp-avatar" class="use">Use</label>
+ <input type="checkbox" name="use_avatar" id="idp-avatar" value="true" checked>
+ </div>
<img src="{{ user_attributes.avatar_url }}" class="avatar" />
</div>
{% endif %}
{% if user_attributes.display_name %}
<div class="idp-detail">
+ <div class="check-row">
+ <label for="idp-displayname" class="name">Display name</label>
+ <label for="idp-displayname" class="use">Use</label>
+ <input type="checkbox" name="use_display_name" id="idp-displayname" value="true" checked>
+ </div>
<p class="idp-value">{{ user_attributes.display_name }}</p>
</div>
{% endif %}
{% for email in user_attributes.emails %}
<div class="idp-detail">
+ <div class="check-row">
+ <label for="idp-email{{ loop.index }}" class="name">E-mail</label>
+ <label for="idp-email{{ loop.index }}" class="use">Use</label>
+ <input type="checkbox" name="use_email" id="idp-email{{ loop.index }}" value="{{ email }}" checked>
+ </div>
<p class="idp-value">{{ email }}</p>
</div>
{% endfor %}
|