diff -r 660502cad63a -r cdd11aa8dbc7 app/soc/views/models/student_proposal.py --- a/app/soc/views/models/student_proposal.py Mon Mar 09 19:37:56 2009 +0000 +++ b/app/soc/views/models/student_proposal.py Mon Mar 09 20:43:46 2009 +0000 @@ -533,6 +533,16 @@ if mentor_entity and choice: self._adjustPossibleMentors(entity, mentor_entity, choice) + is_ineligible = request.GET.get('ineligible') + if org_admin_entity and is_ineligible: + # mark the proposal invalid and return to the list + properties = {'status': 'invalid'} + self._logic.updateEntityProperties(entity, properties) + + redirect = redirects.getListProposalsRedirect(entity.org, + {'url_name': 'org'}) + return http.HttpResponseRedirect(redirect) + # decide which form to use if org_admin_entity: form = params['admin_review_form'] @@ -692,6 +702,9 @@ # show "I am willing to mentor" context['add_me_as_mentor'] = True + if org_admin: + context['is_org_admin'] = True + return context def _adjustPossibleMentors(self, entity, mentor, choice):