cms fixes
This commit is contained in:
parent
a933b632ad
commit
458ca8eddb
@ -169,27 +169,6 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//====================opens territory tree page ==================
|
||||
cur_frm.cscript.TerritoryHelp = function(doc,dt,dn){
|
||||
var call_back = function(){
|
||||
|
||||
var sb_obj = new SalesBrowser();
|
||||
sb_obj.set_val('Territory');
|
||||
}
|
||||
loadpage('Sales Browser',call_back);
|
||||
}
|
||||
|
||||
//====================opens customer group tree page ==================
|
||||
cur_frm.cscript.CGHelp = function(doc,dt,dn){
|
||||
var call_back = function(){
|
||||
var sb_obj = new SalesBrowser();
|
||||
sb_obj.set_val('Customer Group');
|
||||
}
|
||||
loadpage('Sales Browser',call_back);
|
||||
}
|
||||
|
||||
|
||||
// TRIGGERS FOR CALCULATIONS
|
||||
// =====================================================================================================
|
||||
|
||||
|
@ -141,12 +141,12 @@ def get_web_style():
|
||||
"""returns web css"""
|
||||
return webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
|
||||
|
||||
def get_web_header():
|
||||
def get_web_header(page_name):
|
||||
"""get website header"""
|
||||
from website.utils import get_header
|
||||
return get_header()
|
||||
return get_header(page_name)
|
||||
|
||||
def get_web_footer():
|
||||
def get_web_footer(page_name):
|
||||
"""get website footer"""
|
||||
from website.utils import get_footer
|
||||
return get_footer()
|
||||
return get_footer(page_name)
|
||||
|
@ -67,7 +67,7 @@ def add_guest_access_to_page(page):
|
||||
d.role = 'Guest'
|
||||
d.save()
|
||||
|
||||
def get_header():
|
||||
def get_header(page_name):
|
||||
"""get page header"""
|
||||
|
||||
from webnotes.model.doc import Document
|
||||
@ -123,7 +123,7 @@ def get_header():
|
||||
</div>""").render(top_bar_items = top_bar_items,
|
||||
brand=website_settings.brand_html or webnotes.get_default('company') or 'ERPNext')
|
||||
|
||||
def get_footer():
|
||||
def get_footer(page_name):
|
||||
"""get page footer"""
|
||||
|
||||
from webnotes.model.doc import Document
|
||||
|
@ -1,250 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Login Page</title>
|
||||
<meta name="generator" content="wnframework">
|
||||
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
|
||||
<script type="text/javascript" src="js/lib/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/all-web.js"></script>
|
||||
<script type="text/javascript" src="js/wn-web.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="css/all-web.css">
|
||||
<link type="text/css" rel="stylesheet" href="css/wn-web.css">
|
||||
|
||||
<script>
|
||||
window.page_name = "Login Page";
|
||||
|
||||
$(document).bind('app_ready', function() {
|
||||
var _page = new wn.views.Page(window.page_name);
|
||||
|
||||
// page script
|
||||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
pscript['onload_Login Page'] = function(wrapper){
|
||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
|
||||
wrapper.appframe.title('Login');
|
||||
wrapper.appframe.$w.find('.close').toggle(false);
|
||||
|
||||
var lw = $i('login_wrapper');
|
||||
$bs(lw, '1px 1px 3px #888');
|
||||
|
||||
$('#login_btn').click(pscript.doLogin)
|
||||
|
||||
$('#password').keypress(function(ev){
|
||||
if(ev.which==13 && $('#password').val())
|
||||
pscript.doLogin();
|
||||
});
|
||||
$(document).trigger('login_rendered');
|
||||
}
|
||||
|
||||
pscript['onshow_Login Page'] = function() {
|
||||
// set banner
|
||||
}
|
||||
|
||||
// Login Callback
|
||||
pscript.onLoginReply = function(r, rtext) {
|
||||
$('#login_btn').done_working();
|
||||
if(r.message=="Logged In"){
|
||||
window.location.href='app.html' + (get_url_arg('page') ? ('?page='+get_url_arg('page')) : '');
|
||||
} else {
|
||||
$i('login_message').innerHTML = '<span style="color: RED;">'+(r.message)+'</span>';
|
||||
//if(r.exc)alert(r.exc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Login
|
||||
pscript.doLogin = function(){
|
||||
|
||||
var args = {};
|
||||
args['usr']=$i("login_id").value;
|
||||
args['pwd']=$i("password").value;
|
||||
if($i('remember_me').checked)
|
||||
args['remember_me'] = 1;
|
||||
|
||||
$('#login_btn').set_working();
|
||||
|
||||
$c("login", args, pscript.onLoginReply);
|
||||
}
|
||||
|
||||
|
||||
wn.show_forgot_password = function(){
|
||||
// create dialog
|
||||
var d = new wn.ui.Dialog({
|
||||
title:"Forgot Password",
|
||||
fields: [
|
||||
{'label':'Email Id', 'fieldname':'email_id', 'fieldtype':'Data', 'reqd':true},
|
||||
{'label':'Email Me A New Password', 'fieldname':'run', 'fieldtype':'Button'}
|
||||
]
|
||||
});
|
||||
|
||||
$(d.fields_dict.run.input).click(function() {
|
||||
var values = d.get_values();
|
||||
if(!values) return;
|
||||
wn.call({
|
||||
method:'reset_password',
|
||||
args: { user: values.email_id },
|
||||
callback: function() {
|
||||
d.hide();
|
||||
}
|
||||
})
|
||||
})
|
||||
d.show();
|
||||
}
|
||||
|
||||
|
||||
// trigger onload
|
||||
_page.trigger('onload');
|
||||
|
||||
// activate page
|
||||
wn.container.change_to(window.page_name);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<style>#login_wrapper {
|
||||
width: 300px !important;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.login-banner {
|
||||
margin-bottom: 20px;
|
||||
}</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header><div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="index.html">erpnext</a>
|
||||
<ul class="nav">
|
||||
|
||||
|
||||
<li data-label="Pricing">
|
||||
<a href="pages/erpnext-pricing.html" None>
|
||||
Pricing
|
||||
|
||||
</a></li>
|
||||
|
||||
|
||||
|
||||
<li data-label="Customers">
|
||||
<a href="None" None>
|
||||
Customers
|
||||
|
||||
</a></li>
|
||||
|
||||
|
||||
|
||||
<li data-label="Demo">
|
||||
<a href="http://demo.erpnext.com" target = "_blank">
|
||||
Demo
|
||||
|
||||
</a></li>
|
||||
|
||||
|
||||
|
||||
<li data-label="Developers">
|
||||
<a href="open-source.html" None>
|
||||
Developers
|
||||
|
||||
</a></li>
|
||||
|
||||
|
||||
|
||||
<li data-label="About">
|
||||
<a href="None" None>
|
||||
About
|
||||
|
||||
</a></li>
|
||||
|
||||
|
||||
|
||||
<li data-label="Blog">
|
||||
<a href="None" None>
|
||||
Blog
|
||||
|
||||
</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<img src="images/lib/ui/spinner.gif" id="spinner"/>
|
||||
<ul class="nav pull-right">
|
||||
<li id="login-topbar-item"><a href="login-page.html">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div></header>
|
||||
<div id="body_div">
|
||||
<div class="content" id="page-Login Page" style="display: block;">
|
||||
<div class="layout-wrapper layout-wrapper-appframe" id='login_wrapper'>
|
||||
<div class="appframe-area"></div>
|
||||
<div class="layout-main" style="padding: 15px;">
|
||||
<table border="0" cellspacing="8">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Login Id</td>
|
||||
<td><input id="login_id" type="text" style="width: 180px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password</td>
|
||||
<td><input id="password" type="password" style="width: 180px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"><input id="remember_me" type="checkbox" /></td>
|
||||
<td>Remember Me</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td id="login_message"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button id="login_btn" class="btn btn-small btn-primary">Login</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="margin-left: 72px;"><span class="link_type"
|
||||
onclick="wn.show_forgot_password()">Forgot Password</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="web-footer">
|
||||
<div class="web-footer-menu"><ul>
|
||||
|
||||
<li><a href="None" None
|
||||
data-label="Contact Us">Contact Us</a></li>
|
||||
|
||||
<li><a href="None" None
|
||||
data-label="About Us">About Us</a></li>
|
||||
|
||||
<li><a href="None" None
|
||||
data-label="FAQ">FAQ</a></li>
|
||||
|
||||
</ul></div>
|
||||
<div class="web-footer-copyright">© Web Notes Technologies Pvt Ltd
|
||||
</div></footer>
|
||||
</body>
|
Loading…
x
Reference in New Issue
Block a user