details: http://www.bx.psu.edu/hg/galaxy/rev/e12587356892 changeset: 3730:e12587356892 user: rc date: Mon May 03 09:34:13 2010 -0400 description: lims: request page now shows a msg if the request has library selected forms default value bug fixed diffstat: lib/galaxy/model/__init__.py | 6 ++++++ lib/galaxy/web/controllers/forms.py | 4 ++-- templates/admin/requests/show_request.mako | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diffs (53 lines): diff -r a367a7cd53bb -r e12587356892 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Sun May 02 15:34:41 2010 -0400 +++ b/lib/galaxy/model/__init__.py Mon May 03 09:34:13 2010 -0400 @@ -1448,6 +1448,12 @@ return self.state() == self.states.NEW def complete(self): return self.state() == self.states.COMPLETE + def sequence_run_ready(self): + samples = [] + for s in self.samples: + if not s.library: + samples.append(s.name) + return samples class RequestEvent( object ): diff -r a367a7cd53bb -r e12587356892 lib/galaxy/web/controllers/forms.py --- a/lib/galaxy/web/controllers/forms.py Sun May 02 15:34:41 2010 -0400 +++ b/lib/galaxy/web/controllers/forms.py Mon May 03 09:34:13 2010 -0400 @@ -469,7 +469,7 @@ 'required': row[3], 'type': row[4], 'selectlist': options, - 'default': row[7]}) + 'default': row[6]}) except: return trans.response.send_redirect( web.url_for( controller='forms', action='new', @@ -565,7 +565,7 @@ # helptext self.helptext.value = field['helptext'] # default value - self.default.value = field['default'] + self.default.value = field.get('default', TextField('field_default_'+str(index), 40, '')) # type self.fieldtype = SelectField('field_type_'+str(self.index), refresh_on_change=True, diff -r a367a7cd53bb -r e12587356892 templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Sun May 02 15:34:41 2010 -0400 +++ b/templates/admin/requests/show_request.mako Mon May 03 09:34:13 2010 -0400 @@ -108,6 +108,12 @@ document.onkeypress = stopRKey </script> +%if request.submitted(): + <% samples_not_ready = request.sequence_run_ready() %> + %if samples_not_ready: + ${render_msg( "Select a target library and folder for all the samples before starting the sequence run", "warning" )} + %endif +%endif %if request.rejected(): ${render_msg( "Reason for rejection: "+request.last_comment(), "warning" )}