Commit e045ac6a authored by Romain Loth's avatar Romain Loth

better User.is_active + new page with demo css on /services/demo

parent e71f354b
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Complex Systems Community Explorer</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Les styles -->
<link type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link type="text/css" href="static/css/bootstrap.css" rel="stylesheet">
<link type="text/css" href="static/css/bootstrap_index.css" rel="stylesheet">
<link type="text/css" href="static/css/brownian-motion/jquery-ui-1.8.16.custom.css" rel="stylesheet">
<link type="text/css" href="static/css/whoswho.css" rel="stylesheet">
<script type="text/javascript" src="static/js/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" src="static/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap/bootstrap-dropdown-fade.js"></script>
<script type="text/javascript" src="static/js/misc/underscore.min.js"></script>
<script type="text/javascript" src="static/js/jquery/jquery.highlight-3.js"></script>
<script type="text/javascript" src="static/js/jquery.vticker-min.js"></script>
<script type="text/javascript" src="static/js/misc/json2.js"></script>
<script type="text/javascript" src="static/js/utils.js"></script>
</head>
<body>
<script type="text/javascript" src="static/js/whoswho.js"/></script>
<div class="topbar">
<div class="topbar-inner" style="height:10em">
<div class="container-fluid">
<!-- MAIN NAVBAR -->
<ul class="nav" style="margin-top:5px;">
<li>
<a class="topbarlink" href="index.html"><span class="icon-home icon-white"></i></a>
</li>
<li id="mapping" class="nav-legend">
<span> <strong>SELECT Keywords</strong> </span>
<span> <strong>AND Scholars</strong> </span>
</li>
<li id="refine" class="dropdown">
<a class="btn-default nav-inline-selectable"
onclick='$(this).next(".dropdown-menu").toggle();'
>refine<i class="caret"></i></a>
<ul class="dropdown-menu">
<li>
<a id="addfiltercountry" href="#">Filter by country</a>
</li>
<li>
<a id="addfilterkeyword" href="#">Filter by keyword</a>
</li>
<li>
<a id="addfiltertag" href="#">Filter by community tags</a>
</li>
<li>
<a id="addfilterorganization" href="#">Filter by organization</a>
</li>
<li>
<a id="addfilterlaboratory" href="#">Filter by laboratory</a>
</li>
</ul>
</li>
<li>
<a class="topbarlink" id="print" href="#"> <i class="icon-arrow-right icon-white"></i> <strong>CREATE DIRECTORY</strong></a>
</li>
<li style="margin-top: 10px;">
<span style="color: #fff;"> <strong>&nbsp;OR&nbsp;</strong> </span>
</li>
<li>
<a class="topbarlink" id="generate" href="#"> <i class="icon-arrow-right icon-white"></i> <strong>MAP</strong></a>
</li>
</ul>
<form id="search-form" class="js-search-form pull-right">
<span class="glass js-search-action"><i></i></span>
<input id="search" class="input-small" type="text" name="q" placeholder="Search">
</form>
</div>
</div>
</div>
<div class="container-fluid" style="margin-top:20em;">
<div id="visualization"></div>
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit">
<div id="loading" style="padding-left:-175px; margin-left: 27%;">
<img src="static/css/loading.gif" style="border: 0px; opacity: 0.05; " />
</div>
<p>
<!--<form>-->
<input type="text" id="searchname" class="large name" placeholder="Your last name" />
<input type="hidden" id="searchlogin" value=""/>
<img src="static/css/branding/big_arrow.png" alt="" style="border: none; margin-bottom : -19px;" title="" />
<button id="print2" class="btn btn-small btn-primary">
DIRECTORY
</button>
&nbsp;OR&nbsp;
<button id="generate2" class="btn btn-small btn-primary">
MAP
</button>
<!--<a id="printname" href="#"> <strong>PRINT</strong></a>-->
</p>
<br/><br/>
</div>
</div>
</body>
</html>
......@@ -19,18 +19,23 @@ Context:
"""
__author__ = "CNRS"
__copyright__ = "Copyright 2016 ISCPIF-CNRS"
__version__ = "1.4"
__version__ = "1.5"
__email__ = "romain.loth@iscpif.fr"
__status__ = "Dev"
from flask import Flask, render_template, request, \
redirect, url_for, session
from flask_login import fresh_login_required, current_user, login_user
from re import sub
from os import path
from traceback import format_tb
from json import dumps
from datetime import timedelta
# ============== imports ==============
from re import sub
from os import path
from json import dumps
from datetime import timedelta
from urllib.parse import urlparse, urljoin
from traceback import format_tb
from flask import Flask, render_template, request, \
redirect, url_for, session
from flask_login import fresh_login_required, login_required, \
current_user, login_user, logout_user
if __package__ == 'services':
# when we're run via import
......@@ -49,10 +54,9 @@ else:
from db import connect_db, get_or_create_keywords, save_pairs_sch_kw, delete_pairs_sch_kw, get_or_create_affiliation, save_scholar, get_field_aggs
from db_to_tina_api.extractDataCustom import MyExtractor as MySQL
# ============= read config ============
# ============= app creation ============
config = REALCONFIG
# ============= app creation ============
app = Flask("services",
static_folder=path.join(config['HOME'],"static"),
template_folder=path.join(config['HOME'],"templates"))
......@@ -60,10 +64,14 @@ app = Flask("services",
app.config['DEBUG'] = (config['LOG_LEVEL'] == "DEBUG")
app.config['SECRET_KEY'] = 'TODO fill secret key for sessions for login'
# for SSL
app.config['PREFERRED_URL_SCHEME'] = 'https'
# for flask_login
app.config['REMEMBER_COOKIE_DURATION'] = timedelta(seconds=15)
app.config['REMEMBER_COOKIE_NAME'] = 'supercookie'
app.config['MY_VAR'] = 'incredible it works'
cookie_timer = timedelta(hours=2)
app.config['PERMANENT_SESSION_LIFETIME'] = cookie_timer
app.config['REMEMBER_COOKIE_DURATION'] = cookie_timer
app.config['REMEMBER_COOKIE_NAME'] = 'communityexplorer.org cookie'
login_manager.login_view = "login"
login_manager.session_protection = "strong"
......@@ -111,7 +119,6 @@ SOURCE_FIELDS = [
# mandatory minimum of keywords # TODO use
MIN_KW = 5
# ============= views =============
# -----------------------------------------------------------------------
......@@ -120,6 +127,12 @@ MIN_KW = 5
@login_manager.unauthorized_handler
def unauthorized():
"""
Generic handler for all unauthorized
(pages requires login)
NB: Redirecting here is done by @login_required decorators
"""
return render_template(
"message.html",
message = """
......@@ -130,15 +143,38 @@ def unauthorized():
'login': url_for('login', next=request.path, _external=True)}
)
@app.route("/")
def rootstub():
"""
Root of the comex2 app is served by php,
but having this empty stub allows us to use
url_for('rootstub') when redirecting to said php
"""
pass
# /services/index/
@app.route(config['PREFIX']+'/demo/')
def demo():
"""
Demo CSS with alternative index (layout à la notebook)
"""
return render_template(
"alt_index.html",
foo="bar",
# current_user=current_user
)
# /services/
@app.route(config['PREFIX']+'/', methods=['GET'])
@app.route(config['PREFIX']+'/')
def services():
return redirect(url_for('login', _external=True))
# /services/test
# @app.route(config['PREFIX'] + '/test', methods=['GET'])
# def test_stuff():
# return render_template("message.html", message="UCACHE="+sub('<|&|>','::',repr(UCACHE)))
@app.route(config['PREFIX'] + '/test', methods=['GET'])
def test_stuff():
return render_template("message.html", message=url_for('rootstub', _external=True))
# /services/api/aggs
@app.route(config['PREFIX'] + config['API_ROUTE'] + '/aggs')
......@@ -162,8 +198,6 @@ def graph_api():
(originally @ moma/legacy_php_comex/tree/master/comex_install)
(original author S. Castillo)
"""
if 'qtype' in request.args:
graphdb=MySQL(config['SQL_HOST'])
scholars = graphdb.getScholarsList(request.args['qtype'], restparse(request.query_string.decode()))
......@@ -231,9 +265,20 @@ def login():
if login_ok:
# normal user
return redirect(url_for('profile', _external=True))
# POSS "next" request.args (useful when we'll have more pages)
# ---
next_url = request.args.get('next', None)
if next_url:
safe_flag = is_safe_url(next_url, request.host_url)
if safe_flag:
# normal next_url
return(redirect(next_url))
else:
# server name is different than ours
# in next_url so we won't go there
return(redirect(url_for('rootstub', _external=True)))
else:
# no specified next_url => profile
return redirect(url_for('profile', _external=True))
else:
# user exists in doors but has no comex profile yet
......@@ -257,6 +302,13 @@ def login():
)
# /services/user/logout/
@app.route(config['PREFIX'] + config['USR_ROUTE'] + '/logout/')
def logout():
logout_user()
return redirect(url_for('rootstub', _external=True))
# /services/user/profile/
@app.route(config['PREFIX'] + config['USR_ROUTE'] + '/profile/', methods=['GET', 'POST'])
@fresh_login_required
......@@ -271,11 +323,11 @@ def profile():
if current_user.empty:
mlog("INFO", "PROFILE: empty current_user %s" % current_user.uid)
else:
mlog("INFO", "PROFILE: current_user %s\n -" % current_user.uid
+ '\n -'.join([current_user.info['email'],
current_user.info['initials'],
str(current_user.info['keywords']),
current_user.info['country']]
mlog("DEBUG", "PROFILE: current_user %s\n -" % current_user.uid
+ '\n - '.join([current_user.info['email'],
current_user.info['initials'],
str(current_user.info['keywords']),
current_user.info['country']]
)
)
......@@ -464,7 +516,6 @@ def read_record(incoming_data):
if clean_records['org_type'] == 'other' and 'other_org_type' in clean_records:
clean_records['org_type'] = clean_records['other_org_type']
# split for kw_array
kw_array = []
if 'keywords' in clean_records:
......@@ -497,6 +548,16 @@ def sanitize(value):
return san_typed_val
def is_safe_url(target, host_url):
"""
Checks if url is ok for redirects
cf. http://flask.pocoo.org/snippets/62/
"""
ref_url = urlparse(host_url)
test_url = urlparse(urljoin(host_url, target))
return test_url.scheme in ('http', 'https') and ref_url.netloc == test_url.netloc
########### MAIN ###########
# this only uses the dev server (in prod we're run by unicorn and not as main)
if __name__ == "__main__":
......
......@@ -11,7 +11,6 @@ from os import environ, path
from urllib.parse import unquote
from ctypes import c_int32
# ========================== FILL REALCONFIG ===================================
# the main config dict (filled and exposed by this module only)
......
......@@ -8,16 +8,18 @@ __author__ = "CNRS"
__copyright__ = "Copyright 2016 ISCPIF-CNRS"
__email__ = "romain.loth@iscpif.fr"
from re import match
from requests import post
from json import dumps, loads
from datetime import time, timedelta
from flask_login import LoginManager
if __package__ == 'services':
from services.db import connect_db, get_full_scholar
from services.tools import mlog
from services.tools import mlog, REALCONFIG
else:
from db import connect_db, get_full_scholar
from tools import mlog
from tools import mlog, REALCONFIG
# will be exported to main for initialization with app
login_manager = LoginManager()
......@@ -99,11 +101,46 @@ class User(object):
return str(self.uid)
@property
def is_active(self):
def is_active(self,
# 3 months ~ 91 days
legacy_time_active = timedelta(days=91.3125)):
"""
:boolean flag:
uses scholars.status
and self.empty <=> is also active a user who exists
in doors db but not in comex_db
STATUS STR RESULT
"active" flag active
"test" flag active if DEBUG
"legacy:sent_2017-01-01" flag active until 2017/04/01
(ie 2017/01/01 + 3 months)
"""
return (not self.empty and self.info['record_status'] == "active")
if self.empty:
# the user has a doors uid so he's entitled to a login
return True
else:
# ... or has a record_status in comex_db
sirstatus = self.info['record_status']
# maybe occasionaly legacy user
legacystatus = match("legacy:sent_([\d-]{10})",sirstatus)
# boolean result
return (sirstatus == "active"
or (
legacystatus
and
date(*[int(tc) for tc in legacystatus.groups()[0].split('-')]) + legacy_time_active < date.today()
)
or (
sirstatus == "test"
and
REALCONFIG['LOG_LEVEL'] == "DEBUG"
)
)
@property
def is_anonymous(self):
......
.banner-row {
padding: 2.5em 0 ;
/*background-color: #055D9B;*/
/*background-color: #1EB3E6;*/
background-color: #00B4E6;
/*background-color: #FAB612;*/
/*background-color: #EE751C;*/
/*background-color: #F05A1A;*/
}
div.cmx-action-wrap {
text-align: left;
}
img.cmx-action {
width: 12em ;
height: 12em ;
padding: 0em !important;
margin: 1em;
}
.action-announce {
padding: 0;
border: none;
background-color: transparent;
}
.wwwpanel {
box-shadow: .2em .2em teal;
}
.panel-body.wwwthumb {
height: 35em;
width: 100% ;
overflow: hidden;
position: relative ;
}
iframe.wwwthumb {
height: 35em;
width: 100%;
top: 0 ;
left: 0 ;
position: absolute;
background-color: #555;
}
iframe.wwwthumbsmall {
transform:scale(0.7);
height: 48em;
top: -7em ;
position: absolute;
width: 70em;
left: -12em ;
background-color: #555;
border-radius: 5em;
}
.box-highlight {
background-color: #AAA ;
padding: .2em .5em ;
background-color: #B00 ;
}
.box-highlight::after {
content: "x (close)" ;
font-size: .4em;
margin-bottom: .7em;
}
#information-example {
background-color:#AAA;
border-radius: 1em;
padding: .8em;
}
......@@ -4,6 +4,17 @@
.grey { color:#554 ; }
.orange { color:#F96 ; }
/* classic look */
body {
margin: 0;
font-family: Calibri, "Helvetica Neue", Helvetica, sans-serif;
color: #333;
background-color: #fff;
}
/* not used at present but could be useful for autompleted inputs */
.autocomp {
}
......@@ -16,15 +27,16 @@
/* for intro text */
.mini-hero {
margin-top: 1.5em;
font-size: 18px;
font-size: 24px;
line-height: 27px;
font-family: Calibri, "Helvetica Neue", Helvetica, "Droid Sans", sans-serif;
}
/* a "subpage" container */
.subpage {
width: 100%;
max-width: 55em;
max-width: 65em;
display: none ; /*switching page <=> displaying it */
}
......@@ -41,6 +53,7 @@
.question {
padding: 0 1em;
margin-bottom: 2em;
max-width: 52em;
}
.conditional-q {
......
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="84.615532mm"
height="84.415535mm"
viewBox="0 0 299.81881 299.11016"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="action_query.svg"
inkscape:export-filename="/home/romain/comex/comex2/static/img/action_query.png"
inkscape:export-xdpi="150.14534"
inkscape:export-ydpi="150.14534">
<defs
id="defs4">
<inkscape:path-effect
effect="spiro"
id="path-effect4326"
is_visible="true" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="77.519193"
inkscape:cy="153.28134"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1600"
inkscape:window-height="833"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
fit-margin-top="-0.2"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-170.34956,-223.30853)">
<circle
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:9;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:9,18;stroke-dashoffset:0;stroke-opacity:1"
id="path6928"
cx="320.17776"
cy="372.42807"
r="140.56601" />
<g
id="g12803"
transform="matrix(0.95571977,0,0,0.95571977,14.087786,14.200633)">
<text
sodipodi:linespacing="125%"
id="text4296"
y="393.54709"
x="200.48189"
style="font-style:normal;font-weight:normal;font-size:62.27104568px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#323232;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:93.40657043px;font-family:Calibri;-inkscape-font-specification:'Calibri Bold';fill:#323232;fill-opacity:1"
y="393.54709"
x="200.48189"
id="tspan4298"
sodipodi:role="line"><tspan
id="tspan12716"
style="fill:none">Q</tspan>uery</tspan></text>
<text
sodipodi:linespacing="54.000002%"
id="text4303"
y="364.52042"
x="216.50439"
style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:54.00000215%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;line-height:54.00000215%;font-family:Cambria;-inkscape-font-specification:Cambria"
y="364.52042"
x="216.50439"
id="tspan4305"
sodipodi:role="line">key</tspan><tspan
id="tspan4307"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;line-height:54.00000215%;font-family:Cambria;-inkscape-font-specification:Cambria"
y="371.27042"
x="216.50439"
sodipodi:role="line">words</tspan></text>
<ellipse
ry="23.67676"
rx="26.283714"
cy="-73.82975"
cx="431.11615"
transform="matrix(0.38656868,0.92226062,-0.88915834,0.45759966,0,0)"
id="path17162-6"
style="fill:#7dffff;fill-opacity:0.61827955;stroke:#323232;stroke-width:10.01538849;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<g
transform="matrix(1.1509713,0.08484079,-0.08771189,1.1369158,-45.160357,-66.119567)"
id="g12720">
<rect
style="fill:#3465a4;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.77612925;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect3554"
width="34.687897"
height="8.1423111"
x="480.92902"
y="4.986599"
transform="matrix(0.60941858,0.79284866,-0.79726634,0.60362769,0,0)"
inkscape:transform-center-x="5.5707816"
inkscape:transform-center-y="4.7163073" />
<path
style="fill:#3465a4;stroke:#000000;stroke-width:2.77609229;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 279.90063,383.17918 3.90896,-2.95956 5.24695,3.98676 -6.46538,5.07599 -2.69053,-6.10319 z"
id="path4324"
inkscape:path-effect="#path-effect4326"
inkscape:original-d="m 279.90063,383.17918 3.90896,-2.95956 5.24695,3.98676 -6.46538,5.07599 z"
inkscape:connector-curvature="0"
inkscape:transform-center-x="17.527562"
inkscape:transform-center-y="-11.055272" />
</g>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="84.615532mm"
height="84.415535mm"
viewBox="0 0 299.81881 299.11016"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="action_stats.svg"
inkscape:export-filename="/home/romain/comex/comex2/static/img/action_stats.png"
inkscape:export-xdpi="150.14534"
inkscape:export-ydpi="150.14534">
<defs
id="defs4">
<marker
inkscape:stockid="TriangleInM"
orient="auto"
refY="0.0"
refX="0.0"
id="TriangleInM"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5285"
d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(-0.4)" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5149"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.8) translate(12.5,0)" />
</marker>
<inkscape:path-effect
effect="spiro"
id="path-effect4326"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-9"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-5"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-7"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-53"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-8"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-93"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-74"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-90"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-85"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-3"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-38"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-97"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-32"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-3-3"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-38-7"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect4326-0-38-7-0"
is_visible="true" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="-89.474861"
inkscape:cy="210.56691"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1600"
inkscape:window-height="833"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
fit-margin-top="-0.2"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-170.34956,-223.30853)">
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:7.82567978;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4925"
width="285.57281"
height="287.5491"
x="178.58095"
y="227.88568" />
<path
style="fill:#ffcc00;stroke:#000000;stroke-width:9.09265804;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 214.81671,376.15076 72.44822,0.89347 0.92179,87.50034 -68.88476,-0.19539 -4.48525,-88.19842 z"
id="path4324-0"
inkscape:path-effect="#path-effect4326-0-38"
inkscape:original-d="m 214.81671,376.15076 72.44822,0.89347 0.92179,87.50034 -68.88476,-0.19539 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<g
id="g12024"
transform="matrix(1.7217826,0,0,1.7217826,223.03281,322.43455)">
<rect
id="rect12026"
height="2"
width="21"
y="15"
x="8"
style="fill:#1d1d1b" />
</g>
<g
id="g12032"
transform="matrix(1.7217826,0,0,1.7217826,223.03281,318.43455)">
<rect
id="rect12034"
height="2"
width="21"
y="20.799999"
x="8"
style="fill:#1d1d1b" />
</g>
<path
style="fill:#008080;stroke:#000000;stroke-width:9.09265804;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 290.92144,410.06888 67.32752,1.96953 0.95919,52.978 -71.67948,-0.1183 3.39277,-54.82923 z"
id="path4324-0-8"
inkscape:path-effect="#path-effect4326-0-38-7"
inkscape:original-d="m 290.92144,410.06888 67.32752,1.96953 c 156.65461,-36.76999 52.60971,17.22478 0.95919,52.978 l -71.67948,-0.1183 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#008000;stroke:#000000;stroke-width:9.09265804;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 359.47953,382.84568 79.34299,0.11178 -10.5004,81.61395 -69.36089,-0.18067 0.5183,-81.54506 z"
id="path4324-0-8-5"
inkscape:path-effect="#path-effect4326-0-38-7-0"
inkscape:original-d="m 359.47953,382.84568 79.34299,0.11178 c 151.58737,-56.14934 39.4794,27.01726 -10.5004,81.61395 l -69.36089,-0.18067 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<g
id="g12024-8"
transform="matrix(1.7217826,0,0,1.7217826,292.94428,349.82567)">
<rect
id="rect12026-5"
height="2"
width="21"
y="15"
x="8"
style="fill:#1d1d1b" />
</g>
<g
id="g12032-5"
transform="matrix(1.0925309,0,0,1.7217826,297.97829,345.82567)">
<rect
id="rect12034-7"
height="2"
width="21"
y="20.799999"
x="8"
style="fill:#1d1d1b" />
</g>
<g
id="g12028-3"
transform="matrix(1.7217826,0,0,1.7217826,363.08765,340.99088)">
<rect
id="rect12030-9"
height="2"
width="21"
y="9.1999998"
x="8"
style="fill:#1d1d1b" />
</g>
<g
id="g12032-6"
transform="matrix(1.7217826,0,0,1.7217826,363.08765,326.99088)">
<rect
id="rect12034-9"
height="2"
width="21"
y="20.799999"
x="8"
style="fill:#1d1d1b" />
</g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:11.36582279px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="211.13902"
y="524.05255"
id="text14656"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan14658"
x="211.13902"
y="524.05255"
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:45.46329117px;font-family:'Helvetica Inserat LT Std';-inkscape-font-specification:'Helvetica Inserat LT Std Ultra-Bold'" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12.5px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="251.77814"
y="309.56155"
id="text14660"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan14662"
x="251.77814"
y="309.56155"
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:50px;font-family:'Helvetica Inserat LT Std';-inkscape-font-specification:'Helvetica Inserat LT Std Ultra-Bold'">STATS !</tspan></text>
</g>
</svg>
......@@ -53,11 +53,21 @@ function completionAsYouGo() {
}
// list of missing fields
cmxClt.uform.mainMessage.innerHTML += cmxClt.ulListFromLabelsArray(mandatoryMissingFields, ['red']) + cmxClt.ulListFromLabelsArray(optionalMissingFields, ['white'], "You may also want to fill:")
cmxClt.uform.mainMessage.innerHTML += cmxClt.ulListFromLabelsArray(mandatoryMissingFields, ['red'])
if (optionalMissingFields.length) {
cmxClt.uform.mainMessage.innerHTML += cmxClt.ulListFromLabelsArray(
optionalMissingFields,
['white'],
"You may also want to fill:"
)
}
// stamp => #last_modified_date
cmxClt.uform.stampTime()
console.log("timestamp", cmxClt.uform.timestamp.value)
// debug
// console.log("timestamp:", cmxClt.uform.timestamp.value)
}
// run first check on existing profile data pre-filled by the template
......
This diff is collapsed.
......@@ -8,7 +8,10 @@
<link type=text/css rel=stylesheet href="{{ url_for('static', filename='css/topbar_bootstrap_retrocompatibility.css') }}">
<link type=text/css rel=stylesheet href="{{ url_for('static', filename='js/jquery-ui-1.12.1/jquery-ui.min.css') }}">
<link type=text/css rel=stylesheet href="{{ url_for('static', filename='js/realperson/jquery.realperson.css') }}">
<link type=text/css rel=stylesheet href="{{ url_for('static', filename='css/comex_reg.css') }}">
<link type=text/css rel=stylesheet href="{{ url_for('static', filename='css/comex_user.css') }}">
<!-- <link type=text/css rel=stylesheet href="{{ url_for('static', filename='css/bootstrap_index.css') }}"> -->
<!-- ## JS ## -->
......
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