Lines 6-20
Link Here
|
6 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
<title> |
7 |
<title> |
8 |
[% IF op == 'add_form' %] |
8 |
[% IF op == 'add_form' %] |
9 |
New authentication provider domain › [% ELSIF op == 'edit_form' %] |
9 |
New identity provider domain › [% ELSIF op == 'edit_form' %] |
10 |
Edit authentication provider domain › [% END %] |
10 |
Edit identity provider domain › [% END %] |
11 |
|
11 |
|
12 |
Authentication providers › Administration › Koha |
12 |
Identity providers › Administration › Koha |
13 |
</title> |
13 |
</title> |
14 |
[% INCLUDE 'doc-head-close.inc' %] |
14 |
[% INCLUDE 'doc-head-close.inc' %] |
15 |
</head> |
15 |
</head> |
16 |
|
16 |
|
17 |
<body id="admin_auth_provider_domains" class="admin"> |
17 |
<body id="admin_identity_provider_domains" class="admin"> |
18 |
[% INCLUDE 'header.inc' %] |
18 |
[% INCLUDE 'header.inc' %] |
19 |
[% INCLUDE 'prefs-admin-search.inc' %] |
19 |
[% INCLUDE 'prefs-admin-search.inc' %] |
20 |
|
20 |
|
Lines 28-39
Link Here
|
28 |
</li> |
28 |
</li> |
29 |
|
29 |
|
30 |
<li> |
30 |
<li> |
31 |
<a href="/cgi-bin/koha/admin/authentication_providers.pl">Authentication providers</a> |
31 |
<a href="/cgi-bin/koha/admin/identity_providers.pl">Identity providers</a> |
32 |
</li> |
32 |
</li> |
33 |
|
33 |
|
34 |
[% IF op == 'add_form' %] |
34 |
[% IF op == 'add_form' %] |
35 |
<li> |
35 |
<li> |
36 |
<a href="/cgi-bin/koha/admin/authentication_providers.pl?domain_ops=1&auth_provider_id=[%- auth_provider_id | uri -%]">Domains for [%- auth_provider_name | html -%]</a> |
36 |
<a href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&identity_provider_id=[%- identity_provider_id | uri -%]">Domains for [%- identity_provider_name | html -%]</a> |
37 |
</li> |
37 |
</li> |
38 |
<li> |
38 |
<li> |
39 |
<a href="#" aria-current="page"> |
39 |
<a href="#" aria-current="page"> |
Lines 43-49
Link Here
|
43 |
|
43 |
|
44 |
[% ELSIF op == 'edit_form' %] |
44 |
[% ELSIF op == 'edit_form' %] |
45 |
<li> |
45 |
<li> |
46 |
<a href="/cgi-bin/koha/admin/authentication_providers.pl?domain_ops=1&auth_provider_id=[%- auth_provider_id | uri -%]">Domains for [%- auth_provider_name | html -%]</a> |
46 |
<a href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&identity_provider_id=[%- identity_provider_id | uri -%]">Domains for [%- identity_provider_name | html -%]</a> |
47 |
</li> |
47 |
</li> |
48 |
<li> |
48 |
<li> |
49 |
<a href="#" aria-current="page"> |
49 |
<a href="#" aria-current="page"> |
Lines 54-60
Link Here
|
54 |
[% ELSE %] |
54 |
[% ELSE %] |
55 |
<li> |
55 |
<li> |
56 |
<a href="#" aria-current="page"> |
56 |
<a href="#" aria-current="page"> |
57 |
Domains for [%- auth_provider_code | html -%] |
57 |
Domains for [%- identity_provider_code | html -%] |
58 |
</a> |
58 |
</a> |
59 |
</li> |
59 |
</li> |
60 |
[% END %] |
60 |
[% END %] |
Lines 67-97
Link Here
|
67 |
<main> |
67 |
<main> |
68 |
|
68 |
|
69 |
[% FOREACH m IN messages %] |
69 |
[% FOREACH m IN messages %] |
70 |
<div class="dialog [% m.type | html %]" id="auth_provider_domain_action_result_dialog"> |
70 |
<div class="dialog [% m.type | html %]" id="identity_provider_domain_action_result_dialog"> |
71 |
[% SWITCH m.code %] |
71 |
[% SWITCH m.code %] |
72 |
[% CASE 'error_on_update' %] |
72 |
[% CASE 'error_on_update' %] |
73 |
<span>An error occurred trying to open the authentication provider domain for editing. The passed id is invalid.</span> |
73 |
<span>An error occurred trying to open the identity provider domain for editing. The passed id is invalid.</span> |
74 |
[% CASE 'error_on_insert' %] |
74 |
[% CASE 'error_on_insert' %] |
75 |
<span>An error occurred when adding a new authentication provider domain.</span> |
75 |
<span>An error occurred when adding a new identity provider domain.</span> |
76 |
[% CASE 'success_on_update' %] |
76 |
[% CASE 'success_on_update' %] |
77 |
<span>Authentication provider domain updated successfully.</span> |
77 |
<span>Identity provider domain updated successfully.</span> |
78 |
[% CASE 'success_on_insert' %] |
78 |
[% CASE 'success_on_insert' %] |
79 |
<span>Authentication provider domain added successfully.</span> |
79 |
<span>Identity provider domain added successfully.</span> |
80 |
[% CASE %] |
80 |
[% CASE %] |
81 |
<span>[% m.code | html %]</span> |
81 |
<span>[% m.code | html %]</span> |
82 |
[% END %] |
82 |
[% END %] |
83 |
</div> |
83 |
</div> |
84 |
[% END %] |
84 |
[% END %] |
85 |
|
85 |
|
86 |
<div class="dialog message" id="auth_provider_domain_delete_success" style="display: none;"></div> |
86 |
<div class="dialog message" id="identity_provider_domain_delete_success" style="display: none;"></div> |
87 |
<div class="dialog alert" id="auth_provider_domain_delete_error" style="display: none;"></div> |
87 |
<div class="dialog alert" id="identity_provider_domain_delete_error" style="display: none;"></div> |
88 |
|
88 |
|
89 |
[% IF op == 'add_form' %] |
89 |
[% IF op == 'add_form' %] |
90 |
<h1>New authentication provider domain</h1> |
90 |
<h1>New identity provider domain</h1> |
91 |
<form action="/cgi-bin/koha/admin/authentication_providers.pl" id="add" name="add" class="validated" method="post"> |
91 |
<form action="/cgi-bin/koha/admin/identity_providers.pl" id="add" name="add" class="validated" method="post"> |
92 |
<input type="hidden" name="op" value="add" /> |
92 |
<input type="hidden" name="op" value="add" /> |
93 |
<input type="hidden" name="domain_ops" value="1" /> |
93 |
<input type="hidden" name="domain_ops" value="1" /> |
94 |
<input type="hidden" name="auth_provider_id" value="[%- auth_provider_id | html -%]" /> |
94 |
<input type="hidden" name="identity_provider_id" value="[%- identity_provider_id | html -%]" /> |
95 |
<fieldset class="rows"> |
95 |
<fieldset class="rows"> |
96 |
<ol> |
96 |
<ol> |
97 |
<li> |
97 |
<li> |
Lines 140-146
Link Here
|
140 |
<option value="1" selected="selected">Allow</option> |
140 |
<option value="1" selected="selected">Allow</option> |
141 |
<option value="0">Don't allow</option> |
141 |
<option value="0">Don't allow</option> |
142 |
</select> |
142 |
</select> |
143 |
<span>opac users of this domain to login with this authentication provider</span> |
143 |
<span>opac users of this domain to login with this identity provider</span> |
144 |
</li> |
144 |
</li> |
145 |
<li> |
145 |
<li> |
146 |
<label for="allow_opac">Allow staff: </label> |
146 |
<label for="allow_opac">Allow staff: </label> |
Lines 154-176
Link Here
|
154 |
</fieldset> |
154 |
</fieldset> |
155 |
<fieldset class="action"> |
155 |
<fieldset class="action"> |
156 |
<input type="submit" value="Submit" /> |
156 |
<input type="submit" value="Submit" /> |
157 |
<a class="cancel" href="/cgi-bin/koha/admin/authentication_providers.pl?domain_ops=1&auth_provider_id=[%- auth_provider_id | html -%]">Cancel</a> |
157 |
<a class="cancel" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&identity_provider_id=[%- identity_provider_id | html -%]">Cancel</a> |
158 |
</fieldset> |
158 |
</fieldset> |
159 |
</form> |
159 |
</form> |
160 |
[% END %] |
160 |
[% END %] |
161 |
|
161 |
|
162 |
[% IF op == 'edit_form' %] |
162 |
[% IF op == 'edit_form' %] |
163 |
<h1>Edit authentication provider domain</h1> |
163 |
<h1>Edit identity provider domain</h1> |
164 |
<form action="/cgi-bin/koha/admin/authentication_providers.pl" id="edit_save" name="edit_save" class="validated" method="post"> |
164 |
<form action="/cgi-bin/koha/admin/identity_providers.pl" id="edit_save" name="edit_save" class="validated" method="post"> |
165 |
<input type="hidden" name="op" value="edit_save" /> |
165 |
<input type="hidden" name="op" value="edit_save" /> |
166 |
<input type="hidden" name="domain_ops" value="1" /> |
166 |
<input type="hidden" name="domain_ops" value="1" /> |
167 |
<input type="hidden" name="auth_provider_id" value="[%- auth_provider_id | html -%]" /> |
167 |
<input type="hidden" name="identity_provider_id" value="[%- identity_provider_id | html -%]" /> |
168 |
<input type="hidden" name="auth_provider_domain_id" value="[%- auth_provider_domain.auth_provider_domain_id | html -%]" /> |
168 |
<input type="hidden" name="identity_provider_domain_id" value="[%- identity_provider_domain.identity_provider_domain_id | html -%]" /> |
169 |
<fieldset class="rows"> |
169 |
<fieldset class="rows"> |
170 |
<ol> |
170 |
<ol> |
171 |
<li> |
171 |
<li> |
172 |
<label for="domain">Domain: </label> |
172 |
<label for="domain">Domain: </label> |
173 |
<input type="text" name="domain" id="domain" size="60" value="[%- auth_provider_domain.domain | html -%]"/> |
173 |
<input type="text" name="domain" id="domain" size="60" value="[%- identity_provider_domain.domain | html -%]"/> |
174 |
</li> |
174 |
</li> |
175 |
</ol> |
175 |
</ol> |
176 |
</fieldset> |
176 |
</fieldset> |
Lines 180-186
Link Here
|
180 |
<li> |
180 |
<li> |
181 |
<label for="update_on_auth">Update on login: </label> |
181 |
<label for="update_on_auth">Update on login: </label> |
182 |
<select name="update_on_auth" id="update_on_auth"> |
182 |
<select name="update_on_auth" id="update_on_auth"> |
183 |
[% IF auth_provider_domain.update_on_auth == "1" %] |
183 |
[% IF identity_provider_domain.update_on_auth == "1" %] |
184 |
<option value="1" selected="selected">Update</option> |
184 |
<option value="1" selected="selected">Update</option> |
185 |
<option value="0">Don't update</option> |
185 |
<option value="0">Don't update</option> |
186 |
[% ELSE %] |
186 |
[% ELSE %] |
Lines 193-199
Link Here
|
193 |
<li> |
193 |
<li> |
194 |
<label for="auto_register">Auto register: </label> |
194 |
<label for="auto_register">Auto register: </label> |
195 |
<select name="auto_register" id="auto_register"> |
195 |
<select name="auto_register" id="auto_register"> |
196 |
[% IF auth_provider_domain.auto_register == "1" %] |
196 |
[% IF identity_provider_domain.auto_register == "1" %] |
197 |
<option value="1" selected="selected">Allow</option> |
197 |
<option value="1" selected="selected">Allow</option> |
198 |
<option value="0">Don't allow</option> |
198 |
<option value="0">Don't allow</option> |
199 |
[% ELSE %] |
199 |
[% ELSE %] |
Lines 206-212
Link Here
|
206 |
<li> |
206 |
<li> |
207 |
<label for="default_library_id">Default library: </label> |
207 |
<label for="default_library_id">Default library: </label> |
208 |
<select id="default_library_id" name="default_library_id"> |
208 |
<select id="default_library_id" name="default_library_id"> |
209 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => auth_provider_domain.default_library_id, unfiltered => 1, do_not_select_my_library => 1 ) %] |
209 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => identity_provider_domain.default_library_id, unfiltered => 1, do_not_select_my_library => 1 ) %] |
210 |
</select> |
210 |
</select> |
211 |
</li> |
211 |
</li> |
212 |
<li> |
212 |
<li> |
Lines 214-220
Link Here
|
214 |
[% SET categories = Categories.all() %] |
214 |
[% SET categories = Categories.all() %] |
215 |
<select name="default_category_id" id="default_category_id"> |
215 |
<select name="default_category_id" id="default_category_id"> |
216 |
[% FOREACH category IN categories %] |
216 |
[% FOREACH category IN categories %] |
217 |
[% IF category.categorycode == auth_provider_domain.default_category_id %] |
217 |
[% IF category.categorycode == identity_provider_domain.default_category_id %] |
218 |
<option value="[% category.categorycode | html %]" selected="selected">[% category.description | html %]</option> |
218 |
<option value="[% category.categorycode | html %]" selected="selected">[% category.description | html %]</option> |
219 |
[% ELSE %] |
219 |
[% ELSE %] |
220 |
<option value="[% category.categorycode | html %]">[% category.description | html %]</option> |
220 |
<option value="[% category.categorycode | html %]">[% category.description | html %]</option> |
Lines 225-231
Link Here
|
225 |
<li> |
225 |
<li> |
226 |
<label for="allow_opac">Allow opac: </label> |
226 |
<label for="allow_opac">Allow opac: </label> |
227 |
<select name="allow_opac" id="allow_opac"> |
227 |
<select name="allow_opac" id="allow_opac"> |
228 |
[% IF auth_provider_domain.allow_opac == "1" %] |
228 |
[% IF identity_provider_domain.allow_opac == "1" %] |
229 |
<option value="1" selected="selected">Allow</option> |
229 |
<option value="1" selected="selected">Allow</option> |
230 |
<option value="0">Don't allow</option> |
230 |
<option value="0">Don't allow</option> |
231 |
[% ELSE %] |
231 |
[% ELSE %] |
Lines 233-244
Link Here
|
233 |
<option value="0" selected="selected">Don't allow</option> |
233 |
<option value="0" selected="selected">Don't allow</option> |
234 |
[% END %] |
234 |
[% END %] |
235 |
</select> |
235 |
</select> |
236 |
<span>opac users of this domain to login with this authentication provider</span> |
236 |
<span>opac users of this domain to login with this identity provider</span> |
237 |
</li> |
237 |
</li> |
238 |
<li> |
238 |
<li> |
239 |
<label for="allow_opac">Allow staff: </label> |
239 |
<label for="allow_opac">Allow staff: </label> |
240 |
<select name="allow_staff" id="allow_staff"> |
240 |
<select name="allow_staff" id="allow_staff"> |
241 |
[% IF auth_provider_domain.allow_staff == "1" %] |
241 |
[% IF identity_provider_domain.allow_staff == "1" %] |
242 |
<option value="1" selected="selected">Allow</option> |
242 |
<option value="1" selected="selected">Allow</option> |
243 |
<option value="0">Don't allow</option> |
243 |
<option value="0">Don't allow</option> |
244 |
[% ELSE %] |
244 |
[% ELSE %] |
Lines 246-258
Link Here
|
246 |
<option value="0" selected="selected">Don't allow</option> |
246 |
<option value="0" selected="selected">Don't allow</option> |
247 |
[% END %] |
247 |
[% END %] |
248 |
</select> |
248 |
</select> |
249 |
<span>staff users of this domain to login with this authentication provider</span> |
249 |
<span>staff users of this domain to login with this identity provider</span> |
250 |
</li> |
250 |
</li> |
251 |
</ol> |
251 |
</ol> |
252 |
</fieldset> |
252 |
</fieldset> |
253 |
<fieldset class="action"> |
253 |
<fieldset class="action"> |
254 |
<input type="submit" value="Submit" /> |
254 |
<input type="submit" value="Submit" /> |
255 |
<a class="cancel" href="/cgi-bin/koha/admin/authentication_providers.pl?domain_ops=1&auth_provider_id=[%- auth_provider_id | html -%]">Cancel</a> |
255 |
<a class="cancel" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&identity_provider_id=[%- identity_provider_id | html -%]">Cancel</a> |
256 |
</fieldset> |
256 |
</fieldset> |
257 |
</form> |
257 |
</form> |
258 |
[% END %] |
258 |
[% END %] |
Lines 260-271
Link Here
|
260 |
[% IF op == 'list' %] |
260 |
[% IF op == 'list' %] |
261 |
|
261 |
|
262 |
<div id="toolbar" class="btn-toolbar"> |
262 |
<div id="toolbar" class="btn-toolbar"> |
263 |
<a class="btn btn-default" id="new_auth_provider_domain" href="/cgi-bin/koha/admin/authentication_providers.pl?domain_ops=1&auth_provider_id=[%- auth_provider_id | html -%]&op=add_form"><i class="fa fa-plus"></i> New authentication provider domain</a> |
263 |
<a class="btn btn-default" id="new_identity_provider_domain" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&identity_provider_id=[%- identity_provider_id | html -%]&op=add_form"><i class="fa fa-plus"></i> New identity provider domain</a> |
264 |
</div> |
264 |
</div> |
265 |
|
265 |
|
266 |
<h1>Authentication provider domains</h1> |
266 |
<h1>Identity provider domains</h1> |
267 |
|
267 |
|
268 |
<table id="auth_provider_domains"> |
268 |
<table id="identity_provider_domains"> |
269 |
<thead> |
269 |
<thead> |
270 |
<tr> |
270 |
<tr> |
271 |
<th>Domain</th> |
271 |
<th>Domain</th> |
Lines 286-292
Link Here
|
286 |
<div class="modal-content"> |
286 |
<div class="modal-content"> |
287 |
<div class="modal-header"> |
287 |
<div class="modal-header"> |
288 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ă—</button> |
288 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ă—</button> |
289 |
<h3 id="delete_confirm_modal_label">Delete authentication provider domain</h3> |
289 |
<h3 id="delete_confirm_modal_label">Delete identity provider domain</h3> |
290 |
</div> |
290 |
</div> |
291 |
<div class="modal-body"> |
291 |
<div class="modal-body"> |
292 |
<div id="delete_confirm_dialog"></div> |
292 |
<div id="delete_confirm_dialog"></div> |
Lines 316-322
Link Here
|
316 |
<script> |
316 |
<script> |
317 |
$(document).ready(function() { |
317 |
$(document).ready(function() { |
318 |
|
318 |
|
319 |
var auth_provider_domains_url = '/api/v1/auth/providers/[%- auth_provider_id | html -%]/domains'; |
319 |
var identity_provider_domains_url = '/api/v1/auth/identity_providers/[%- identity_provider_id | html -%]/domains'; |
320 |
[% SET categories = Categories.all() %] |
320 |
[% SET categories = Categories.all() %] |
321 |
var categories = { |
321 |
var categories = { |
322 |
[% FOREACH category IN categories %] |
322 |
[% FOREACH category IN categories %] |
Lines 329-340
Link Here
|
329 |
"[% library.branchcode | html %]": "[% library.branchname | html %]", |
329 |
"[% library.branchcode | html %]": "[% library.branchname | html %]", |
330 |
[% END %] |
330 |
[% END %] |
331 |
}; |
331 |
}; |
332 |
window.auth_provider_domains = $("#auth_provider_domains").kohaTable({ |
332 |
window.identity_provider_domains = $("#identity_provider_domains").kohaTable({ |
333 |
"ajax": { |
333 |
"ajax": { |
334 |
"url": auth_provider_domains_url |
334 |
"url": identity_provider_domains_url |
335 |
}, |
335 |
}, |
336 |
'language': { |
336 |
'language': { |
337 |
'emptyTable': '<div class="dialog message">'+_("There are no authentication provider domains defined.")+'</div>' |
337 |
'emptyTable': '<div class="dialog message">'+_("There are no identity provider domains defined.")+'</div>' |
338 |
}, |
338 |
}, |
339 |
"columnDefs": [ { |
339 |
"columnDefs": [ { |
340 |
"targets": [1], |
340 |
"targets": [1], |
Lines 424-431
Link Here
|
424 |
}, |
424 |
}, |
425 |
{ |
425 |
{ |
426 |
"data": function( row, type, val, meta ) { |
426 |
"data": function( row, type, val, meta ) { |
427 |
var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/authentication_providers.pl?domain_ops=1&auth_provider_id=[%- auth_provider_id | html -%]&op=edit_form&auth_provider_domain_id='+ encodeURIComponent(row.auth_provider_domain_id) +'"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n"; |
427 |
var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&identity_provider_id=[%- identity_provider_id | html -%]&op=edit_form&identity_provider_domain_id='+ encodeURIComponent(row.identity_provider_domain_id) +'"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n"; |
428 |
result += '<a class="btn btn-default btn-xs delete_auth_provider_domain" role="button" href="#" data-toggle="modal" data-target="#delete_confirm_modal" data-auth-provider-domain-id="'+ encodeURIComponent(row.auth_provider_domain_id) +'" data-auth-provider-domain="'+ encodeURIComponent((row.domain || '').escapeHtml()) +'"><i class="fa fa-trash" aria-hidden="true"></i> '+_("Delete")+'</a>'; |
428 |
result += '<a class="btn btn-default btn-xs delete_identity_provider_domain" role="button" href="#" data-toggle="modal" data-target="#delete_confirm_modal" data-auth-provider-domain-id="'+ encodeURIComponent(row.identity_provider_domain_id) +'" data-auth-provider-domain="'+ encodeURIComponent((row.domain || '').escapeHtml()) +'"><i class="fa fa-trash" aria-hidden="true"></i> '+_("Delete")+'</a>'; |
429 |
return result; |
429 |
return result; |
430 |
}, |
430 |
}, |
431 |
"searchable": false, |
431 |
"searchable": false, |
Lines 439-470
Link Here
|
439 |
}, |
439 |
}, |
440 |
}); |
440 |
}); |
441 |
|
441 |
|
442 |
$('#auth_provider_domains').on( "click", '.delete_auth_provider_domain', function () { |
442 |
$('#identity_provider_domains').on( "click", '.delete_identity_provider_domain', function () { |
443 |
var auth_provider_domain_id = $(this).data('auth-provider-domain-id'); |
443 |
var identity_provider_domain_id = $(this).data('auth-provider-domain-id'); |
444 |
var auth_provider_domain = decodeURIComponent($(this).data('auth-provider-domain')); |
444 |
var identity_provider_domain = decodeURIComponent($(this).data('auth-provider-domain')); |
445 |
|
445 |
|
446 |
$("#delete_confirm_dialog").html( |
446 |
$("#delete_confirm_dialog").html( |
447 |
_("You are about to delete the '%s' authentication provider domain.").format(auth_provider_domain) |
447 |
_("You are about to delete the '%s' identity provider domain.").format(identity_provider_domain) |
448 |
); |
448 |
); |
449 |
$("#delete_confirm_modal_button").data('auth-provider-domain-id', auth_provider_domain_id); |
449 |
$("#delete_confirm_modal_button").data('auth-provider-domain-id', identity_provider_domain_id); |
450 |
$("#delete_confirm_modal_button").data('auth-provider-domain', auth_provider_domain); |
450 |
$("#delete_confirm_modal_button").data('auth-provider-domain', identity_provider_domain); |
451 |
}); |
451 |
}); |
452 |
|
452 |
|
453 |
$("#delete_confirm_modal_button").on( "click", function () { |
453 |
$("#delete_confirm_modal_button").on( "click", function () { |
454 |
|
454 |
|
455 |
var auth_provider_domain_id = $(this).data('auth-provider-domain-id'); |
455 |
var identity_provider_domain_id = $(this).data('auth-provider-domain-id'); |
456 |
var auth_provider_domain = $(this).data('auth-provider-domain'); |
456 |
var identity_provider_domain = $(this).data('auth-provider-domain'); |
457 |
|
457 |
|
458 |
$.ajax({ |
458 |
$.ajax({ |
459 |
method: "DELETE", |
459 |
method: "DELETE", |
460 |
url: auth_provider_domains_url+"/"+auth_provider_domain_id |
460 |
url: identity_provider_domains_url+"/"+identity_provider_domain_id |
461 |
}).success(function() { |
461 |
}).success(function() { |
462 |
window.auth_provider_domains.api().ajax.reload(function (data) { |
462 |
window.identity_provider_domains.api().ajax.reload(function (data) { |
463 |
$("#smtp_action_result_dialog").hide(); |
463 |
$("#smtp_action_result_dialog").hide(); |
464 |
$("#smtp_delete_success").html(_("Server '%s' deleted successfully.").format(auth_provider_domain)).show(); |
464 |
$("#smtp_delete_success").html(_("Server '%s' deleted successfully.").format(identity_provider_domain)).show(); |
465 |
}); |
465 |
}); |
466 |
}).fail(function () { |
466 |
}).fail(function () { |
467 |
$("#smtp_delete_error").html(_("Error deleting server '%s'. Check the logs.").format(auth_provider_domain)).show(); |
467 |
$("#smtp_delete_error").html(_("Error deleting server '%s'. Check the logs.").format(identity_provider_domain)).show(); |
468 |
}).done(function () { |
468 |
}).done(function () { |
469 |
$("#delete_confirm_modal").modal('hide'); |
469 |
$("#delete_confirm_modal").modal('hide'); |
470 |
}); |
470 |
}); |