ef2c9d1e1c83223c279faa8e2b1fe2df5219c7f9,modules/s3db/dc.py,DataCollectionTemplateModel,dc_question_onaccept,#Any#,575
Before Change
field_settings["mobile"]["widget"] = {"type": "heatmap"}
num_clicks = question_settings.get("numClicks")
if num_clicks:
field_settings["mobile"]["requires"] = {"numClicks": [0, numClicks]}
else:
current.log.debug(field_type)
raise NotImplementedError
After Change
other = question_settings.get("other")
if other:
other_id = question_settings.get("other_id")
if other_id:
// Update the Dynamic Field
db(current.s3db.s3_field.id == other_id).update(label = question.name)
// @ToDo: Call onaccept if this starts doing anything other than just setting "master"
else:
// Create the Dynamic Field
// Lookup the table_id
ttable = db.dc_template
template = db(ttable.id == question.template_id).select(ttable.table_id,
limitby=(0, 1)
).first()
from uuid import uuid1
name = "f%s" % str(uuid1()).replace("-", "_")
field_id = current.s3db.s3_field.insert(table_id = template.table_id,
label = other,
name = name,
field_type = "text",
)
// @ToDo: Call onaccept if this starts doing anything other than just setting "master"
// @ToDo: Call set_record_owner() once we start restricting these
elif field_type == 7:
// "Date"
field_type = "date"
elif field_type == 8:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: sahana/eden
Commit Name: ef2c9d1e1c83223c279faa8e2b1fe2df5219c7f9
Time: 2019-08-18
Author: fran@aidiq.com
File Name: modules/s3db/dc.py
Class Name: DataCollectionTemplateModel
Method Name: dc_question_onaccept
Project Name: sahana/eden
Commit Name: 2ae0f1a6bd4ad9325e0f7a2d1d9d1200c47cc39b
Time: 2020-03-03
Author: dominic@nursix.org
File Name: modules/s3/s3payments.py
Class Name: PayPalAdapter
Method Name: register_subscription
Project Name: sahana/eden
Commit Name: 64768706ffa05f7fa1ecd81282de88ef0b4a5866
Time: 2021-01-15
Author: dominic@nursix.org
File Name: modules/templates/RLPPTM/helpers.py
Class Name: rlpptm_InviteUserOrg
Method Name: invite