// New referer Bootstraped
This commit is contained in:
1 parent
483aa8ad7d
commit
efb041b747
2 files changed
+37
-43
No files matched your search
@@ -27,12 +27,13 @@
|
|||||||
{block name="other_fieldsets"}
|
{block name="other_fieldsets"}
|
||||||
{if $f == 1}
|
{if $f == 1}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend onclick="$('#tracking_help').slideToggle();" style="cursor:pointer;">
|
<h3>
|
||||||
<img src="../img/admin/help.png" /> {l s='Help'}
|
<i class="icon-question-sign"></i> {l s='Help'}
|
||||||
</legend>
|
</h3>
|
||||||
|
<div class="row"><button type="button" class="btn btn-default toggle_help"><i class="icon-chevron-sign-down"></i> {l s='Show me more'}</button></div>
|
||||||
<div id="tracking_help" style="display: none;">
|
<div id="tracking_help" style="display: none;">
|
||||||
<p>{l s='Definitions:'}</p>
|
<p>{l s='Definitions:'}</p>
|
||||||
<ul style="list-style: disc; margin-left: 20px;">
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
{l s='The field `http_referer` is the website from which your customers arrive.'}<br />
|
{l s='The field `http_referer` is the website from which your customers arrive.'}<br />
|
||||||
{l s='For example, visitors coming from Google will have an `http_referer` like this one: "http://www.google.com/search?q=prestashop".'}<br />
|
{l s='For example, visitors coming from Google will have an `http_referer` like this one: "http://www.google.com/search?q=prestashop".'}<br />
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<li>
|
<li>
|
||||||
{l s='The simple mode uses the MySQL "LIKE", but for a higher potency you can use MySQL regular expressions.'}
|
{l s='The simple mode uses the MySQL "LIKE", but for a higher potency you can use MySQL regular expressions.'}
|
||||||
<a href="http://dev.mysql.com/doc/refman/5.0/en/regexp.html" target="_blank" style="font-style: italic;">{l s='Take a look at our documentation for more details.'}</a>
|
<a class="btn btn-link" href="http://dev.mysql.com/doc/refman/5.0/en/regexp.html" target="_blank" style="font-style: italic;"><i class="icon-external-link-sign"></i> {l s='Take a look at our documentation for more details.'}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,45 +76,43 @@
|
|||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="other_input"}
|
{block name="other_input"}
|
||||||
|
|
||||||
{if $key == 'help'}
|
{if $key == 'help'}
|
||||||
<a style="cursor:pointer;font-style:italic;" onclick="$('#tracking_help').slideToggle();">
|
<a class="btn btn-default toggle_help">
|
||||||
<img src="../img/admin/help.png" /> {l s='Get help!'}
|
<i class="icon-question-sign"></i> {l s='Get help!'}
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
|
{block name="fieldset"}
|
||||||
|
{if $f == 3}
|
||||||
|
<div id="tracking_expert" style="display: none;">
|
||||||
|
{$smarty.block.parent}
|
||||||
|
</div>
|
||||||
|
{else}
|
||||||
|
{$smarty.block.parent}
|
||||||
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="label"}
|
{block name="label"}
|
||||||
|
{if isset($input.legend)}
|
||||||
{if $input.name == 'http_referer_regexp'}
|
<legend>{$input.legend}</legend>
|
||||||
<div id="tracking_expert" style="display: none;">
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{if isset($input.h3)}
|
|
||||||
<h3>{$input.h3}</h3>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if isset($input.label)}
|
{if isset($input.label)}
|
||||||
<label>{$input.label} </label>
|
<label class="control-label col-lg-3" for="{$input.name}">{$input.label}</label>
|
||||||
{/if}
|
|
||||||
|
|
||||||
{/block}
|
|
||||||
|
|
||||||
{block name="field"}
|
|
||||||
{$smarty.block.parent}
|
|
||||||
{if $input.name == 'request_uri_regexp_not'}
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$('.toggle_help').click(function() {
|
||||||
|
$('#tracking_help').slideToggle();
|
||||||
|
|
||||||
$(document).ready(function() {
|
if ($(this).find('i').hasClass('icon-chevron-sign-down'))
|
||||||
$('fieldset#fieldset_3 legend').css('cursor', 'pointer');
|
$(this).find('i').removeClass('icon-chevron-sign-down').addClass('icon-chevron-sign-up');
|
||||||
$('fieldset#fieldset_3 legend').click(function(){
|
else if ($(this).find('i').hasClass('icon-chevron-sign-up'))
|
||||||
$('#tracking_expert').slideToggle();
|
$(this).find('i').removeClass('icon-chevron-sign-up').addClass('icon-chevron-sign-down');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
@@ -198,55 +198,50 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
$this->fields_form[0] = array('form' => array(
|
$this->fields_form[0] = array('form' => array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Affiliate'),
|
'title' => $this->l('Affiliate'),
|
||||||
'image' => '../img/admin/affiliation.png'
|
'icon' => 'icon-group'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => $this->l('Name:'),
|
'label' => $this->l('Name:'),
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'size' => 20,
|
|
||||||
'required' => true
|
'required' => true
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'label' => $this->l('Password:'),
|
'label' => $this->l('Password:'),
|
||||||
'name' => 'passwd',
|
'name' => 'passwd',
|
||||||
'size' => 20,
|
|
||||||
'desc' => $this->l('Leave blank if no change')
|
'desc' => $this->l('Leave blank if no change')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'desc' => array(
|
'desc' => array(
|
||||||
$this->l('Affiliates can access their data with this name and password.'),
|
$this->l('Affiliates can access their data with this name and password.'),
|
||||||
$this->l('Front access:').' <a href="'.$uri.'modules/trackingfront/stats.php" style="font-style: italic;">'.$uri.'modules/trackingfront/stats.php</a>'
|
$this->l('Front access:').' <a class="btn btn-link" href="'.$uri.'modules/trackingfront/stats.php" style="font-style: italic;"><i class="icon-external-link-sign"></i> '.$uri.'modules/trackingfront/stats.php</a>'
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->fields_form[1] = array('form' => array(
|
$this->fields_form[1] = array('form' => array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Commission plan'),
|
'title' => $this->l('Commission plan'),
|
||||||
'image' => '../img/admin/money.png'
|
'icon' => 'icon-dollar'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => $this->l('Click fee:'),
|
'label' => $this->l('Click fee:'),
|
||||||
'name' => 'click_fee',
|
'name' => 'click_fee',
|
||||||
'size' => 8,
|
|
||||||
'desc' => $this->l('Fee given for each visit.')
|
'desc' => $this->l('Fee given for each visit.')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => $this->l('Base fee:'),
|
'label' => $this->l('Base fee:'),
|
||||||
'name' => 'base_fee',
|
'name' => 'base_fee',
|
||||||
'size' => 8,
|
|
||||||
'desc' => $this->l('Fee given for each order placed.')
|
'desc' => $this->l('Fee given for each order placed.')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => $this->l('Percent fee:'),
|
'label' => $this->l('Percent fee:'),
|
||||||
'name' => 'percent_fee',
|
'name' => 'percent_fee',
|
||||||
'size' => 8,
|
|
||||||
'desc' => $this->l('Percent of the sales.')
|
'desc' => $this->l('Percent of the sales.')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -264,7 +259,7 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
$this->fields_form[2] = array('form' => array(
|
$this->fields_form[2] = array('form' => array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Technical information -- Simple mode.'),
|
'title' => $this->l('Technical information -- Simple mode.'),
|
||||||
'image' => '../img/admin/affiliation.png'
|
'icon' => 'icon-cogs'
|
||||||
),
|
),
|
||||||
'help' => true,
|
'help' => true,
|
||||||
'input' => array(
|
'input' => array(
|
||||||
@@ -274,7 +269,7 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
'name' => 'http_referer_like',
|
'name' => 'http_referer_like',
|
||||||
'cols' => 40,
|
'cols' => 40,
|
||||||
'rows' => 1,
|
'rows' => 1,
|
||||||
'h3' => $this->l('HTTP referrer')
|
'legend' => $this->l('HTTP referrer')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
@@ -289,7 +284,7 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
'name' => 'request_uri_like',
|
'name' => 'request_uri_like',
|
||||||
'cols' => 40,
|
'cols' => 40,
|
||||||
'rows' => 1,
|
'rows' => 1,
|
||||||
'h3' => $this->l('Request URI')
|
'legend' => $this->l('Request URI')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
@@ -310,7 +305,7 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
$this->fields_form[3] = array('form' => array(
|
$this->fields_form[3] = array('form' => array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Technical information -- Expert mode'),
|
'title' => $this->l('Technical information -- Expert mode'),
|
||||||
'image' => '../img/admin/affiliation.png'
|
'icon' => 'icon-cogs'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
@@ -319,7 +314,7 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
'name' => 'http_referer_regexp',
|
'name' => 'http_referer_regexp',
|
||||||
'cols' => 40,
|
'cols' => 40,
|
||||||
'rows' => 1,
|
'rows' => 1,
|
||||||
'h3' => $this->l('HTTP referrer')
|
'legend' => $this->l('HTTP referrer')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
@@ -334,7 +329,7 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
'name' => 'request_uri_regexp',
|
'name' => 'request_uri_regexp',
|
||||||
'cols' => 40,
|
'cols' => 40,
|
||||||
'rows' => 1,
|
'rows' => 1,
|
||||||
'h3' => $this->l('Request URI')
|
'legend' => $this->l('Request URI')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
|
|||||||
Reference in new issue
Block a user