Fixed a form definition editing bug

This commit is contained in:
Ramkrishna Chakrabarty
2009-10-19 09:53:04 -04:00
parent 305fc1b14b
commit 1a9209d5bf
3 changed files with 9 additions and 9 deletions
+6 -6
View File
@@ -313,10 +313,10 @@ class Forms( BaseController ):
ctr=0
sb_options = []
while True:
option = params.get( 'field_'+str(index)+'_option_'+str(ctr), None )
ctr = ctr+1
if option:
if kwd.has_key( 'field_'+str(index)+'_option_'+str(ctr) ):
option = params.get( 'field_'+str(index)+'_option_'+str(ctr), None )
sb_options.append(util.restore_text(option))
ctr = ctr+1
else:
return sb_options
def __get_saved_form(self, fd):
@@ -342,8 +342,8 @@ class Forms( BaseController ):
layout = []
index = 0
while True:
grid_name = util.restore_text( params.get( 'grid_layout%i' % index, '' ) )
if grid_name:
if kwd.has_key( 'grid_layout%i' % index ):
grid_name = util.restore_text( params.get( 'grid_layout%i' % index, '' ) )
layout.append( grid_name )
index = index + 1
else:
@@ -355,7 +355,7 @@ class Forms( BaseController ):
# get the user entered fields
index = 0
while True:
if params.get( 'field_name_%i' % index, False ):
if kwd.has_key( 'field_name_%i' % index ):
fields.append( self.__get_field( index, **kwd ) )
index = index + 1
else:
+1 -1
View File
@@ -23,7 +23,7 @@
</div>
%else:
<div popupmenu="form-${form.id}-popup">
<a class="action-button" href="${h.url_for( action='edit', form_id=form.id, show_form=True )}">Edit form definition</a>
<a class="action-button" href="${h.url_for( action='edit', form_id=form.id, show_form=True )}">Edit</a>
<a class="action-button" confirm="Click OK to delete the form ${form.name}." href="${h.url_for( action='delete', form_id=form.id )}">Delete</a>
</div>
%endif
@@ -63,14 +63,14 @@
<div class="toolForm">
%if form.desc:
<div class="toolFormTitle">${form.name} - <i>${form.desc}</i>
<div class="toolFormTitle">${form.name} - <i> ${form.desc}</i> (${form.type})
<a id="form-${form.id}-popup" class="popup-arrow" style="display: none;">&#9660;</a>
<div popupmenu="form-${form.id}-popup">
<a class="action-button" href="${h.url_for( action='edit', form_id=form.id, show_form=True )}">Edit</a>
</div>
</div>
%else:
<div class="toolFormTitle">${form.name}
<div class="toolFormTitle">${form.name} (${form.type})
<a id="form-${form.id}-popup" class="popup-arrow" style="display: none;">&#9660;</a>
<div popupmenu="form-${form.id}-popup">
<a class="action-button" href="${h.url_for( action='edit', form_id=form.id, show_form=True )}">Edit</a>