Skip to content

Commit

Permalink
Fixed #294 -- Criar mecanismo para ativar/desativar opções de autenti…
Browse files Browse the repository at this point in the history
…cação e registro de usuários
  • Loading branch information
wilsonmoura committed Oct 20, 2023
1 parent 2ed76d9 commit b1af8e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions client/config.php.template
Expand Up @@ -60,6 +60,10 @@ define("GOOGLE_SCHOLAR_WS",GOOGLE_SCHOLAR."/scholar?as_q=&as_epq=");
define("GOOGLE_ANALYTICS",array());
define("APP_GOOGLE_ANALYTICS",array());

define("DISABLE_REGISTER",false);
define("DISABLE_GOOGLE_AUTH",false);
define("DISABLE_FACEBOOK_AUTH",false);

/* Regular Expressions */
define("REGEXP_LANGUAGE","/^(pt|es|en)$/");
define("REGEXP_SKIN","/^(default)|(myvhl)|(scielo)|(regional)$/");
Expand Down
24 changes: 15 additions & 9 deletions client/templates/default/authentication.tpl.php
Expand Up @@ -73,17 +73,23 @@
<span class="loginOu"><?php echo $trans->getTrans($_REQUEST["action"],'OR'); ?></span>
</div>
<div class="row">
<div class="col s12 m6">
<a href="/connector/google/<?php echo $build_query; ?>" class="btn waves-effect waves-light btn100 btnGoogle">GOOGLE</a>
</div>
<div class="col s12 m6">
<a href="/connector/facebook/<?php echo $build_query; ?>" class="btn waves-effect waves-light btn100 btnFacebook">FACEBOOK</a>
</div>
<?php if ( DISABLE_GOOGLE_AUTH === false ) : ?>
<div class="col s12 <?php echo ( DISABLE_FACEBOOK_AUTH ) ? 'm12' : 'm6'; ?>">
<a href="/connector/google/<?php echo $build_query; ?>" class="btn waves-effect waves-light btn100 btnGoogle">GOOGLE</a>
</div>
<?php endif; ?>
<?php if ( DISABLE_FACEBOOK_AUTH === false ) : ?>
<div class="col s12 <?php echo ( DISABLE_GOOGLE_AUTH ) ? 'm12' : 'm6'; ?>">
<a href="/connector/facebook/<?php echo $build_query; ?>" class="btn waves-effect waves-light btn100 btnFacebook">FACEBOOK</a>
</div>
<?php endif; ?>
</div>
<div class="row">
<div class="col s12 ">
<a href="<?php echo SERVICES_PLATFORM_DOMAIN.'/pub/userData.php?c='.$b64HttpHost; ?>" class="btn waves-effect waves-light btn100 btnRegistre" href="registrar.php"><?php echo $trans->getTrans($_REQUEST["action"],'REGISTRY'); ?></a>
</div>
<?php if ( DISABLE_REGISTER === false ) : ?>
<div class="col s12">
<a href="<?php echo SERVICES_PLATFORM_DOMAIN.'/pub/userData.php?c='.$b64HttpHost; ?>" class="btn waves-effect waves-light btn100 btnRegistre" href="registrar.php"><?php echo $trans->getTrans($_REQUEST["action"],'REGISTRY'); ?></a>
</div>
<?php endif; ?>
</div>
<div class="col s12 center-align" id="store">
<a href="https://play.google.com/store/apps/details?id=org.bvsalud.platserv" target="_blank"><img src="<?php echo RELATIVE_PATH; ?>/images/<?php echo $_SESSION["skin"]; ?>/google-bt.png" alt="Download Google Play"></a>
Expand Down

0 comments on commit b1af8e5

Please sign in to comment.