diff --git a/src/data/templates/view_person_detail.html b/src/data/templates/view_person_detail.html
index 5d0d0b5ee..ee3f2b77f 100644
--- a/src/data/templates/view_person_detail.html
+++ b/src/data/templates/view_person_detail.html
@@ -50,8 +50,8 @@
{{nameform.surname.label}}: |
{% render nameform.prefix user action %} |
{% render nameform.surname user action %} |
- {{nameform.origin.label}}: |
- {% render nameform.origin user action %} |
+ {{nameform.name_origin_type.label}}: |
+ {% render nameform.name_origin_type user action %} |
{{personform.gender_type.label}}: |
diff --git a/src/webapp/grampsdb/forms.py b/src/webapp/grampsdb/forms.py
index 25b79db22..40535774e 100644
--- a/src/webapp/grampsdb/forms.py
+++ b/src/webapp/grampsdb/forms.py
@@ -94,8 +94,8 @@ class NameForm(forms.ModelForm):
nick = forms.CharField(label="Nick",
required=False,
widget=TextInput(attrs={'size':'15'}))
- origin = forms.CharField(required=False,
- widget=TextInput(attrs={'size':'15'}))
+
+ name_origin_type = forms.ChoiceField()
class NameFormFromPerson(NameForm):
class Meta:
diff --git a/src/webapp/grampsdb/views.py b/src/webapp/grampsdb/views.py
index a000040d6..a4137eb4a 100644
--- a/src/webapp/grampsdb/views.py
+++ b/src/webapp/grampsdb/views.py
@@ -587,6 +587,7 @@ def get_person_forms(handle, protect=False, empty=False):
"suffix": make_empty(empty, name.suffix, " suffix "),
"first_name": name.first_name,
"name_type": name.name_type,
+ "name_origin_type": primary_surname.name_origin_type,
"title": name.title,
"nick": name.nick,
"call": name.call,
diff --git a/src/webapp/utils.py b/src/webapp/utils.py
index f3568ba2e..56a11d694 100644
--- a/src/webapp/utils.py
+++ b/src/webapp/utils.py
@@ -325,9 +325,9 @@ def source_table(obj, user, action, url=None, *args):
if citation_ref.citation.source:
source = citation_ref.citation.source
table.row(source,
- source_ref.ref_object.title,
- source_ref.ref_object.author,
- source_ref.page,
+ source.title,
+ source.author,
+ citation_ref.citation.page,
)
retval += table.get_html()
if user.is_authenticated() and url and action == "view":