2019-05-09 18:54:39 +12:00
|
|
|
<?php
|
|
|
|
use Utopia\Locale\Locale;
|
|
|
|
?>
|
|
|
|
<section class="zone medium">
|
|
|
|
<form class="box margin-top-large"
|
2019-08-09 04:43:26 +12:00
|
|
|
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">
|
2019-05-09 18:54:39 +12:00
|
|
|
|
2019-05-09 20:23:22 +12:00
|
|
|
<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>
|
2019-05-09 18:54:39 +12:00
|
|
|
|
2019-05-10 04:15:51 +12:00
|
|
|
<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}}">
|
2019-05-09 18:54:39 +12:00
|
|
|
|
|
|
|
<div class=""
|
2019-05-12 19:24:53 +12:00
|
|
|
data-service="companies.getPreview"
|
2019-05-09 18:54:39 +12:00
|
|
|
data-scope="api"
|
2019-05-12 19:24:53 +12:00
|
|
|
data-name="api-company"
|
2019-05-09 20:23:22 +12:00
|
|
|
data-param-id="{{router.params.company}}"
|
2019-05-09 18:54:39 +12:00
|
|
|
data-event="load"
|
2019-08-09 04:43:26 +12:00
|
|
|
data-success="trigger"
|
|
|
|
data-success-triggers="api-company.load">
|
2019-05-09 18:54:39 +12:00
|
|
|
|
|
|
|
<h2 class="margin-bottom-small"><?php echo $this->escape(Locale::getText('home.auth.join.title')); ?></h2>
|
|
|
|
|
2019-08-24 07:07:17 +12:00
|
|
|
<p><?php echo sprintf($this->escape(Locale::getText('home.auth.join.subtitle')), '<span data-ls-echo="{{api-company.name}}"></span>'); ?></p>
|
2019-05-09 18:54:39 +12:00
|
|
|
|
2019-05-12 03:26:03 +12:00
|
|
|
<div data-ls-if="{{api-company.logo}} !== '' || {{api-company.logo}} !== undefined">
|
2019-05-09 18:54:39 +12:00
|
|
|
<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">
|
2019-05-10 04:15:51 +12:00
|
|
|
<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" />
|
2019-05-09 18:54:39 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-08-24 07:07:17 +12:00
|
|
|
<div class="agree margin-top margin-bottom">
|
2019-05-09 18:54:39 +12:00
|
|
|
<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>
|