<% # Copyright (C) 2015 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %>

<%= t 'SSO Settings' %>

<%= form_for(account, as: :sso_settings, url: account_update_sso_settings_path(account), method: :put, html: { class: "ic-Form ic-Form--horizontal" }) do |f| %>
<%= f.label :login_handle_name, t("Login Label"), class: 'ic-Label' %> <%= f.text_field :login_handle_name, placeholder: presenter.login_placeholder, :class => 'ic-Input', 'aria-describedby' => 'login_handle_name_description' %>
<%= t(:login_handle_name_description, "The label used for unique login identifiers. Examples: "\ "Login, Username, Student ID, etc.") %>
<%= f.label :change_password_url, t("Forgot Password URL"), class: 'ic-Label' %> <%= f.text_field :change_password_url, :class => 'ic-Input', 'aria-describedby' => 'change_password_url_description' %>
<%= t(:change_password_url_help, "Leave blank for default Canvas behavior") %>
<%= f.label :auth_discovery_url, t("Discovery URL"), class: 'ic-Label' %> <%= f.text_field :auth_discovery_url, :class => 'ic-Input', 'aria-describedby' => 'auth_discovery_url_description' %>
<%= t('discovery_url_description', <<~TEXT) If a discovery URL is set, Canvas will forward all users to that URL when they need to be authenticated. That page will need to then help the user figure out where they need to go to log in. If no discovery URL is configured, the first configuration will be used to attempt to authenticate the user. TEXT %>
<% if presenter.needs_unknown_user_url? %>
<%= f.label :unknown_user_url, t("Unknown User URL"), class: 'ic-Label' %> <%= f.text_field :unknown_user_url, placeholder: login_url, :class => 'ic-Input', 'aria-describedby' => 'unknown_user_url_description' %>
<%= t(:unknown_user_url_description, "The url to redirect to when an authenticated user is not "\ "found in Canvas.") %>
<% end %>
<%= f.button t('Save'), class: "Button Button--primary" %>
<% end %>