59 lines
No EOL
3.4 KiB
PHTML
59 lines
No EOL
3.4 KiB
PHTML
<?php
|
|
use Utopia\Locale\Locale;
|
|
?>
|
|
<section class="zone medium">
|
|
<form class="box margin-top-large"
|
|
data-service="auth.join"
|
|
data-scope="console"
|
|
data-event="submit"
|
|
data-param-invite-id="{{router.params.inviteId}}"
|
|
data-param-user-id="{{router.params.userId}}"
|
|
data-param-secret="{{router.params.secret}}"
|
|
data-success="redirect,alert,trigger"
|
|
data-success-redirect-url="/console?project={{router.params.project}}"
|
|
data-success-alert="<?php echo $this->escape(Locale::getText('home.auth.join.success')); ?>"
|
|
data-success-triggers="account.update"
|
|
data-failure="alert"
|
|
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.join.failure')); ?>"
|
|
data-failure-param-alert-classname="error">
|
|
|
|
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} == 1"><?php echo $this->escape(Locale::getText('home.auth.join.failure')); ?></div>
|
|
|
|
<input name="success" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/console?company={{router.params.company}}">
|
|
<input name="failure" type="hidden" data-ls-bind="https://{{env.DOMAIN}}/auth/join?failure=1&company={{router.params.company}}&inviteId={{router.params.inviteId}}&secret={{router.params.secret}}&userId={{router.params.userId}}">
|
|
|
|
<div class=""
|
|
data-service="companies.getPreview"
|
|
data-scope="api"
|
|
data-name="api-company"
|
|
data-param-id="{{router.params.company}}"
|
|
data-event="load"
|
|
data-success="trigger"
|
|
data-success-triggers="api-company.load">
|
|
|
|
<h2 class="margin-bottom-small"><?php echo $this->escape(Locale::getText('home.auth.join.title')); ?></h2>
|
|
|
|
<p class="note"><?php echo sprintf($this->escape(Locale::getText('home.auth.join.subtitle')), '<span data-ls-echo="{{api-company.name}}"></span>'); ?></p>
|
|
|
|
<div data-ls-if="{{api-company.logo}} !== '' || {{api-company.logo}} !== undefined">
|
|
<div data-ls-style="background: {{api-company.theme-color}}; color: {{api-company.theme-color-contrast}}; width: 100px; height: 100px; line-height: 100px; border-radius: 50%; margin: 0 auto; text-align: center">
|
|
<img data-ls-attrs="src={{env.API}}/v1/storage/files/{{api-company.logo}}/preview?project={{env.PROJECT}}&height=120" alt="Logo" style="opacity: 0; line-height: 80px; vertical-align: middle; max-width: 80px; max-height: 80px" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="note agree margin-top margin-bottom">
|
|
<div class="pull-start margin-end-small margin-bottom">
|
|
<input type="checkbox" required />
|
|
</div>
|
|
<?php echo sprintf($this->escape(Locale::getText('home.auth.join.agree')),
|
|
'<a href="/policy/terms" target="_blank">' . $this->escape(Locale::getText('home.auth.join.terms')) . '</a>',
|
|
'<a href="/policy/privacy" target="_blank">' . $this->escape(Locale::getText('home.auth.join.privacy')) . '</a>'); ?>
|
|
</div>
|
|
|
|
<div class="clear">
|
|
<button class="pull-start margin-end"><?php echo $this->escape(Locale::getText('home.auth.join.accept')); ?></button>
|
|
<a href="/" class="button reverse pull-start"><?php echo $this->escape(Locale::getText('home.auth.join.cancel')); ?></a>
|
|
</div>
|
|
</form>
|
|
</section>
|