Commit 4c949fc8 authored by Romain Loth's avatar Romain Loth

make job info optional (were half-baked)

parent a3e0fa72
......@@ -881,11 +881,8 @@ def save_form(clean_records, update_flag=False, previous_user_info=None):
mlog('DEBUG', 'save_form: declared values for org =', declared_orgs)
# B2) check our constraint (cf. also E.)
if (declared_orgs['lab'] is None and declared_orgs['inst'] is None):
raise ValueError("At least 1 org (lab or institution) must be filled")
# B3) for each, read/fill the orgs table to get associated id(s) in DB
# B2) for each optional declared org,
# read/fill the orgs table to get associated id(s) in DB
orgids = []
for oclass in ['lab', 'inst']:
......@@ -896,7 +893,7 @@ def save_form(clean_records, update_flag=False, previous_user_info=None):
mlog('DEBUG', 'save_form: found ids for orgs =', orgids)
# B4) save the org <=> org mappings TODO LATER (not a priority)
# B3) save the org <=> org mappings TODO LATER (not a priority)
# dbcrud.record_org_org_link(src_orgid, tgt_orgid, reg_db)
# C) create/update record into the primary user table
......
......@@ -51,7 +51,7 @@ var cmxClt = (function() {
["last_name", true, "plsfill", "t", "basic_infos"],
["country", true, "plsfill", "t", "basic_infos"],
["initials", true, "pref", "t", null],
["position", true, "plsfill", "t", "org_infos"],
["position", true, "pref", "t", "org_infos"],
["interests_text", false, "pref", "t", "other_infos"],
["gender", false, "plsfill", "m", "other_infos"],
["job_looking", false, "pref" , "m", "map_infos"],
......
......@@ -348,7 +348,7 @@
role="tabpanel" aria-expanded="false">
<div class="question input-group">
<label for="position" class="smlabel input-group-addon">* Job Position</label>
<label for="position" class="smlabel input-group-addon">Job Position</label>
<input id="position" name="position" maxlength="30"
type="text" class="form-control autocomp" placeholder="titre"
onblur="cmxClt.makeBold(this)" onfocus="cmxClt.makeNormal(this)"
......
......@@ -6,7 +6,7 @@
<!-- lab or team and details -->
<div class="question">
<div class="input-group">
<label for="lab_label" class="smlabel input-group-addon">* Lab / Team / Dept</label>
<label for="lab_label" class="smlabel input-group-addon">Lab / Team / Dept</label>
<input id="lab_label" name="lab_label" maxlength="250"
type="text" class="form-control" placeholder="More detailed affiliation, if relevant"
value="{{ current_user.info.labs[0].label if current_user.info.labs|length > 0 }}">
......
......@@ -160,7 +160,7 @@
<div class="question">
<div class="input-group">
<label for="lab_label" class="smlabel input-group-addon">* Lab / Team / Dept</label>
<label for="lab_label" class="smlabel input-group-addon">Lab / Team / Dept</label>
<input id="lab_label" name="lab_label" maxlength="120"
type="text" class="form-control" placeholder="Your lab"
placeholder="lab_label">
......
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