commit
c4b147c3e5
31 changed files with 704 additions and 154 deletions
29
realms/templates/auth/ldap/login.html
Normal file
29
realms/templates/auth/ldap/login.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% from 'macros.html' import render_form, render_field %}
|
||||
{% if config.get('AUTH_LOCAL_ENABLE') %}
|
||||
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#ldap-modal">
|
||||
<i class="fa fa-folder-open-o"></i> Login with LDAP
|
||||
</button>
|
||||
|
||||
<div class="modal fade" id="ldap-modal" tabindex="-1" role="dialog" aria-labelledby="ldap-login">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="ldap-login">LDAP Login</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% call render_form(form, action_url=url_for('auth.ldap.login'), action_text='Login', btn_class='btn btn-primary') %}
|
||||
{{ render_field(form.username, placeholder='Username', type='text', required=1) }}
|
||||
{{ render_field(form.password, placeholder='Password', type='password', required=1) }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3><i class="fa fa-folder-open-o"></i> LDAP Login</h3>
|
||||
{% call render_form(form, action_url=url_for('auth.ldap.login'), action_text='Login', btn_class='btn btn-primary') %}
|
||||
{{ render_field(form.username, placeholder='Username', type='text', required=1) }}
|
||||
{{ render_field(form.password, placeholder='Password', type='password', required=1) }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
5
realms/templates/auth/local/login.html
Normal file
5
realms/templates/auth/local/login.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% from 'macros.html' import render_form, render_field %}
|
||||
{% call render_form(form, action_url=url_for('auth.local.login'), action_text='Login', btn_class='btn btn-primary') %}
|
||||
{{ render_field(form.email, placeholder='Email', type='email', required=1) }}
|
||||
{{ render_field(form.password, placeholder='Password', type='password', required=1) }}
|
||||
{% endcall %}
|
|
@ -1,8 +1,4 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% from 'macros.html' import render_form, render_field %}
|
||||
{% block body %}
|
||||
{% call render_form(form, action_url=url_for('auth.login'), action_text='Login', btn_class='btn btn-primary') %}
|
||||
{{ render_field(form.email, placeholder='Email', type='email', required=1) }}
|
||||
{{ render_field(form.password, placeholder='Password', type='password', required=1) }}
|
||||
{% endcall %}
|
||||
{{ forms|safe }}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% from 'macros.html' import render_form, render_field %}
|
||||
{% block body %}
|
||||
{% call render_form(form, action_url=url_for('auth.register'), action_text='Register', btn_class='btn btn-primary') %}
|
||||
{% call render_form(form, action_url=url_for('auth.local.register'), action_text='Register', btn_class='btn btn-primary') %}
|
||||
{{ render_field(form.username, placeholder='Username', type='username', **{"required": 1, "data-parsley-type": "alphanum"}) }}
|
||||
{{ render_field(form.email, placeholder='Email', type='email', required=1) }}
|
||||
{{ render_field(form.password, placeholder='Password', type='password', **{"required": 1, "data-parsley-minlength": "6"}) }}
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
<div class="navbar-collapse collapse navbar-inverse-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% if config.get('ROOT_ENDPOINT') != 'wiki.index' %}
|
||||
<li><a href="{{ url_for('wiki.index') }}"><i class="fa fa-list"></i> Index</a></li>
|
||||
<li><a href="{{ url_for('wiki.index') }}"><i class="fa fa-list"></i><span class="hidden-sm"> Index</span></a></li>
|
||||
{% endif %}
|
||||
<li><a href="{{ url_for('wiki.create') }}"><i class="fa fa-plus"></i> New</a></li>
|
||||
<li><a href="{{ url_for('wiki.create') }}"><i class="fa fa-plus"></i><span class="hidden-sm"> New</span></a></li>
|
||||
{% if name %}
|
||||
<li><a href="{{ url_for('wiki.edit', name=name) }}"><i class="fa fa-pencil"></i> Edit</a></li>
|
||||
<li><a href="{{ url_for('wiki.history', name=name) }}"><i class="fa fa-clock-o"></i> History</a></li>
|
||||
<li><a href="{{ url_for('wiki.edit', name=name) }}"><i class="fa fa-pencil"></i><span class="hidden-sm"> Edit</span></a></li>
|
||||
<li><a href="{{ url_for('wiki.history', name=name) }}"><i class="fa fa-clock-o"></i><span class="hidden-sm"> History</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
|
@ -73,8 +73,8 @@
|
|||
</li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for('auth.login') }}"><i class="fa fa-user"></i> Login</a></li>
|
||||
{% if config.REGISTRATION_ENABLED %}
|
||||
<li><a href="{{ url_for('auth.register') }}"><i class="fa fa-users"></i> Register</a></li>
|
||||
{% if config.REGISTRATION_ENABLED and 'auth.local' in config.MODULES %}
|
||||
<li><a href="{{ url_for('auth.local.register') }}"><i class="fa fa-users"></i> Register</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<button class="btn btn-default btn-sm dropdown-toggle" type="button" id="editor-actions"
|
||||
data-toggle="dropdown" title="Actions">
|
||||
<i class="fa fa-cog"></i>
|
||||
<span class="hidden-xs">Actions <i class="fa fa-caret-down"></i></span>
|
||||
<span class="hidden-xs hidden-sm">Actions <i class="fa fa-caret-down"></i></span>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="editor-actions">
|
||||
|
@ -100,7 +100,7 @@
|
|||
<button id="theme-list-btn" type="button" class="dropdown-toggle btn btn-default btn-sm"
|
||||
data-toggle="dropdown" title="Change Theme">
|
||||
<i class="fa fa-paint-brush"></i>
|
||||
<span class="hidden-xs">Theme <i class="fa fa-caret-down"></i></span>
|
||||
<span class="hidden-xs hidden-sm">Theme <i class="fa fa-caret-down"></i></span>
|
||||
</button>
|
||||
<ul id="theme-list" class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="theme-list">
|
||||
<li><a tabindex="-1" href="#" data-value="chrome" >Chrome</a></li>
|
||||
|
@ -141,7 +141,7 @@
|
|||
{% else %}
|
||||
<a id="submit-btn" class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-save"></i>
|
||||
<span class="hidden-xs">Publish</span>
|
||||
<span class="hidden-xs">Save</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue