Skip to content

Commit

Permalink
CCC: More locations fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
flavour committed Jul 15, 2019
1 parent abc44c3 commit 2c9c9e8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2fdf0c175 (2019-07-15 19:49:59)
abc44c340 (2019-07-15 20:08:41)
10 changes: 5 additions & 5 deletions modules/templates/CCC/Demo/doc_document.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name,Country,L1,L2,Comments,Organisation,Author,Date,Attachment
Allerdale Emergency Plan,GB,Cumbria,Allerdale,,Allerdale Community Organisation,[email protected],2019-07-01,
Allerdale Evacuation Plan,GB,Cumbria,Allerdale,,Allerdale Community Organisation,[email protected],2019-07-02,
Eden Emergency Plan,GB,Cumbria,Eden,,Eden Community Organisation,[email protected],2019-07-01,
Eden Evacuation Plan,GB,Cumbria,Eden,,Eden Community Organisation,[email protected],2019-07-02,
Name,Country,L1,L2,L3,Comments,Organisation,Author,Date,Attachment
Allerdale Emergency Plan,GB,England,Cumbria,Allerdale,,Allerdale Community Organisation,[email protected],2019-07-01,
Allerdale Evacuation Plan,GB,England,Cumbria,Allerdale,,Allerdale Community Organisation,[email protected],2019-07-02,
Eden Emergency Plan,GB,England,Cumbria,Eden,,Eden Community Organisation,[email protected],2019-07-01,
Eden Evacuation Plan,GB,England,Cumbria,Eden,,Eden Community Organisation,[email protected],2019-07-02,
9 changes: 7 additions & 2 deletions modules/templates/CCC/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,9 @@ def customise_hrm_training_event_resource(r, tablename):
table.name.readable = table.name.writable = True
f = table.location_id
f.readable = f.writable = True
f.widget = S3LocationSelector(show_address = True)
f.widget = S3LocationSelector(levels = ("L3"),
required_levels = ("L3"),
show_address = True)

list_fields = ["start_date",
"name",
Expand Down Expand Up @@ -1331,7 +1333,7 @@ def req_need_organisation_onaccept(form):
def customise_req_need_resource(r, tablename):

from s3 import IS_ONE_OF, IS_UTC_DATETIME, S3CalendarWidget, S3DateTime, \
S3SQLCustomForm, S3SQLInlineComponent, \
S3LocationSelector, S3SQLCustomForm, S3SQLInlineComponent, \
S3OptionsFilter, S3TextFilter, s3_comments_widget

s3db = current.s3db
Expand Down Expand Up @@ -1377,6 +1379,9 @@ def customise_req_need_resource(r, tablename):
f.requires = IS_UTC_DATETIME()
f.widget = S3CalendarWidget(timepicker = True)
table.end_date.readable = table.end_date.writable = True
table.location_id.widget = S3LocationSelector(levels = ("L3"),
required_levels = ("L3"),
show_address = True)

current.response.s3.crud_strings[tablename] = Storage(
label_create = T("New Opportunity"),
Expand Down
2 changes: 1 addition & 1 deletion private/eden_deploy

0 comments on commit 2c9c9e8

Please sign in to comment.