Skip to content

Commit

Permalink
Adjust previously revised checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Dec 6, 2017
1 parent 27d7381 commit 7583c2b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/galaxy/webapps/tool_shed/controllers/repository.py
Expand Up @@ -1082,11 +1082,12 @@ def find_tools(self, trans, **kwd):
else:
message = "No search performed - each field must contain the same number of comma-separated items."
status = "error"
exact_matches_check_box = CheckboxField('exact_matches', value=exact_matches_checked)
return trans.fill_template('/webapps/tool_shed/repository/find_tools.mako',
tool_id=basic_util.stringify(tool_ids),
tool_name=basic_util.stringify(tool_names),
tool_version=basic_util.stringify(tool_versions),
exact_matches_checked=exact_matches_checked,
exact_matches_check_box=exact_matches_check_box,
message=message,
status=status)

Expand Down Expand Up @@ -1173,9 +1174,10 @@ def find_workflows(self, trans, **kwd):
else:
exact_matches_checked = False
workflow_names = []
exact_matches_check_box = CheckboxField('exact_matches', value=exact_matches_checked)
return trans.fill_template('/webapps/tool_shed/repository/find_workflows.mako',
workflow_name=basic_util.stringify(workflow_names),
exact_matches_checked=exact_matches_checked,
exact_matches_check_box=exact_matches_check_box,
message=message,
status=status)

Expand Down Expand Up @@ -1817,8 +1819,8 @@ def manage_email_alerts(self, trans, **kwd):
message = 'You will receive email alerts for all new valid tool shed repositories.'
else:
message = 'You will not receive any email alerts for new valid tool shed repositories.'
new_repo_alert_checked = new_repo_alert_checked or (user and user.new_repo_alert)
new_repo_alert_check_box = CheckboxField('new_repo_alert')
checked = new_repo_alert_checked or (user and user.new_repo_alert)
new_repo_alert_check_box = CheckboxField('new_repo_alert', value=checked)
email_alert_repositories = []
for repository in trans.sa_session.query(trans.model.Repository) \
.filter(and_(trans.model.Repository.table.c.deleted == false(),
Expand All @@ -1828,7 +1830,6 @@ def manage_email_alerts(self, trans, **kwd):
email_alert_repositories.append(repository)
return trans.fill_template("/webapps/tool_shed/user/manage_email_alerts.mako",
new_repo_alert_check_box=new_repo_alert_check_box,
new_repo_alert_checked=new_repo_alert_checked,
email_alert_repositories=email_alert_repositories,
message=message,
status=status)
Expand Down Expand Up @@ -1932,8 +1933,8 @@ def manage_repository(self, trans, id, **kwd):
else:
current_allow_push_list = []
allow_push_select_field = repository_util.build_allow_push_select_field(trans, current_allow_push_list)
alerts_checked = alerts_checked or user.email in email_alerts
alerts_check_box = CheckboxField('alerts')
checked = alerts_checked or user.email in email_alerts
alerts_check_box = CheckboxField('alerts', value=checked)
changeset_revision_select_field = grids_util.build_changeset_revision_select_field(trans,
repository,
selected_value=changeset_revision,
Expand Down Expand Up @@ -2033,7 +2034,6 @@ def manage_repository(self, trans, id, **kwd):
display_reviews=display_reviews,
num_ratings=num_ratings,
alerts_check_box=alerts_check_box,
alerts_checked=alerts_checked,
malicious_check_box=malicious_check_box,
repository_type_select_field=repository_type_select_field,
message=message,
Expand Down

0 comments on commit 7583c2b

Please sign in to comment.