##// END OF EJS Templates
system-info: expose base_url
system-info: expose base_url

File last commit:

r3233:4c12f36b default
r3236:e37f5984 default
Show More
auth_settings.mako
124 lines | 3.9 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.mako"/>
<%def name="title()">
${_('Authentication Settings')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}}
%endif
</%def>
<%def name="breadcrumbs_links()">
audit-logs: introduced new view to replace admin journal....
r1758 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
templating: use .mako as extensions for template files.
r1282 &raquo;
${_('Authentication Plugins')}
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='admin')}
</%def>
<%def name="main()">
<div class="box">
<div class="title">
${self.breadcrumbs()}
</div>
<div class='sidebar-col-wrapper'>
<div class="sidebar">
<ul class="nav nav-pills nav-stacked">
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233 % for item in resource.get_root().get_nav_list(sort=False):
templating: use .mako as extensions for template files.
r1282 <li ${'class=active' if item == resource else ''}>
<a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a>
</li>
% endfor
</ul>
</div>
<div class="main-content-full-width">
pyramid: if possible fetch csrf tokens from pyramid session....
r1918 ${h.secure_form(request.resource_path(resource, route_name='auth_home'), request=request)}
templating: use .mako as extensions for template files.
r1282 <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_("Enabled and Available Plugins")}</h3>
</div>
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233 <div class="panel-body">
templating: use .mako as extensions for template files.
r1282
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233
<div class="label">${_("Ordered Enabled Plugins")}</div>
templating: use .mako as extensions for template files.
r1282 <div class="textarea text-area editor">
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233 ${h.textarea('auth_plugins',cols=120,rows=20,class_="medium")}
templating: use .mako as extensions for template files.
r1282 </div>
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233 <div class="field">
<p class="help-block pre-formatting">${_('List of plugins, separated by commas.'
auth-plugins: use a nicer visual display of auth plugins that would highlight that order is...
r2659 '\nThe order of the plugins is also the order in which '
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233 'RhodeCode Enterprise will try to authenticate a user.')}
</p>
</div>
templating: use .mako as extensions for template files.
r1282
auth-plugins: updated UI for authentication plugins, and allow unsorted (in order of registration) display of plugins.
r3233 <table class="rctable">
<th>${_('Activate')}</th>
<th>${_('Plugin Name')}</th>
<th>${_('Documentation')}</th>
<th>${_('Plugin ID')}</th>
%for plugin in available_plugins:
<tr>
<td>
<span plugin_id="${plugin.get_id()}" class="toggle-plugin btn ${'btn-success' if plugin.get_id() in enabled_plugins else ''}">
${_('enabled') if plugin.get_id() in enabled_plugins else _('disabled')}
</span>
</td>
<td>${plugin.get_display_name()}</td>
<td>
% if plugin.docs():
<a href="${plugin.docs()}">docs</a>
% endif
</td>
<td>${plugin.get_id()}</td>
</tr>
%endfor
</table>
templating: use .mako as extensions for template files.
r1282
<div class="buttons">
${h.submit('save',_('Save'),class_="btn")}
</div>
</div>
</div>
${h.end_form()}
</div>
</div>
</div>
<script>
$('.toggle-plugin').click(function(e){
var auth_plugins_input = $('#auth_plugins');
auth-plugins: use a nicer visual display of auth plugins that would highlight that order is...
r2659 var elems = [];
$.each(auth_plugins_input.val().split(',') , function (index, element) {
if (element !== "") {
elems.push(element.strip())
}
});
templating: use .mako as extensions for template files.
r1282 var cur_button = e.currentTarget;
var plugin_id = $(cur_button).attr('plugin_id');
if($(cur_button).hasClass('btn-success')){
elems.splice(elems.indexOf(plugin_id), 1);
auth-plugins: use a nicer visual display of auth plugins that would highlight that order is...
r2659 auth_plugins_input.val(elems.join(',\n'));
templating: use .mako as extensions for template files.
r1282 $(cur_button).removeClass('btn-success');
cur_button.innerHTML = _gettext('disabled');
}
else{
if(elems.indexOf(plugin_id) == -1){
elems.push(plugin_id);
}
auth-plugins: use a nicer visual display of auth plugins that would highlight that order is...
r2659 auth_plugins_input.val(elems.join(',\n'));
templating: use .mako as extensions for template files.
r1282 $(cur_button).addClass('btn-success');
cur_button.innerHTML = _gettext('enabled');
}
});
</script>
</%def>