diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-16 17:55:00 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-28 11:40:16 +0100 |
| commit | cfcbb04a4c2eb4cd587f34826f2ce69ff6025312 (patch) | |
| tree | e96f14eb96dd0c44aa0d5e5b8b4f9e8aa2cd110d /archaeological_finds/forms.py | |
| parent | 948d624874bee030a03d63c114a5040113ef694c (diff) | |
| download | Ishtar-cfcbb04a4c2eb4cd587f34826f2ce69ff6025312.tar.bz2 Ishtar-cfcbb04a4c2eb4cd587f34826f2ce69ff6025312.zip | |
Wizard: display selected on final wizard panel
Diffstat (limited to 'archaeological_finds/forms.py')
| -rw-r--r-- | archaeological_finds/forms.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 663ab3663..4df6629e1 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -53,7 +53,8 @@ from bootstrap_datepicker.widgets import DatePicker from ishtar_common import widgets from ishtar_common.forms import CustomForm, CustomFormSearch, FormSet, \ FloatField, reverse_lazy, TableSelect, get_now, FinalForm, \ - ManageOldType, FieldType, IshtarForm, FormHeader, QAForm, HistorySelect + ManageOldType, FieldType, IshtarForm, FormHeader, QAForm, HistorySelect, \ + PkWizardSearch from ishtar_common.forms_common import get_town_field from ishtar_common.models import valid_id, valid_ids, get_current_profile, \ SpatialReferenceSystem, Area, OperationType @@ -910,8 +911,19 @@ class FindDeletionForm(FinalForm): confirm_end_msg = _(u"Would you like to delete this find?") -class UpstreamFindFormSelection(FindFormSelection): +class UpstreamFindFormSelection(PkWizardSearch, FindFormSelection): form_label = _(u"Upstream find") + current_model = models.Find + pk_key = 'resulting_pk' + + pk = forms.CharField( + label="", required=False, + widget=widgets.DataTable( + reverse_lazy('get-find'), + FindSelect, current_model, + multiple_select=True, + source_full=reverse_lazy('get-find-full')), + validators=[valid_ids(current_model)]) def __init__(self, *args, **kwargs): super(UpstreamFindFormSelection, self).__init__(*args, **kwargs) |
