Working on name_origin_type

svn: r19541
This commit is contained in:
Doug Blank 2012-05-16 13:49:53 +00:00
parent b9eb3cefd3
commit ba4f791bb7
4 changed files with 8 additions and 7 deletions

View File

@ -50,8 +50,8 @@
<td class="ColumnAttribute" align="right">{{nameform.surname.label}}:</td>
<td class="ColumnValue" id="data">{% render nameform.prefix user action %}</td>
<td class="ColumnValue" id="data" colspan="2">{% render nameform.surname user action %}</td>
<td class="ColumnAttribute" align="right">{{nameform.origin.label}}:</td>
<td class="ColumnValue" id="data" colspan="2">{% render nameform.origin user action %}</td>
<td class="ColumnAttribute" align="right">{{nameform.name_origin_type.label}}:</td>
<td class="ColumnValue" id="data" colspan="2">{% render nameform.name_origin_type user action %}</td>
</tr>
<tr>
<td class="ColumnAttribute" align="right">{{personform.gender_type.label}}:</td>

View File

@ -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:

View File

@ -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,

View File

@ -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":