Person view details and edit sorta working

svn: r18589
This commit is contained in:
Doug Blank 2011-12-13 02:08:47 +00:00
parent e705da749c
commit 1d109195b8
13 changed files with 10 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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