修改登录背景
BIN
yizuo_login_background_and_styles/.DS_Store
vendored
Normal file
2
yizuo_login_background_and_styles/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import controllers
|
||||
from . import models
|
||||
28
yizuo_login_background_and_styles/__manifest__.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
{
|
||||
'name': 'Login Background And Styles',
|
||||
'version': '16.0.2.0.0',
|
||||
'category': 'website',
|
||||
'summary': """
|
||||
You can customised login page like add background image or color and change position of login form.
|
||||
""",
|
||||
'author': 'YiZuo ltd.,',
|
||||
'website': 'https://www.yizuo.ltd',
|
||||
'license': 'AGPL-3',
|
||||
'depends': ['base', 'base_setup', 'web', 'auth_signup'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/login_image.xml',
|
||||
'templates/assets.xml',
|
||||
'templates/left_login_template.xml',
|
||||
'templates/right_login_template.xml',
|
||||
'templates/middle_login_template.xml',
|
||||
],
|
||||
'qweb': [
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'images': ['static/description/banner.png'],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from . import main
|
||||
149
yizuo_login_background_and_styles/controllers/main.py
Normal file
@@ -0,0 +1,149 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Changsha Yizuo Intelligent Technology Co., Ltd.
|
||||
#
|
||||
# Copyright (C) 2020-TODAY Yizuo Intelligent Technology.(<https://www.yizuo.ltd>).
|
||||
# Author: Van(v16)(pengyb@yizuo.ltd)
|
||||
#
|
||||
# You can modify it under the terms of the GNU AFFERO
|
||||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
|
||||
#
|
||||
# This program 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 (AGPL v3) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
# (AGPL v3) along with this program.
|
||||
# If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
try:
|
||||
import httpagentparser
|
||||
except ImportError:
|
||||
pass
|
||||
from time import gmtime, strftime
|
||||
from odoo.addons.web.controllers import home
|
||||
from odoo.http import request
|
||||
from odoo.exceptions import Warning
|
||||
import odoo
|
||||
import odoo.modules.registry
|
||||
from odoo.tools.translate import _
|
||||
from odoo import http
|
||||
|
||||
|
||||
class Home(home.Home):
|
||||
|
||||
@http.route('/web/login', type='http', auth="public")
|
||||
def web_login(self, redirect=None, **kw):
|
||||
home.ensure_db()
|
||||
request.params['login_success'] = False
|
||||
if request.httprequest.method == 'GET' and redirect and request.session.uid:
|
||||
return request.redirect(redirect)
|
||||
|
||||
if not request.uid:
|
||||
request.uid = odoo.SUPERUSER_ID
|
||||
|
||||
values = request.params.copy()
|
||||
try:
|
||||
values['databases'] = http.db_list()
|
||||
except odoo.exceptions.AccessDenied:
|
||||
values['databases'] = None
|
||||
if request.httprequest.method == 'POST':
|
||||
old_uid = request.uid
|
||||
uid = request.session.authenticate(request.session.db,
|
||||
request.params['login'],
|
||||
request.params['password'])
|
||||
if uid is not False:
|
||||
# user_rec = request.env['res.users'].sudo().search(
|
||||
# [('id', '=', uid)])
|
||||
# if user_rec.partner_id.email and user_rec.has_group(
|
||||
# 'user_login_alert.receive_login_notification'):
|
||||
# send_mail = 0
|
||||
# agent = request.httprequest.environ.get('HTTP_USER_AGENT')
|
||||
# agent_details = httpagentparser.detect(agent)
|
||||
# user_os = agent_details['os']['name']
|
||||
# browser_name = agent_details['browser']['name']
|
||||
# ip_address = request.httprequest.environ['REMOTE_ADDR']
|
||||
# if user_rec.last_logged_ip and user_rec.last_logged_browser and user_rec.last_logged_os:
|
||||
# if user_rec.last_logged_ip != ip_address or user_rec.last_logged_browser != browser_name or user_rec.last_logged_os != user_os:
|
||||
# send_mail = 1
|
||||
# user_rec.last_logged_ip = ip_address
|
||||
# user_rec.last_logged_browser = browser_name
|
||||
# user_rec.last_logged_os = user_os
|
||||
# else:
|
||||
# send_mail = 0
|
||||
# else:
|
||||
# send_mail = 1
|
||||
# user_rec.last_logged_ip = ip_address
|
||||
# user_rec.last_logged_browser = browser_name
|
||||
# user_rec.last_logged_os = user_os
|
||||
# if send_mail == 1:
|
||||
# email_to = user_rec.partner_id.email
|
||||
# current_date_time = strftime("%Y-%m-%d %H:%M:%S",
|
||||
# gmtime())
|
||||
# message_body = 'Hi ' + user_rec.name + ' , Your account has been ' \
|
||||
# 'accessed successfully. The details of the ' \
|
||||
# 'system from which the account is accessed ...,'
|
||||
# message_body += '<table border="1" width="100%" cellpadding="0" bgcolor="#ededed">'
|
||||
# message_body += '<tr><td>' + 'OS' + '</td>' \
|
||||
# '<td>' + user_os + '</td>' \
|
||||
# '</tr>' \
|
||||
# '<tr><td>' + 'Browser' + '</td>' \
|
||||
# '<td>' + browser_name + '</td>' \
|
||||
# '</tr>' \
|
||||
# '<tr><td>' + 'IP Address' + '</td>' \
|
||||
# '<td>' + ip_address + '</td>' \
|
||||
# '</tr>'
|
||||
# message_body += '</table>'
|
||||
# message_body += 'Thank you'
|
||||
# template_obj = request.env['mail.mail']
|
||||
# template_data = {
|
||||
# 'subject': 'Login Alert : ' + current_date_time,
|
||||
# 'body_html': message_body,
|
||||
# 'email_from': request.env.user.company_id.email,
|
||||
# 'email_to': email_to
|
||||
# }
|
||||
# template_id = template_obj.create(template_data)
|
||||
# template_obj.send(template_id)
|
||||
request.params['login_success'] = True
|
||||
if not redirect:
|
||||
redirect = '/web'
|
||||
return request.redirect(
|
||||
self._login_redirect(uid, redirect=redirect))
|
||||
request.uid = old_uid
|
||||
values['error'] = _("Wrong login/password")
|
||||
|
||||
# get confi login set
|
||||
param_obj = request.env['ir.config_parameter'].sudo()
|
||||
values['reset_password_enabled'] = param_obj.get_param('auth_signup.reset_password')
|
||||
values['signup_enabled'] = param_obj.get_param('auth_signup.invitation_scope') == 'b2c'
|
||||
values['disable_footer'] = param_obj.get_param('disable_footer')
|
||||
style = param_obj.get_param('login_background.style')
|
||||
background = param_obj.get_param('login_background.background')
|
||||
values['background_color'] = param_obj.get_param('login_background.color')
|
||||
background_image = param_obj.get_param('login_background.background_image')
|
||||
|
||||
if background == 'image':
|
||||
image_url = ''
|
||||
if background_image:
|
||||
base_url = param_obj.get_param('web.base.url')
|
||||
image_url = base_url + '/web/image?' + 'model=login.image&id=' + background_image + '&field=image'
|
||||
values['background_src'] = image_url or ''
|
||||
values['background_color'] = ''
|
||||
|
||||
if background == 'color':
|
||||
values['background_src'] = ''
|
||||
|
||||
if style == 'default' or style is False:
|
||||
response = request.render('web.login', values)
|
||||
elif style == 'left':
|
||||
response = request.render('yizuo_login_background_and_styles.left_login_template', values)
|
||||
elif style == 'right':
|
||||
response = request.render('yizuo_login_background_and_styles.right_login_template', values)
|
||||
else:
|
||||
response = request.render('yizuo_login_background_and_styles.middle_login_template', values)
|
||||
|
||||
response.headers['X-Frame-Options'] = 'DENY'
|
||||
return response
|
||||
5
yizuo_login_background_and_styles/models/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import res_config_settings
|
||||
from . import login_image
|
||||
# from . import website
|
||||
10
yizuo_login_background_and_styles/models/login_image.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class LoginImage(models.Model):
|
||||
_name = 'login.image'
|
||||
_rec_name = 'name'
|
||||
|
||||
image = fields.Binary(string="Image")
|
||||
name = fields.Char(string="Name")
|
||||
@@ -0,0 +1,51 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models, modules
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
style = fields.Selection([('default', 'Default'), ('left', 'Left'), ('right', 'Right'), ('middle', 'Middle')], help='Select Background Theme')
|
||||
background = fields.Selection([('image', 'Image'), ('color', 'Color')], default='color', help='Select Background Theme')
|
||||
background_image = fields.Many2one('login.image', string="Image", help='Select Background Image For Login Page')
|
||||
color = fields.Char(string="Color", help="Choose your Background color")
|
||||
|
||||
@api.onchange('background')
|
||||
def onchange_background(self):
|
||||
if self.background == 'image':
|
||||
self.color = False
|
||||
elif self.background == 'color':
|
||||
self.background_image = False
|
||||
else:
|
||||
self.background_image = self.color = False
|
||||
|
||||
@api.onchange('style')
|
||||
def onchange_style(self):
|
||||
if self.style == 'default' or self.style is False:
|
||||
self.background = self.background_image = self.color = False
|
||||
|
||||
@api.model
|
||||
def get_values(self):
|
||||
res = super(ResConfigSettings, self).get_values()
|
||||
image_id = int(self.env['ir.config_parameter'].sudo().get_param('login_background.background_image'))
|
||||
res.update(
|
||||
background_image=image_id,
|
||||
color=self.env['ir.config_parameter'].sudo().get_param('login_background.color'),
|
||||
background=self.env['ir.config_parameter'].sudo().get_param('login_background.background'),
|
||||
style=self.env['ir.config_parameter'].sudo().get_param('login_background.style'),
|
||||
)
|
||||
return res
|
||||
|
||||
def set_values(self):
|
||||
super(ResConfigSettings, self).set_values()
|
||||
param = self.env['ir.config_parameter'].sudo()
|
||||
|
||||
set_image = self.background_image.id or False
|
||||
set_color = self.color or False
|
||||
set_background = self.background or False
|
||||
set_style = self.style or False
|
||||
|
||||
param.set_param('login_background.background_image', set_image)
|
||||
param.set_param('login_background.color', set_color)
|
||||
param.set_param('login_background.background', set_background)
|
||||
param.set_param('login_background.style', set_style)
|
||||
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_login_image,access_login_image,model_login_image,,1,1,1,1
|
||||
|
BIN
yizuo_login_background_and_styles/static/.DS_Store
vendored
Normal file
BIN
yizuo_login_background_and_styles/static/description/banner.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 65 KiB |
BIN
yizuo_login_background_and_styles/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
149
yizuo_login_background_and_styles/static/description/index.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<section class="oe_container oe_dark lead">
|
||||
<div class="oe_row" style="width: 100% !important;">
|
||||
<div class="oe_span12" style="width: 100% !important;">
|
||||
<div class="panel panel-primary" style="border:none">
|
||||
<div class="panel-body">
|
||||
<ul class="list-unstyled">
|
||||
<div class="alert alert-info" style="background-color:#ed2f2f;color:#FFF"><i class="fa fa-hand-o-right"></i> <strong> Key Features </strong></div>
|
||||
<li><i class="fa fa-key" style="color:#ed2f2f"></i> This module is used for customized login page.</li>
|
||||
<li><i class="fa fa-key" style="color:#ed2f2f"></i> User can Select Login Form Position and also select background color or image.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="oe_container oe_dark lead">
|
||||
<div class="oe_row" style="width: 100% !important;">
|
||||
<div class="oe_span12" style="width: 100% !important;">
|
||||
<div class="panel panel-primary" style="border:none">
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-info" style="background-color:#ed2f2f;color:#FFF">
|
||||
<i class="fa fa-hand-o-right"></i>
|
||||
<strong>Settings</strong>
|
||||
</div>
|
||||
<p>
|
||||
<h2 class="oe_slogan">General Settings</h2>
|
||||
<p class="oe_slogan"><b>In this setting user can add Image to use as login background image.</b></p>
|
||||
<img class="oe_picture oe_screenshot" src="menu.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Select Style</h2>
|
||||
<p class="oe_slogan">Here user can select position of login form</p>
|
||||
<img class="oe_picture oe_screenshot" src="style.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Select Background</h2>
|
||||
<p class="oe_slogan">Here user can select image or color as login Background</p>
|
||||
<img class="oe_picture oe_screenshot" src="select_background.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Select Image</h2>
|
||||
<p class="oe_slogan">Here user can select Background image</p>
|
||||
<img class="oe_picture oe_screenshot" src="select_image.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Left align login form with Background Image</h2>
|
||||
<p class="oe_slogan"></p>
|
||||
<img class="oe_picture oe_screenshot" src="left_login_view.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Right align login form with Background Image</h2>
|
||||
<p class="oe_slogan"></p>
|
||||
<img class="oe_picture oe_screenshot" src="right_login_view.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Select Color</h2>
|
||||
<p class="oe_slogan">Here user can select Background color</p>
|
||||
<img class="oe_picture oe_screenshot" src="select_color.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
<p>
|
||||
<h2 class="oe_slogan">Center align login form with Background Color</h2>
|
||||
<p class="oe_slogan"></p>
|
||||
<img class="oe_picture oe_screenshot" src="middle_login_view.png" alt="" style="width: 82% !important;">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="oe_container oe_dark lead">
|
||||
<div class="oe_row" style="width: 100% !important;">
|
||||
<div class="oe_span12" style="width: 100% !important;">
|
||||
<div class="panel panel-primary" style="border:none">
|
||||
<div class="panel-body" style="text-align: center;">
|
||||
<ul class="list-unstyled">
|
||||
<div class="alert alert-info" style="background-color:#ed2f2f;color:#FFF"><i class="fa fa-globe" aria-hidden="true"></i> <strong> Our Service </strong></div>
|
||||
</ul>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Customization.png" alt="" style="width:60px;height:60px;"></th>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Implementation.png" alt="" style="width:60px;height:60px;"></th>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Integration.png" alt="" style="width:60px;height:60px;"></th>
|
||||
</tr>
|
||||
<tr style="height: 40px;font-size: 18px;">
|
||||
<td style="text-align: center;width: 33%;">Odoo Customization</td>
|
||||
<td style="text-align: center;width: 33%;">Odoo Implementation</td>
|
||||
<td style="text-align: center;width: 33%;">Odoo Integration</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br></br>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Migration.png" alt="" style="width:60px;height:60px;"></th>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Training.png" alt="" style="width:60px;height:60px;"></th>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Installation.png" alt="" style="width:60px;height:60px;"></th>
|
||||
</tr>
|
||||
<tr style="height: 40px;font-size: 18px;">
|
||||
<td style="text-align: center;width: 33%;">Odoo Migration</td>
|
||||
<td style="text-align: center;width: 33%;">Odoo Training</td>
|
||||
<td style="text-align: center;width: 33%;">Odoo Installation</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br></br>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Consulting.png" alt="" style="width:60px;height:60px;"></th>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Support.png" alt="" style="width:60px;height:60px;"></th>
|
||||
<th style="text-align: center;width: 33%;"><img src="service/Hire.png" alt="" style="width:60px;height:60px;"></th>
|
||||
</tr>
|
||||
<tr style="height: 40px;font-size: 18px;">
|
||||
<td style="text-align: center;width: 33%;">Odoo Consulting</td>
|
||||
<td style="text-align: center;width: 33%;">Odoo Support</td>
|
||||
<td style="text-align: center;width: 33%;">Hire Developer</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="oe_container oe_dark lead">
|
||||
<div class="oe_row" style="width: 100% !important;">
|
||||
<div class="oe_span12" style="width: 100% !important;">
|
||||
<div class="panel panel-primary" style="border:none">
|
||||
<div class="panel-body" style="text-align: center;">
|
||||
<ul class="list-unstyled">
|
||||
<div class="alert alert-info" style="background-color:#ed2f2f;color:#FFF"><i class="fa fa-life-ring" aria-hidden="true"></i> <strong> Get Help & Support </strong></div>
|
||||
<li><i class="fa fa-key" style="color:#ed2f2f"></i> You will get 30 Days free support incase any bugs or issue.</li>
|
||||
<br>
|
||||
<li><img style="display: block;margin: 0 auto;height: 211px;" class="oe_picture oe_screenshot" src="yizuo_logo.png" alt=""></li>
|
||||
<br><br>
|
||||
</ul>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<th style="text-align: center;"><img src="website.png" alt="" style="width:70px;height:70px;"></th>
|
||||
<th style="text-align: center;"><img src="mail.png" alt="" style="width:70px;height:70px;"></th>
|
||||
<th style="text-align: center;"><img src="skype.png" alt="" style="width:70px;height:70px;"></th>
|
||||
</tr>
|
||||
<tr style="height: 61px;font-size: 20px;">
|
||||
<td style="text-align: center;">www.fortutechims.com</td>
|
||||
<td style="text-align: center;">info@fortutechims.com</td>
|
||||
<td style="text-align: center;">info@fortutechims.com</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
After Width: | Height: | Size: 823 KiB |
BIN
yizuo_login_background_and_styles/static/description/mail.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
yizuo_login_background_and_styles/static/description/menu.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 813 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
BIN
yizuo_login_background_and_styles/static/description/skype.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
yizuo_login_background_and_styles/static/description/style.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
yizuo_login_background_and_styles/static/description/website.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,55 @@
|
||||
.container{
|
||||
max-width: 100%;
|
||||
}
|
||||
.background{
|
||||
height:100%;
|
||||
display: block;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-attachment: fixed;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
-webkit-filter: blur(0px);
|
||||
z-index: -1;
|
||||
}
|
||||
.body_login {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
opacity:0.7;
|
||||
}
|
||||
#mcard{
|
||||
margin-top: 7%;
|
||||
padding: 3%;
|
||||
max-width:350px
|
||||
}
|
||||
|
||||
#bcard{
|
||||
padding: 3%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.body_login input,
|
||||
.body_login select {
|
||||
background-color: transparent !important;
|
||||
border-top: 0px;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
/* border-bottom: 1px solid #FED766; */
|
||||
border-radius: 0px;
|
||||
color: black;
|
||||
font-size: 18px;
|
||||
font-weight: 300;
|
||||
transition: border-color 0.7s ease;
|
||||
box-shadow: none!important;
|
||||
text-align: center;
|
||||
}
|
||||
.effect:hover{
|
||||
box-shadow: 5px 5px 5px black;
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
width: 510px;
|
||||
height: 300px;
|
||||
#background: #bfbfbf;
|
||||
margin-right: -100%;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 300px;
|
||||
margin-left: 532px;
|
||||
|
||||
padding-left:81px;
|
||||
#background: #efefef;
|
||||
}
|
||||
|
||||
.banner {
|
||||
left: 0px;
|
||||
width: 510px;
|
||||
height: 978px;
|
||||
margin: 22px;
|
||||
|
||||
background: #005EFE;
|
||||
}
|
||||
.banner p{
|
||||
position: absolute;
|
||||
left: 65px;
|
||||
top: 59px;
|
||||
width: 172px;
|
||||
height: 64px;
|
||||
opacity: 1;
|
||||
|
||||
#background: #FFFFFF;
|
||||
}
|
||||
|
||||
.banner .logo{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 8px;
|
||||
width: 46.02px;
|
||||
height: 38px;
|
||||
opacity: 1;
|
||||
|
||||
#background: #FFFFFF;
|
||||
}
|
||||
|
||||
.banner .logo_name {
|
||||
/* CKYC */
|
||||
|
||||
position: absolute;
|
||||
left: 55px;
|
||||
top: 0px;
|
||||
width: 117px;
|
||||
height: 64px;
|
||||
opacity: 1;
|
||||
|
||||
font-family: Roboto-Bold;
|
||||
font-size: 46px;
|
||||
font-weight: bold;
|
||||
line-height: 64px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.right .login_top{
|
||||
padding-top: 248px;
|
||||
height:0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.right .login_title {
|
||||
/* Login */
|
||||
margin:0px;
|
||||
font-family: Poppins-SemiBold;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
line-height: 39px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
color: #0D1D54;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.right .login_small_title {
|
||||
/* Login */
|
||||
|
||||
/* Thank you for get back to CKYC. */
|
||||
margin:15px 0px 0px 0px;
|
||||
width: 258px;
|
||||
height: 22px;
|
||||
opacity: 1;
|
||||
|
||||
font-family: Poppins-Medium;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
color: #404B7C;
|
||||
}
|
||||
|
||||
.right .input_label {
|
||||
/* Email */
|
||||
|
||||
margin: 72px 0px 0px 0px;
|
||||
width: 44px;
|
||||
height: 22px;
|
||||
opacity: 1;
|
||||
|
||||
font-family: Poppins-Regular;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
color: #404B7C;
|
||||
|
||||
}
|
||||
|
||||
.right input {
|
||||
/* Rectangle 2 */
|
||||
|
||||
margin: 15px 0px 0px 0px;
|
||||
|
||||
width: 432px;
|
||||
height: 68px;
|
||||
border-radius: 8px;
|
||||
opacity: 1;
|
||||
|
||||
padding: 0px 28px 0px 28px;
|
||||
|
||||
background: #FFFFFF;
|
||||
|
||||
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.08);
|
||||
|
||||
font-family: Poppins-Regular;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
#color: #D5D5D5;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.right .password {
|
||||
|
||||
}
|
||||
|
||||
.right .password input {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
|
||||
.left {
|
||||
background: #005EFE;
|
||||
}
|
||||
|
||||
.left p{
|
||||
|
||||
#position:absolute;
|
||||
margin: 65px 0px 0px 0px;
|
||||
#width: 1px;
|
||||
opacity: 1;
|
||||
|
||||
#background: #FFFFFF;
|
||||
}
|
||||
|
||||
.left .logo{
|
||||
#position: absolute;
|
||||
width: 46.02px;
|
||||
height: 38px;
|
||||
|
||||
#background: #FFFFFF;
|
||||
}
|
||||
|
||||
.left .logo_name {
|
||||
/* CKYC */
|
||||
font-family: Roboto-Bold;
|
||||
font-size: 46px;
|
||||
font-weight: bold;
|
||||
line-height: 64px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.right{
|
||||
|
||||
}
|
||||
|
||||
.right .login_top{
|
||||
padding-top: 248px;
|
||||
height:0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.right .login_title {
|
||||
/* Login */
|
||||
margin:0px;
|
||||
font-family: Poppins-SemiBold;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
line-height: 39px;
|
||||
letter-spacing: 0px;
|
||||
|
||||
color: #0D1D54;
|
||||
|
||||
}
|
||||
BIN
yizuo_login_background_and_styles/static/src/images/MRS.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 85 KiB |
BIN
yizuo_login_background_and_styles/static/src/images/logo.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
yizuo_login_background_and_styles/static/src/images/智能工厂.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
yizuo_login_background_and_styles/static/src/images/电子商务管理系统.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<!-- 必须的 meta 标签 -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Bootstrap 的 CSS 文件 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
|
||||
<!-- 自定义的 的 CSS 文件 -->
|
||||
<link href="./css/yizuo_login_style_bootstrap.css" rel="stylesheet" crossorigin="anonymous">
|
||||
|
||||
<title>Login by Bootstrap</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row g-4">
|
||||
<div class="col-lg-4 col-sm-0 left">
|
||||
<p>
|
||||
<img src="./images/logo.png" class="rounded float-start logo"/>
|
||||
<span class="logo_name">CKYC</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-12 right">
|
||||
<p class="login_top"></p>
|
||||
<p class="login_title">login</p>
|
||||
<p class="login_small_title">Thank you for get back to CKYC.</p>
|
||||
<p class="email input_label">email</p>
|
||||
<input name="email" type="text" />
|
||||
<p class="password input_label">password</p>
|
||||
<input name="password" type="password" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
32
yizuo_login_background_and_styles/static/src/login.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="./css/yizuo_login_style.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div class="left">
|
||||
<div class="banner">
|
||||
<p>
|
||||
<img src="./images/logo.png" class="logo"/>
|
||||
<span class="logo_name">CKYC</span>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="right-content">
|
||||
<p class="login_top"></p>
|
||||
<p class="login_title">login</p>
|
||||
<p class="login_small_title">Thank you for get back to CKYC.</p>
|
||||
<p class="email input_label">email</p>
|
||||
<input name="email" type="text" />
|
||||
<p class="password input_label">password</p>
|
||||
<input name="password" type="password" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
9
yizuo_login_background_and_styles/templates/assets.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Assets -->
|
||||
<record id="yizuo_login_background_and_styles.assets_login" model="ir.asset">
|
||||
<field name="name">Login CSS</field>
|
||||
<field name="bundle">web.assets_frontend</field>
|
||||
<field name="path">/yizuo_login_background_and_styles/static/src/css/web_login_style.css</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,78 @@
|
||||
<odoo>
|
||||
<template id="left_login_layout" name="Left Login Layout">
|
||||
<t t-call="web.frontend_layout">
|
||||
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
|
||||
<t t-set="body_classname" t-value="'bg-100'"/>
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
<t t-set="no_footer" t-value="True"/>
|
||||
<div class="background" t-attf-style="background-image: url('#{background_src}'); background-color: #{background_color};">
|
||||
<div class="container body_login" style="height: 100%;">
|
||||
<div id="bcard" t-attf-class="card border-0 mx-auto bg-100 {{login_card_classes}} o_database_list" style="float:left;">
|
||||
<div class="card-body">
|
||||
<div style="margin-top: 30%;">
|
||||
<div t-attf-class="text-center pb-3 border-bottom {{'mb-3' if form_small else 'mb-4'}}">
|
||||
<!-- <img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>-->
|
||||
<img t-attf-src="/yizuo_login_background_and_styles/static/src/images/login_logo.png" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>
|
||||
|
||||
</div>
|
||||
<t t-raw="0"/>
|
||||
<div class="text-center small mt-4 pt-3 border-top" t-if="not disable_footer">
|
||||
<!-- <t t-if="not disable_database_manager">-->
|
||||
<!-- <a class="border-right pr-2 mr-1" href="/web/database/manager">Manage Databases</a>-->
|
||||
<!-- </t>-->
|
||||
<!-- <a href="https://www.odoo.com?utm_source=db&utm_medium=auth" target="_blank">Powered by <span>Odoo</span></a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="left_login_template" name="Login">
|
||||
<t t-call="yizuo_login_background_and_styles.left_login_layout">
|
||||
<form class="oe_login_form" role="form" t-attf-action="/web/login" method="post" onsubmit="this.action = '/web/login' + location.hash">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
|
||||
<div class="form-group field-db" t-if="databases and len(databases) > 1">
|
||||
<div t-attf-class="input-group {{'input-group-sm' if form_small else ''}}">
|
||||
<input type="text" name="db" t-att-value="request.db" id="db" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" readonly="readonly"/>
|
||||
<span class="input-group-append">
|
||||
<a role="button" href="/web/database/selector" class="btn btn-secondary">Select <i class="fa fa-database" role="img" aria-label="Database" title="Database"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group field-login">
|
||||
<input type="text" placeholder="账号 ..." name="login" t-att-value="login" id="login" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autofocus="autofocus" autocapitalize="off"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group field-password">
|
||||
<input type="password" placeholder="密码 ..." name="password" id="password" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autocomplete="current-password" t-att-autofocus="'autofocus' if login else None" maxlength="4096"/>
|
||||
</div>
|
||||
|
||||
<p class="alert alert-danger" t-if="error" role="alert">
|
||||
<t t-esc="error"/>
|
||||
</p>
|
||||
<p class="alert alert-success" t-if="message" role="status">
|
||||
<t t-esc="message"/>
|
||||
</p>
|
||||
|
||||
<div t-attf-class="clearfix oe_login_buttons text-center mb-1 {{'pt-2' if form_small else 'pt-3'}}">
|
||||
<button type="submit" class="btn btn-primary btn-block">登录</button>
|
||||
<t t-if="debug">
|
||||
<button type="submit" name="redirect" value="/web/become" class="btn btn-link btn-sm btn-block">Log in as superuser</button>
|
||||
</t>
|
||||
<div class="justify-content-between mt-2 d-flex small">
|
||||
<a t-if="signup_enabled" t-attf-href="/web/signup?{{ keep_query() }}">Don't have an account?</a>
|
||||
<a t-if="reset_password_enabled" t-attf-href="/web/reset_password?{{ keep_query() }}">Reset Password</a>
|
||||
</div>
|
||||
<div class="o_login_auth"/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
||||
</form>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,81 @@
|
||||
<odoo>
|
||||
<template id="middle_login_layout" name="Middle Login Layout">
|
||||
<t t-call="web.layout">
|
||||
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
|
||||
<t t-set="head">
|
||||
<t t-call-assets="web.assets_common" t-js="false"/>
|
||||
<t t-call-assets="web.assets_frontend" t-js="false"/>
|
||||
<t t-call-assets="web.assets_common" t-css="false"/>
|
||||
<t t-call-assets="web.assets_frontend" t-css="false"/>
|
||||
</t>
|
||||
<t t-set="body_classname" t-value="'bg-100'"/>
|
||||
<div class="background" t-attf-style="background-image: url('#{background_src}'); background-color: #{background_color};">
|
||||
<div class="container body_login">
|
||||
<div t-attf-class="card border-0 mx-auto bg-100 {{login_card_classes}} o_database_list" id="mcard">
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<div t-attf-class="text-center pb-3 border-bottom {{'mb-3' if form_small else 'mb-4'}}">
|
||||
<!-- <img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>-->
|
||||
<img t-attf-src="/yizuo_login_background_and_styles/static/src/images/login_logo.png" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>
|
||||
</div>
|
||||
<t t-raw="0"/>
|
||||
<div class="text-center small mt-4 pt-3 border-top" t-if="not disable_footer">
|
||||
<!-- <t t-if="not disable_database_manager">-->
|
||||
<!-- <a class="border-right pr-2 mr-1" href="/web/database/manager">Manage Databases</a>-->
|
||||
<!-- </t>-->
|
||||
<!-- <a href="https://www.odoo.com?utm_source=db&utm_medium=auth" target="_blank">Powered by <span>Odoo</span></a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="middle_login_template" name="Login">
|
||||
<t t-call="yizuo_login_background_and_styles.middle_login_layout">
|
||||
<form class="oe_login_form" role="form" t-attf-action="/web/login" method="post" onsubmit="this.action = '/web/login' + location.hash">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
|
||||
<div class="form-group field-db" t-if="databases and len(databases) > 1">
|
||||
<div t-attf-class="input-group {{'input-group-sm' if form_small else ''}}">
|
||||
<input type="text" name="db" t-att-value="request.db" id="db" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" readonly="readonly"/>
|
||||
<span class="input-group-append">
|
||||
<a role="button" href="/web/database/selector" class="btn btn-secondary">Select <i class="fa fa-database" role="img" aria-label="Database" title="Database"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group field-login">
|
||||
<input type="text" placeholder="账号 ..." name="login" t-att-value="login" id="login" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autofocus="autofocus" autocapitalize="off"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group field-password">
|
||||
<input type="password" placeholder="密码 ..." name="password" id="password" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autocomplete="current-password" t-att-autofocus="'autofocus' if login else None" maxlength="4096"/>
|
||||
</div>
|
||||
|
||||
<p class="alert alert-danger" t-if="error" role="alert">
|
||||
<t t-esc="error"/>
|
||||
</p>
|
||||
<p class="alert alert-success" t-if="message" role="status">
|
||||
<t t-esc="message"/>
|
||||
</p>
|
||||
|
||||
<div t-attf-class="clearfix oe_login_buttons text-center mb-1 {{'pt-2' if form_small else 'pt-3'}}">
|
||||
<button type="submit" class="btn btn-primary btn-block">登 录</button>
|
||||
<t t-if="debug">
|
||||
<button type="submit" name="redirect" value="/web/become" class="btn btn-link btn-sm btn-block">Log in as superuser</button>
|
||||
</t>
|
||||
<div class="justify-content-between mt-2 d-flex small">
|
||||
<a t-if="signup_enabled" t-attf-href="/web/signup?{{ keep_query() }}">Don't have an account?</a>
|
||||
<a t-if="reset_password_enabled" t-attf-href="/web/reset_password?{{ keep_query() }}">Reset Password</a>
|
||||
</div>
|
||||
<div class="o_login_auth"/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
||||
</form>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,77 @@
|
||||
<odoo>
|
||||
<template id="right_login_layout" name="right Login Layout">
|
||||
<t t-call="web.frontend_layout">
|
||||
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
|
||||
<t t-set="body_classname" t-value="'bg-100'"/>
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
<t t-set="no_footer" t-value="True"/>
|
||||
<div class="background" t-attf-style="background-image: url('#{background_src}'); background-color: #{background_color};">
|
||||
<div class="container body_login" style="height: 100%;">
|
||||
<div id="bcard" t-attf-class="card border-0 mx-auto bg-100 {{login_card_classes}} o_database_list" style="float:right;">
|
||||
<div class="card-body">
|
||||
<div style="margin-top: 30%;">
|
||||
<div t-attf-class="text-center pb-3 border-bottom {{'mb-3' if form_small else 'mb-4'}}">
|
||||
<!-- <img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>-->
|
||||
<img t-attf-src="/yizuo_login_background_and_styles/static/src/images/login_logo.png" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>
|
||||
</div>
|
||||
<t t-raw="0"/>
|
||||
<!-- <div class="text-center small mt-4 pt-3 border-top" t-if="not disable_footer">-->
|
||||
<!-- <t t-if="not disable_database_manager">-->
|
||||
<!-- <a class="border-right pr-2 mr-1" href="/web/database/manager">Manage Databases</a>-->
|
||||
<!-- </t>-->
|
||||
<!-- <a href="https://www.odoo.com?utm_source=db&utm_medium=auth" target="_blank">Powered by <span>Odoo</span></a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="yizuo_login_background_and_styles.right_login_template" name="Login">
|
||||
<t t-call="yizuo_login_background_and_styles.right_login_layout">
|
||||
<form class="oe_login_form" role="form" t-attf-action="/web/login" method="post" onsubmit="this.action = '/web/login' + location.hash">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
|
||||
<div class="form-group field-db" t-if="databases and len(databases) > 1">
|
||||
<div t-attf-class="input-group {{'input-group-sm' if form_small else ''}}">
|
||||
<input type="text" name="db" t-att-value="request.db" id="db" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" readonly="readonly"/>
|
||||
<span class="input-group-append">
|
||||
<a role="button" href="/web/database/selector" class="btn btn-secondary">Select <i class="fa fa-database" role="img" aria-label="Database" title="Database"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group field-login effect">
|
||||
<input type="text" placeholder="账号 ..." name="login" t-att-value="login" id="login" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autofocus="autofocus" autocapitalize="off"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group field-password effect">
|
||||
<input type="password" placeholder="密码 ..." name="password" id="password" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autocomplete="current-password" t-att-autofocus="'autofocus' if login else None" maxlength="4096"/>
|
||||
</div>
|
||||
|
||||
<p class="alert alert-danger" t-if="error" role="alert">
|
||||
<t t-esc="error"/>
|
||||
</p>
|
||||
<p class="alert alert-success" t-if="message" role="status">
|
||||
<t t-esc="message"/>
|
||||
</p>
|
||||
|
||||
<div t-attf-class="clearfix oe_login_buttons text-center mb-1 {{'pt-2' if form_small else 'pt-3'}}">
|
||||
<button type="submit" class="btn btn-primary btn-block">登 录</button>
|
||||
<t t-if="debug">
|
||||
<button type="submit" name="redirect" value="/web/become" class="btn btn-link btn-sm btn-block">Log in as superuser</button>
|
||||
</t>
|
||||
<div class="justify-content-between mt-2 d-flex small">
|
||||
<a t-if="signup_enabled" t-attf-href="/web/signup?{{ keep_query() }}">Don't have an account?</a>
|
||||
<a t-if="reset_password_enabled" t-attf-href="/web/reset_password?{{ keep_query() }}">Reset Password</a>
|
||||
</div>
|
||||
<div class="o_login_auth"/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
||||
</form>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
34
yizuo_login_background_and_styles/views/login_image.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_login_tree">
|
||||
<field name="name">login.image</field>
|
||||
<field name="model">login.image</field>
|
||||
<field name="priority" eval="16"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="faculty list">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_login_form">
|
||||
<field name="name">login.image</field>
|
||||
<field name="model">login.image</field>
|
||||
<field name="priority" eval="16"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Image">
|
||||
<group>
|
||||
<field name="name" invisible="0" readonly="1" force_save="1"/>
|
||||
<field widget="binary" height="64" name="image" filename="name" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_image_data">
|
||||
<field name="name">Image</field>
|
||||
<field name="res_model">login.image</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem id="menu_image" name="Background Image" parent="base.menu_users" action="yizuo_login_background_and_styles.action_image_data"/>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record
|
||||
id="res_config_settings_view_form_login_background"
|
||||
model="ir.ui.view">
|
||||
<field name="name">res.config.settings.form.inherit</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='companies']" position="after">
|
||||
<div>
|
||||
<h2>Login Background</h2>
|
||||
<div class="row mt16 o_settings_container"
|
||||
name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box"
|
||||
id="default_taxes">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="Style" for="style" class="col-lg-3 o_light_label"/>
|
||||
<field name="style"/>
|
||||
<label string="Background" for="background" class="col-lg-3 o_light_label"
|
||||
attrs="{'invisible': [('style','in',['default',False])]}"/>
|
||||
<field name="background"
|
||||
attrs="{'invisible': [('style','in',['default',False])]}"/>
|
||||
<label string="Image" for="background_image" class="col-lg-3 o_light_label"
|
||||
attrs="{'invisible': [('background','!=','image')]}"/>
|
||||
<field name="background_image" options="{'no_create': True}"
|
||||
attrs="{'invisible': [('background','!=','image')], 'required':[('background', '=', 'image')]}"/>
|
||||
<label string="Color" for="color" class="col-lg-3 o_light_label"
|
||||
attrs="{'invisible': [('background','!=','color')]}"/>
|
||||
<field name="color" widget="color" attrs="{'invisible': [('background','!=','color')]}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||