Skip to content

Commit

Permalink
adjusted theme to work with allowpublicsignup on sbh2
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfang97 committed Aug 23, 2024
1 parent fc9ddad commit e949563
Show file tree
Hide file tree
Showing 14 changed files with 657 additions and 653 deletions.
8 changes: 7 additions & 1 deletion lib/views/admin/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function form (req, res) {
frontPageText: config.get('frontPageText'),
firstLaunch: config.get('firstLaunch'),
altHome: config.get('altHome'),
allowPublicSignup: config.get('allowPublicSignup'),
currentTheme: currentTheme,
themeParameters: themeParameters
}
Expand Down Expand Up @@ -131,8 +132,13 @@ function post (req, res) {
theme
.setCurrentThemeFromConfig()
.then(() => {
const responseContent = {
message: 'Theme updated successfully',
requestBody: req.body
}

if (!req.accepts('text/html')) {
return res.status(200).header('content-type', 'text/plain').send('Theme updated successfully')
return res.status(200).header('content-type', 'application/json').json(responseContent)
} else {
form(req, res)
}
Expand Down
2 changes: 0 additions & 2 deletions lib/views/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ async function setupPost (req, res, settings) {
{ abortEarly: false }
)

console.log(updatedSettings)

if (updatedSettings.frontendURL && updatedSettings.frontendURL[updatedSettings.frontendURL.length - 1] !== '/') {
updatedSettings.frontendURL += '/'
}
Expand Down

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
<sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
<sbol:role rdf:resource="http://identifiers.org/so/SO:0000280"/>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1"/>
<sbol:displayId>pIKELeftCassette_1</sbol:displayId>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1"/>
<sbol:displayId>pIKERightCassette_1</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/1"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1"/>
<sbol:displayId>pIKERightCassette_1</sbol:displayId>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1"/>
<sbol:displayId>pIKELeftCassette_1</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
Expand Down Expand Up @@ -87,17 +87,6 @@
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
<sbol:role rdf:resource="http://identifiers.org/so/SO:0000280"/>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/ECK120029600/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/ECK120029600"/>
<sbol:displayId>ECK120029600</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/ECK120029600/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/BBa_R0040/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/BBa_R0040"/>
Expand Down Expand Up @@ -131,6 +120,17 @@
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/ECK120029600/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/ECK120029600"/>
<sbol:displayId>ECK120029600</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/ECK120029600/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:sequenceAnnotation>
<sbol:SequenceAnnotation rdf:about="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/anno1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/anno1"/>
Expand Down Expand Up @@ -230,6 +230,28 @@
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
<sbol:role rdf:resource="http://identifiers.org/so/SO:0000280"/>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKERightCassette_1/ECK120033736/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/ECK120033736"/>
<sbol:displayId>ECK120033736</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/ECK120033736/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKERightCassette_1/BBa_R0010/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/BBa_R0010"/>
<sbol:displayId>BBa_R0010</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/BBa_R0010/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKERightCassette_1/BBa_J61130/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/BBa_J61130"/>
Expand Down Expand Up @@ -274,28 +296,6 @@
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKERightCassette_1/ECK120033736/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/ECK120033736"/>
<sbol:displayId>ECK120033736</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/ECK120033736/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKERightCassette_1/BBa_R0010/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/BBa_R0010"/>
<sbol:displayId>BBa_R0010</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/BBa_R0010/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:sequenceAnnotation>
<sbol:SequenceAnnotation rdf:about="http://localhost:7777/public/testid1/part_pIKERightCassette_1/anno1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/anno1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
<sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
<sbol:role rdf:resource="http://identifiers.org/so/SO:0000280"/>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1"/>
<sbol:displayId>pIKELeftCassette_1</sbol:displayId>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1"/>
<sbol:displayId>pIKERightCassette_1</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/1"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
<sbol:component>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKERightCassette_1"/>
<sbol:displayId>pIKERightCassette_1</sbol:displayId>
<sbol:Component rdf:about="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1/1">
<sbol:persistentIdentity rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/pIKELeftCassette_1"/>
<sbol:displayId>pIKELeftCassette_1</sbol:displayId>
<sbol:version>1</sbol:version>
<sbh:topLevel rdf:resource="http://localhost:7777/public/testid1/part_pIKE_Toggle_1/1"/>
<sbh:ownedBy rdf:resource="http://localhost:7777/user/testuser"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKERightCassette_1/1"/>
<sbol:definition rdf:resource="http://localhost:7777/public/testid1/part_pIKELeftCassette_1/1"/>
<sbol:access rdf:resource="http://sbols.org/v2#public"/>
</sbol:Component>
</sbol:component>
Expand Down
Loading

0 comments on commit e949563

Please sign in to comment.