source: extensions/oAuth/admin/template/providers.tpl @ 26608

Last change on this file since 26608 was 26608, checked in by mistic100, 10 years ago

finish updating guides, fix flow issues, update language file

File size: 6.6 KB
RevLine 
[26556]1{combine_css path=$OAUTH_PATH|cat:'admin/template/style.css'}
[20620]2{combine_css path=$OAUTH_PATH|cat:'template/oauth_sprites.css'}
[20323]3
[26556]4{footer_script}
[20323]5jQuery("select.enable").change(function() {
6  var $top = $(this).closest("div.provider");
7  var p = $top.data('p');
8 
9  if ($(this).val()=='true') {
10    $top.find("td.keys").show();
11    $top.removeClass('disabled');
12    $top.addClass('enabled');
13  }
14  else {
15    $top.find("td.keys").hide();
16    $top.removeClass('enabled');
17    $top.addClass('disabled');
18  }
19});
20
21jQuery("#close_help").click(function() {
[26556]22  jQuery("#help_container").animate({ "margin-right": "-550px" }, 'fast');
[20323]23  return false;
24});
25
26jQuery(".open-help").click(function() {
27  var $top = $(this).closest("div.provider");
28  var p = $top.data('p');
29 
30  $("#help_container h5").html($top.find("h4").html());
31  $("#help_container div").html($top.find("div.help").html());
[26556]32  $("#help_container").animate({ "margin-right": "0px" }, 'fast');
[20323]33  return false;
34});
[26556]35{/footer_script}
[20323]36
37
38<div class="titrePage">
[26558]39        <h2>Social Connect</h2>
[20323]40</div>
41
42<div id="help_container">
[26556]43  <a href="#" id="close_help" title="{'Close'|translate}">&times;</a>
[20323]44  <h5></h5>
45  <div></div>
46</div>
47
48<form method="post" action="" class="properties">
49<fieldset id="commentsConf">
[20373]50
[20323]51{foreach from=$PROVIDERS item=provider key=p}
52  <div data-p="{$p}" class="provider {$p} {if $CONFIG[$p].enabled}enabled{else}disabled{/if}">
53    <h4>{$provider.provider_name}</h4>
54   
55    <table><tr>
56      <td>
[20620]57        <span class="oauth_38px {$p|strtolower}"></span>
[20323]58      </td>
59     
60      <td>
61        <select name="providers[{$p}][enabled]" class="enable">
[26556]62          <option value="true" {if $CONFIG[$p].enabled}selected="selected"{/if}>{'Enabled'|translate}</option>
63          <option value="false" {if not $CONFIG[$p].enabled}selected="selected"{/if}>{'Disabled'|translate}</option>
[20323]64        </select>
[26556]65        <br><a href="#" class="open-help">{'Help'|translate}</a>
[20323]66      </td>
67     
68      {if $provider.new_app_link}
69      <td class="keys" {if not $CONFIG[$p].enabled}style="display:none;"{/if}>
70        {if $provider.require_client_id}
[26555]71          <label for="{$p}_app_id">Application/Client ID</label>
[20323]72          <input type="text" id="{$p}_app_id" name="providers[{$p}][keys][id]" value="{$CONFIG[$p].keys.id}">
73        {else}
74          <label for="{$p}_key">Application Key</label>
75          <input type="text" id="{$p}_key" name="providers[{$p}][keys][key]" value="{$CONFIG[$p].keys.key}">
76        {/if}
77          <label for="{$p}_secret">Application Secret</label>
78          <input type="text" id="{$p}_secret" name="providers[{$p}][keys][secret]" value="{$CONFIG[$p].keys.secret}">
79          <br>
80      </td>
81      {/if}
82    </tr></table>
83   
84    <div class="help">
85    {if $provider.new_app_link}
86      <ol>
[26556]87        <li>{'Go to <a href="%s" target="_blank">%s</a> and create a new application'|translate|sprintf:$provider.new_app_link:$provider.new_app_link}</li>
[20323]88       
89      {if $p=='Google'}
[26556]90        <li>{'On the <b>APIs & auth -> Credentials</b> tab, <b>Create new client ID</b>'|translate}</li>
[20323]91      {else}
[26556]92        <li>{'Fill out any required fields such as the application name and description'|translate}</li>
[20323]93      {/if}
94       
95      {if $provider.callback}
96        <li>
97          {assign var=callback value=$OAUTH_CALLBACK|cat:$p}
[26556]98          {'Provide this URL as the Callback/Redirect URL for your application: <em>%s</em>'|translate|sprintf:$callback}
[20323]99        </li>
100      {/if}
[20373]101     
[20323]102      {if $p=='Live'}
[26608]103        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Redirect Domain</b>':$WEBSITE}</li>
[20323]104      {elseif $p=='Facebook'}
[26608]105        <li>{'Go to <b>Settings->Advanced</b> and activate <em>Client OAuth Login</em>'|translate}</li>
[26556]106        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Valid OAuth redirect URIs</b>':$SERVERNAME}</li>
[20323]107      {elseif $p=='LinkedIn'}
[26608]108        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Website URL</b>':$WEBSITE}</li>
[26556]109        <li>{'Set <b>%s</b> to <em>%s</em>'|translate|sprintf:'Application Type':'Web Application'}</li>
110        <li>{'Set <b>%s</b> to <em>%s</em>'|translate|sprintf:'Default Scope':'r_basicprofile & r_emailaddress'}</li>
[20323]111      {elseif $p=='Yahoo'}
[26608]112        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Application URL</b>, <b>Application Domain</b>':$WEBSITE}</li>
[26556]113        <li>{'Set <b>%s</b> to <em>%s</em>'|translate|sprintf:'Kind of Application':'Web-based'}</li>
114        <li>{'Set <b>%s</b> to <em>%s</em>'|translate|sprintf:'Access Scopes':'This app will only access public...'}</li>
115        <li>{'Once the application is registered update the permissions : set <b>Contacts</b> as <em>Read</em> and <b>Social Directory</b> as <em>Read Public</em>'|translate}</li>
[20323]116      {elseif $p=='Twitter'}
[26608]117        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Website</b>':$WEBSITE}</li>
[20323]118      {elseif $p=='Tumblr'}
[26608]119        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Application Website</b>':$WEBSITE}</li>
[20368]120      {elseif $p=='Instagram'}
[26608]121        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Website</b>':$WEBSITE}</li>
[26555]122      {elseif $p=='Google'}
[26556]123        <li>{'Set <b>%s</b> to <em>%s</em>'|translate|sprintf:'Application Type':'Web Application'}</li>
124        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|translate|sprintf:'<b>Authorized Javascript origins </b>':$SERVERNAME}</li>
[20323]125      {/if}
126     
[26556]127        <li>{'Once you have registered, copy and past the created application credentials into this setup page'|translate}</li>
[20323]128      </ol>
129    {else}
[26605]130      <p style="text-align:left;">
131      {if $p=='Flickr' or $p=='Steam' or $p=='Wordpress'}
[26608]132        {'Based on OpenID'|translate}</br>
[26605]133      {/if}
[26608]134      {'No registration required'|translate}<br>
[26605]135      <a href="{$provider.about_link}" target="_blank">{'About'|translate}</a>
136      </p>
[20323]137    {/if}
138    </div>
139  </div>
140{/foreach}
141
142</fieldset>
143
[26556]144<p style="text-align:left;"><input type="submit" name="save_config" value="{'Save Settings'|translate}"></p>
[20323]145 
146</form>
147
[20324]148<div style="text-align:right;">
149  Icons from : <a href="http://www.wpzoom.com" target="_blank">WPZOOM</a> |
150  Library : <a href="http://hybridauth.sourceforge.net" target="_blank">HybridAuth</a>
151</div>
Note: See TracBrowser for help on using the repository browser.