Add check for OL host to prevent failure on legacy SL

This commit is contained in:
Alasdair Smith 2017-11-29 16:35:50 +00:00
parent f232899f3f
commit 52ad852814

View file

@ -342,8 +342,13 @@ script(type="text/ng-template", id="v1ImportModalTemplate")
.modal-footer.v1-import-footer
div(ng-show="step === 1")
a.btn.btn-primary.v1-import-btn(ng-href=settings.overleaf.host + "/{{project.id}}") #{translate("open_in_v1")}
button.btn.btn-primary.v1-import-btn(ng-click="moveToConfirmation()") #{translate("import_to_v2")}
if settings.overleaf && settings.overleaf.host
a.btn.btn-primary.v1-import-btn(
ng-href=settings.overleaf.host + "/{{project.id}}"
) #{translate("open_in_v1")}
button.btn.btn-primary.v1-import-btn(
ng-click="moveToConfirmation()"
) #{translate("import_to_v2")}
div(ng-show="step === 2")
form(
async-form="v1Import",
@ -354,6 +359,7 @@ script(type="text/ng-template", id="v1ImportModalTemplate")
)
input(name='_csrf', type='hidden', value=csrfToken)
form-messages(for="v1ImportForm")
if settings.overleaf && settings.overleaf.host
a.btn.btn-primary.v1-import-btn(
ng-href=settings.overleaf.host + "/{{project.id}}"
ng-class="{disabled: v1ImportForm.inflight || v1ImportForm.success}"