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

Revision 26608, 6.6 KB checked in by mistic100, 6 years ago (diff)

finish updating guides, fix flow issues, update language file

Line 
1{combine_css path=$OAUTH_PATH|cat:'admin/template/style.css'}
2{combine_css path=$OAUTH_PATH|cat:'template/oauth_sprites.css'}
3
4{footer_script}
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() {
22  jQuery("#help_container").animate({ "margin-right": "-550px" }, 'fast');
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());
32  $("#help_container").animate({ "margin-right": "0px" }, 'fast');
33  return false;
34});
35{/footer_script}
36
37
38<div class="titrePage">
39        <h2>Social Connect</h2>
40</div>
41
42<div id="help_container">
43  <a href="#" id="close_help" title="{'Close'|translate}">&times;</a>
44  <h5></h5>
45  <div></div>
46</div>
47
48<form method="post" action="" class="properties">
49<fieldset id="commentsConf">
50
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>
57        <span class="oauth_38px {$p|strtolower}"></span>
58      </td>
59     
60      <td>
61        <select name="providers[{$p}][enabled]" class="enable">
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>
64        </select>
65        <br><a href="#" class="open-help">{'Help'|translate}</a>
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}
71          <label for="{$p}_app_id">Application/Client ID</label>
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>
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>
88       
89      {if $p=='Google'}
90        <li>{'On the <b>APIs & auth -> Credentials</b> tab, <b>Create new client ID</b>'|translate}</li>
91      {else}
92        <li>{'Fill out any required fields such as the application name and description'|translate}</li>
93      {/if}
94       
95      {if $provider.callback}
96        <li>
97          {assign var=callback value=$OAUTH_CALLBACK|cat:$p}
98          {'Provide this URL as the Callback/Redirect URL for your application: <em>%s</em>'|translate|sprintf:$callback}
99        </li>
100      {/if}
101     
102      {if $p=='Live'}
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>
104      {elseif $p=='Facebook'}
105        <li>{'Go to <b>Settings->Advanced</b> and activate <em>Client OAuth Login</em>'|translate}</li>
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>
107      {elseif $p=='LinkedIn'}
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>
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>
111      {elseif $p=='Yahoo'}
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>
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>
116      {elseif $p=='Twitter'}
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>
118      {elseif $p=='Tumblr'}
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>
120      {elseif $p=='Instagram'}
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>
122      {elseif $p=='Google'}
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>
125      {/if}
126     
127        <li>{'Once you have registered, copy and past the created application credentials into this setup page'|translate}</li>
128      </ol>
129    {else}
130      <p style="text-align:left;">
131      {if $p=='Flickr' or $p=='Steam' or $p=='Wordpress'}
132        {'Based on OpenID'|translate}</br>
133      {/if}
134      {'No registration required'|translate}<br>
135      <a href="{$provider.about_link}" target="_blank">{'About'|translate}</a>
136      </p>
137    {/if}
138    </div>
139  </div>
140{/foreach}
141
142</fieldset>
143
144<p style="text-align:left;"><input type="submit" name="save_config" value="{'Save Settings'|translate}"></p>
145 
146</form>
147
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.