Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove usages of HtmlView(String,String) #147

Merged
merged 4 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hdrl/src/org/labkey/hdrl/HDRLController.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.labkey.api.security.permissions.InsertPermission;
import org.labkey.api.security.permissions.ReadPermission;
import org.labkey.api.settings.AdminConsole;
import org.labkey.api.util.HtmlString;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.util.Path;
import org.labkey.api.util.URLHelper;
Expand Down Expand Up @@ -103,7 +104,7 @@ public ModelAndView getView(Object o, BindException errors)
{
VBox vbox = new VBox();

HtmlView submitView = new HtmlView("New Test Request", PageFlowUtil.link("Submit new test request").href(new ActionURL(EditRequestAction.class, getViewContext().getContainer())).toString());
HtmlView submitView = new HtmlView("New Test Request", HtmlString.of(PageFlowUtil.link("Submit new test request").href(new ActionURL(EditRequestAction.class, getViewContext().getContainer()))));
vbox.addView(submitView);

UserSchema schema = QueryService.get().getUserSchema(getUser(), getContainer(), HDRLQuerySchema.NAME);
Expand Down Expand Up @@ -184,7 +185,7 @@ public ModelAndView getView(RequestForm form, BindException errors) throws Excep
}

if (form.getRequestStatusId() >= 2 && !getContainer().hasPermission(getUser(), AdminPermission.class))
return new HtmlView("This request has been submitted and is locked from editing.");
return HtmlView.of("This request has been submitted and is locked from editing.");
else
return new JspView<>("/org/labkey/hdrl/view/editRequest.jsp", form, errors);
}
Expand Down
5 changes: 4 additions & 1 deletion viscstudies/resources/views/studydesigns.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<style type="text/css">
.study-header {font-size:larger;font-weight:bold;border-bottom:1px solid black;border-top:1px solid black}
</style>
<div><span id="facets"></span><div style="display:inline-block;padding:4px"><a href="#" onclick="generateDesignSpreadsheet();return false;">Export Vaccination Info</a> </div></div>
<div><span id="facets"></span><div style="display:inline-block;padding:4px"><a id="generateDesignSpreadsheet" href="#">Export Vaccination Info</a> </div></div>
<script type="text/javascript" nonce="<%=scriptNonce%>">
document.getElementById("generateDesignSpreadsheet")['onclick'] = function(){generateDesignSpreadsheet(); return false;};
</script>
<div id="result">

</div>