Person view details and edit sorta working
svn: r18589
This commit is contained in:
parent
e705da749c
commit
1d109195b8
@ -45,7 +45,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -43,7 +43,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -75,7 +75,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -28,7 +28,6 @@
|
||||
</table>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -67,7 +67,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -33,7 +33,6 @@
|
||||
</table>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -72,7 +72,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -36,7 +36,6 @@
|
||||
</table>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -32,7 +32,6 @@
|
||||
</table>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -45,7 +45,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -34,7 +34,6 @@
|
||||
</table>
|
||||
|
||||
<!-- Tabs -->
|
||||
<h2 class="demoHeaders">Tabs</h2>
|
||||
|
||||
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
|
||||
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
||||
|
@ -466,7 +466,7 @@ def view_person_detail(request, view, handle, action="view"):
|
||||
except:
|
||||
name = Name(person=person, preferred=True)
|
||||
primary_surname = name.surname_set.get(primary=True)
|
||||
default_data = {"surname": "XX" or primary_surname.surname,
|
||||
default_data = {"surname": primary_surname.surname,
|
||||
"prefix": primary_surname.prefix or "prefix",
|
||||
"suffix": name.suffix or "suffix",
|
||||
"first_name": name.first_name,
|
||||
@ -519,7 +519,11 @@ def view_person_detail(request, view, handle, action="view"):
|
||||
return fix_person(request, person)
|
||||
pf = PersonForm(instance=person)
|
||||
pf.model = person
|
||||
primary = name.surname_set.get(primary=True)
|
||||
nf = NameForm(instance=name)
|
||||
nf.prefix=primary.prefix
|
||||
nf.surname=primary.surname
|
||||
nf.origin=primary.name_origin_type
|
||||
nf.model = name
|
||||
else: # view person detail
|
||||
# BEGIN NON-AUTHENTICATED ACCESS
|
||||
|
@ -582,7 +582,11 @@ def render(formfield, user, action, test=False, truetext=""):
|
||||
try:
|
||||
retval = str(getattr(formfield.form.model, fieldname))
|
||||
except:
|
||||
retval = "???" # formfield._data()
|
||||
# name, "prefix"
|
||||
try:
|
||||
retval = str(getattr(formfield.form, fieldname)) # formfield._data()
|
||||
except:
|
||||
retval = "XXX"
|
||||
else:
|
||||
retval = truetext
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user