[hg] galaxy 2892: Fixed a form definition editing bug
details: http://www.bx.psu.edu/hg/galaxy/rev/2f249afc66ea changeset: 2892:2f249afc66ea user: rc date: Mon Oct 19 09:53:04 2009 -0400 description: Fixed a form definition editing bug 3 file(s) affected in this change: lib/galaxy/web/controllers/forms.py templates/admin/forms/manage_forms.mako templates/admin/forms/show_form_read_only.mako diffs (69 lines): diff -r 38bbf36f70e8 -r 2f249afc66ea lib/galaxy/web/controllers/forms.py --- a/lib/galaxy/web/controllers/forms.py Sun Oct 18 18:19:12 2009 -0400 +++ b/lib/galaxy/web/controllers/forms.py Mon Oct 19 09:53:04 2009 -0400 @@ -313,10 +313,10 @@ 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 @@ 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 @@ # 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: diff -r 38bbf36f70e8 -r 2f249afc66ea templates/admin/forms/manage_forms.mako --- a/templates/admin/forms/manage_forms.mako Sun Oct 18 18:19:12 2009 -0400 +++ b/templates/admin/forms/manage_forms.mako Mon Oct 19 09:53:04 2009 -0400 @@ -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 diff -r 38bbf36f70e8 -r 2f249afc66ea templates/admin/forms/show_form_read_only.mako --- a/templates/admin/forms/show_form_read_only.mako Sun Oct 18 18:19:12 2009 -0400 +++ b/templates/admin/forms/show_form_read_only.mako Mon Oct 19 09:53:04 2009 -0400 @@ -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;">▼</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;">▼</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>
participants (1)
-
Greg Von Kuster