Commit c9369db5 authored by ibuler's avatar ibuler

Add new login page

parent d70deaf1
.red-fonts {
color: #ed5565;
}
.form-group.required .control-label:after {
content: " *";
color: red;
}
.n-invalid {border: 1px solid #f00;}
.primary-panel {
border-color: #1ab394;
border-style: solid;
border-width: 1px
}
.info-panel {
border-color: #23c6c8;
border-style: solid;
border-width: 1px
}
th a {
color: #676a6c;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -36,8 +36,6 @@
var csrftoken = getCookie('csrftoken');
var sessionid = getCookie('sessionid');
console.log(csrftoken);
console.log(sessionid);
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
......
......@@ -18,7 +18,7 @@
</a>
</li>
<li>
<a href="">
<a href="{% url 'users:logout' %}">
<i class="fa fa-sign-out"></i> Log out
</a>
</li>
......
{% load static %}
{% load bootstrap %}
{#{% load bootstrap %}#}
<!DOCTYPE html>
<html>
......@@ -9,40 +9,78 @@
<title> JumpServer </title>
<link rel="shortcut icon" href="{% static "img/facio.ico" %}" type="image/x-icon">
{% include '_head_css_js.html' %}
<link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">
<link href="{% static "css/style.css" %}" rel="stylesheet">
<script src="{% static "js/base.js" %}"></script>
<link href="{% static "css/animate.css" %}" rel="stylesheet">
<link href="{% static "css/font-awesome.css" %}" rel="stylesheet">
{# <script src="{% static "js/base.js" %}"></script>#}
</head>
<body class="gray-bg">
<div class="middle-box text-center loginscreen animated fadeInDown">
<div>
<div>
<h1 class="logo-name"><img src="{% static "/img/logo.png" %}"></h1>
</div>
{% if error %}
<div class="alert alert-danger text-center">{{ error }}</div>
{% endif %}
<h2>Welcome to Jumpserver</h2>
<form class="m-t" role="form" method="post" action="">
{% csrf_token %}
<div class="loginColumns animated fadeInDown">
<div class="row">
<div class="col-md-6">
<h2 class="font-bold">Welcome to IN+</h2>
<p>
Perfectly designed and precisely prepared admin theme with over 50 pages with extra new web app views.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
</p>
<p>
When an unknown printer took a galley of type and scrambled it to make a type specimen book.
</p>
<p>
<small>It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</small>
</p>
</div>
<div class="col-md-6">
<div class="ibox-content">
<form class="m-t" role="form" action="index.html">
<div class="form-group">
<input id="{{ form.username.id_for_label }}" name="{{ form.username.html_name }}" type="text" value="{{ user.username }}" class="form-control" placeholder="Username">
<input type="email" class="form-control" placeholder="Username" required="">
</div>
<div class="form-group">
<input id="{{ form.password.id_for_label }}" name="{{ form.password.html_name }}" type="password" value="{{ user.password }}" class="form-control" placeholder="Password">
<input type="password" class="form-control" placeholder="Password" required="">
</div>
<button type="submit" class="btn btn-primary block full-width m-b">Login</button>
<a href=""><small>Forgot password? </small></a>
<a href="#">
<small>Forgot password?</small>
</a>
<p class="text-muted text-center">
<small>Do not have an account?</small>
</p>
<a class="btn btn-sm btn-white btn-block" href="register.html">Create an account</a>
</form>
<p class="m-t"> <small><b>Copyright</b> Jumpserver.org Organization © 2014-2015</small> </p>
<p class="m-t">
<small>Inspinia we app framework base on Bootstrap 3 &copy; 2014</small>
</p>
</div>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-6">
Copyright Example Company
</div>
<div class="col-md-6 text-right">
<small>© 2014-2015</small>
</div>
</div>
</div>
{% include '_foot_js.html' %}
</body>
</html>
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import UserListView, UserAddView, UserUpdateView, UserDeleteView, UserDetailView, UserLoginView
from .views import UserGroupListView, UserGroupAddView, UserGroupUpdateView, UserGroupDeleteView, UserGroupDetailView
import views
import api
app_name = 'users'
urlpatterns = [
url(r'^login/$', UserLoginView.as_view(), name='login'),
url(r'^users/$', UserListView.as_view(), name='user-list'),
url(r'^users/(?P<pk>[0-9]+)/$', UserDetailView.as_view(), name='user-detail'),
url(r'^users/add/$', UserAddView.as_view(), name='user-add'),
url(r'^users/(?P<pk>[0-9]+)/edit/$', UserUpdateView.as_view(), name='user-edit'),
url(r'^users/(?P<pk>[0-9]+)/delete/$', UserDeleteView.as_view(), name='user-delete'),
url(r'^usergroups/$', UserGroupListView.as_view(), name='usergroup-list'),
url(r'^usergroups/(?P<pk>[0-9]+)/$', UserGroupDetailView.as_view(), name='usergroup-detail'),
url(r'^usergroups/add/$', UserGroupAddView.as_view(), name='usergroup-add'),
url(r'^usergroups/(?P<pk>[0-9]+)/edit/$', UserGroupUpdateView.as_view(), name='usergroup-edit'),
url(r'^usergroups/(?P<pk>[0-9]+)/delete/$', UserGroupDeleteView.as_view(), name='usergroup-delete'),
url(r'^login$', auth_views.login, {'template_name': 'users/login.html'}, name='login'),
url(r'^logout$', auth_views.logout, {'template_name': 'users/login.html'}, name='logout'),
url(r'^password/forget-password$', views.UserForgetPasswordView.as_view(), name='forget-password'),
url(r'^password/reset-password$', views.UserRestPasswordView.as_view(), name='reset-password'),
url(r'^users$', views.UserListView.as_view(), name='user-list'),
url(r'^users/(?P<pk>[0-9]+)$', views.UserDetailView.as_view(), name='user-detail'),
url(r'^users/add$', views.UserAddView.as_view(), name='user-add'),
url(r'^users/(?P<pk>[0-9]+)/edit$', views.UserUpdateView.as_view(), name='user-edit'),
url(r'^users/(?P<pk>[0-9]+)/delete$', views.UserDeleteView.as_view(), name='user-delete'),
url(r'^usergroups$', views.UserGroupListView.as_view(), name='usergroup-list'),
url(r'^usergroups/(?P<pk>[0-9]+)$', views.UserGroupDetailView.as_view(), name='usergroup-detail'),
url(r'^usergroups/add/$', views.UserGroupAddView.as_view(), name='usergroup-add'),
url(r'^usergroups/(?P<pk>[0-9]+)/edit$', views.UserGroupUpdateView.as_view(), name='usergroup-edit'),
url(r'^usergroups/(?P<pk>[0-9]+)/delete$', views.UserGroupDeleteView.as_view(), name='usergroup-delete'),
]
......
......@@ -8,7 +8,7 @@ from django.shortcuts import get_object_or_404, reverse, render
from django.http import HttpResponseRedirect
from django.urls import reverse_lazy
from django.db.models import Q
from django.views.generic.base import TemplateResponseMixin
from django.views.generic.base import View
from django.views.generic.list import ListView
from django.views.generic.edit import CreateView, DeleteView, UpdateView, ProcessFormView, FormView
from django.views.generic.detail import DetailView
......@@ -203,3 +203,11 @@ class UserGroupDetailView(DetailView):
class UserGroupDeleteView(DeleteView):
pass
class UserForgetPasswordView(View):
pass
class UserRestPasswordView(View):
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment