diff --git a/applications/app/controllers/AtomPageController.scala b/applications/app/controllers/AtomPageController.scala index c153c0baec8b..7eec4f902178 100644 --- a/applications/app/controllers/AtomPageController.scala +++ b/applications/app/controllers/AtomPageController.scala @@ -96,12 +96,15 @@ class AtomPageController( ) } + def renderNoJs(atomType: String, id: String): Action[AnyContent] = render(atomType, id, false, false) + + def renderNoJsVerticalScroll(atomType: String, id: String): Action[AnyContent] = render(atomType, id, false, true) + def render( atomType: String, id: String, isJsEnabled: Boolean, hasVerticalScrollbar: Boolean, - inApp: Boolean, ): Action[AnyContent] = Action.async { implicit request => lookup(s"atom/$atomType/$id") map { diff --git a/applications/conf/routes b/applications/conf/routes index cd02772e3062..b5496a12aec0 100644 --- a/applications/conf/routes +++ b/applications/conf/routes @@ -48,10 +48,9 @@ GET /index/contributors GET /index/contributors/*contributor controllers.TagIndexController.contributor(contributor) GET /embed/video/*path controllers.EmbedController.render(path) -GET /embed/atom/:atomType/:id controllers.AtomPageController.render(atomType: String, id: String, isJsEnabled: Boolean = true, hasVerticalScrollbar: Boolean = false, inApp: Boolean = false) -GET /embed/atom/:atomType/:id/nojs controllers.AtomPageController.render(atomType: String, id: String, isJsEnabled: Boolean = false, hasVerticalScrollbar: Boolean = false, inApp: Boolean = false) -GET /embed/atom/:atomType/:id/nojs/scroll-y controllers.AtomPageController.render(atomType: String, id: String, isJsEnabled: Boolean = false, hasVerticalScrollbar: Boolean = true, inApp: Boolean = false) -GET /embed/atom/:atomType/:id/inapp controllers.AtomPageController.render(atomType: String, id: String, isJsEnabled: Boolean = true, hasVerticalScrollbar: Boolean = true, inApp: Boolean = true) +GET /embed/atom/:atomType/:id controllers.AtomPageController.render(atomType: String, id: String, isJsEnabled: Boolean = true, hasVerticalScrollbar: Boolean = false) +GET /embed/atom/:atomType/:id/nojs controllers.AtomPageController.renderNoJs(atomType: String, id: String) +GET /embed/atom/:atomType/:id/nojs/scroll-y controllers.AtomPageController.renderNoJsVerticalScroll(atomType: String, id: String) POST /story-questions/answers/signup controllers.AtomPageController.signup() OPTIONS /story-questions/answers/signup controllers.AtomPageController.options() diff --git a/identity/app/controllers/FormstackController.scala b/identity/app/controllers/FormstackController.scala index b7bb64d4c772..c5af4f4d90da 100644 --- a/identity/app/controllers/FormstackController.scala +++ b/identity/app/controllers/FormstackController.scala @@ -27,6 +27,9 @@ class FormstackController( val page = IdentityPage("/form", "Form") + def formstackFormEmbed(formReference: String): Action[AnyContent] = + formstackForm(formReference, true) + def formstackForm(formReference: String, composer: Boolean): Action[AnyContent] = fullAuthAction.async { implicit request => if (Switches.IdentityFormstackSwitch.isSwitchedOn) { diff --git a/identity/conf/routes b/identity/conf/routes index d5a6e5f1d466..38fa67dec678 100644 --- a/identity/conf/routes +++ b/identity/conf/routes @@ -21,7 +21,7 @@ GET /user/:vanityUrl/:activityType controllers.PublicProfileCon ######################################################################################################################## GET /form/complete controllers.FormstackController.complete GET /form/:formReference controllers.FormstackController.formstackForm(formReference: String, composer: Boolean = false) -GET /form/embed/:formReference controllers.FormstackController.formstackForm(formReference: String, composer: Boolean = true) +GET /form/embed/:formReference controllers.FormstackController.formstackFormEmbed(formReference: String) ######################################################################################################################## # Account deletion