1
0
Fork 0
mirror of synced 2024-06-15 17:24:48 +12:00

Removed OAuth from CE console

This commit is contained in:
eldadfux 2019-08-26 17:02:42 +03:00
parent 3425394b6e
commit c7e2402781
2 changed files with 48 additions and 76 deletions

View file

@ -1,51 +1,36 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="zone xl">
<div class="zone medium">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo $this->escape(Locale::getText('home.auth.signin.title')); ?>
</h1>
<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.signin.failure')); ?></div>
<div class="row responsive force-reverse">
<div class="col span-6 oauth margin-bottom-large">
<p><?php echo $this->escape(Locale::getText('home.auth.signin.oauth.title')); ?></p>
<p><?php echo $this->escape(Locale::getText('home.auth.signin.regular.title')); ?></p>
<div>
<a href="" data-general-oauth="facebook" data-success="{{env.PROTOCOL}}://{{env.DOMAIN}}/console" data-failure="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=2" class="button facebook fill margin-bottom"><i class="icon-facebook"></i> Connect with Facebook</a>
<a href="" data-general-oauth="github" data-success="{{env.PROTOCOL}}://{{env.DOMAIN}}/console" data-failure="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=2" class="button github fill margin-bottom"><i class="icon-github-circled"></i> Connect with Github</a>
<a href="" data-general-oauth="linkedin" data-success="{{env.PROTOCOL}}://{{env.DOMAIN}}/console" data-failure="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=2" class="button linkedin fill margin-bottom"><i class="icon-linkedin"></i> Connect with Linkedin</a>
</div>
</div>
<form name="login"
data-service="auth.login"
data-scope="console"
data-event="submit"
data-success="trigger,redirect"
data-success-param-trigger-events="login"
data-success-param-redirect-url="/console"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.signin.failure')); ?>"
data-failure-param-alert-classname="error">
<div class="col span-6">
<p><?php echo $this->escape(Locale::getText('home.auth.signin.regular.title')); ?></p>
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=1">
<form name="login"
data-service="auth.login"
data-scope="console"
data-event="submit"
data-success="trigger,redirect"
data-success-param-trigger-events="login"
data-success-param-redirect-url="/console"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.signin.failure')); ?>"
data-failure-param-alert-classname="error">
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.email')); ?>" required>
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=1">
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.email')); ?>" required>
<input name="password" type="password" class="full-width" autocomplete="off" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.password')); ?>" required pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.password.validation')); ?>">
<button><?php echo $this->escape(Locale::getText('home.auth.signin.labels.action1')); ?></button>
</form>
</div>
</div>
<input name="password" type="password" class="full-width" autocomplete="off" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.password')); ?>" required pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.password.validation')); ?>">
<button><?php echo $this->escape(Locale::getText('home.auth.signin.labels.action1')); ?></button>
</form>
<br />
<br />

View file

@ -2,60 +2,47 @@
use Utopia\Locale\Locale;
?>
<div class="zone xl signup">
<div class="zone medium signup">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo $this->escape(Locale::getText('home.auth.signup.title')); ?>
</h1>
<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.signup.failure')); ?></div>
<div class="row responsive">
<div class="col span-6 margin-bottom-large">
<small class="pull-end">* <?php echo $this->escape(Locale::getText('home.auth.signup.required')); ?></small>
<small class="pull-end">* <?php echo $this->escape(Locale::getText('home.auth.signup.required')); ?></small>
<form name="register"
data-service="auth.register"
data-scope="console"
data-event="submit"
data-success="trigger,redirect"
data-success-param-trigger-events="auth-register"
data-success-redirect-url="/console/setup"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.signup.failure')); ?>"
data-failure-param-alert-classname="error">
<form name="register"
data-service="auth.register"
data-scope="console"
data-event="submit"
data-success="trigger,redirect"
data-success-param-trigger-events="auth-register"
data-success-redirect-url="/console/setup"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.signup.failure')); ?>"
data-failure-param-alert-classname="error">
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signup?failure=1">
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signup?failure=1">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.name')); ?></label>
<input name="name" type="text" autocomplete="name" placeholder="" required>
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.name')); ?></label>
<input name="name" type="text" autocomplete="name" placeholder="" required>
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.email')); ?></label>
<input name="email" type="email" autocomplete="email" placeholder="" required data-ls-bind="{{router.params.email}}">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.email')); ?></label>
<input name="email" type="email" autocomplete="email" placeholder="" required data-ls-bind="{{router.params.email}}">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.password')); ?></label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signup.labels.password.validation')); ?>">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.password')); ?></label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signup.labels.password.validation')); ?>">
<div class="agree margin-top-large margin-bottom-large">
<div class="pull-start margin-end-small margin-bottom">
<input type="checkbox" required />
</div>
<?php echo $this->escape(Locale::getText('home.auth.signup.labels.agree')); ?><a href="/policy/terms" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.terms')); ?></a><?php echo $this->escape(Locale::getText('home.auth.signup.labels.and')); ?><a href="/policy/privacy" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.privacy')); ?></a>
</div>
<input name="redirect" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/confirm" />
<button type="submit"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.action')); ?></button>
</form>
</div>
<div class="col span-6 oauth">
<p><?php echo $this->escape(Locale::getText('home.auth.signin.oauth.title')); ?></p>
<div>
<a href="" data-general-oauth="facebook" data-success="{{env.PROTOCOL}}://{{env.DOMAIN}}/console" data-failure="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=2" class="button facebook fill margin-bottom"><i class="icon-facebook"></i> Connect with Facebook</a>
<a href="" data-general-oauth="github" data-success="{{env.PROTOCOL}}://{{env.DOMAIN}}/console" data-failure="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=2" class="button github fill margin-bottom"><i class="icon-github-circled"></i> Connect with Github</a>
<a href="" data-general-oauth="linkedin" data-success="{{env.PROTOCOL}}://{{env.DOMAIN}}/console" data-failure="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=2" class="button linkedin fill margin-bottom"><i class="icon-linkedin"></i> Connect with Linkedin</a>
<div class="agree margin-top-large margin-bottom-large">
<div class="pull-start margin-end-small margin-bottom">
<input type="checkbox" required />
</div>
<?php echo $this->escape(Locale::getText('home.auth.signup.labels.agree')); ?><a href="/policy/terms" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.terms')); ?></a><?php echo $this->escape(Locale::getText('home.auth.signup.labels.and')); ?><a href="/policy/privacy" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.privacy')); ?></a>
</div>
</div>
<input name="redirect" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/confirm" />
<button type="submit"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.action')); ?></button>
</form>
</div>