// Remove preactivation from installer

This commit is contained in:
rMalie
2012-02-07 14:00:40 +00:00
parent a232513845
commit dfb86f1ba2
7 changed files with 3 additions and 401 deletions
-63
View File
@@ -20,13 +20,7 @@ $(document).ready(function()
$('#infosTimezone').val(json.message);
}
});
// Load associated partners
//load_partners(iso);
});
//if (default_iso)
// load_partners(default_iso);
});
/**
@@ -66,60 +60,3 @@ function upload_logo()
}
});
};
/**
* Load partners for a given country
*
* @param string iso
*/
function load_partners(iso)
{
$.ajax({
url: 'index.php',
data: 'getPartners=true&iso='+iso,
dataType: 'json',
cache: false,
success: function(json)
{
if (json.success)
{
// Display partner HTML
$('#benefitsBlock').html(json.message).show();
// Add event on partner checkbox to display fields if it's checked
$('.preinstall_partner').click(function()
{
var name = $(this).attr('name');
var partner_id = name.substr(8, name.length - 9);
if ($(this).attr('checked'))
load_partner_fields(partner_id, iso);
else
$('#partner_fields_'+partner_id).html('').hide();
});
}
else
$('#benefitsBlock').html('');
}
});
}
/**
* Display partner fields
*
* @param string partner_id Key of partner
*/
function load_partner_fields(partner_id, iso)
{
$.ajax({
url: 'index.php',
data: 'getPartnersFields=true&partner_id='+partner_id+'&iso='+iso,
dataType: 'json',
cache: false,
success: function(json)
{
if (json.success)
$('#partner_fields_'+partner_id).html(json.message).show();
}
});
}
-52
View File
@@ -1,52 +0,0 @@
@CHARSET "UTF-8";
.moduleTable {
padding: 5px;
width: 650px;
border: 1px solid #CCC;
border-bottom:none;
}
.moduleTable tr {
border-bottom: 1px solid #CCC;
}
.moduleTable th {
font-size:13;
color:#000;
text-shadow:0 1px 0 #fff;
background:#cfcfcf url(img/bg_moduleTable_th.png) repeat-x 0 0;
}
.moduleTable .field {
padding:10px 0;
border-bottom:none;
}
.moduleTable .field label {
display:inline-block;
padding-left:10px;
width:180px;/* 190 */
}
.moduleTable .field label.radiolabel {width:auto;}
.moduleTable .field div.contentinput {
display:inline-block;
width:245px;
font-size: 11px;
font-style:italic;
color:#999;
}
.moduleTable select {
border: 1px solid #D41958;
}
.moduleTable select.pa_list {
width: 175px;
}
.moduleTable select.pa_list_year {
margin-right: 10px;
width: 60px !important;
}
.moduleTable select.pa_list_month, .moduleTable select.pa_list_day {
margin-right: 10px;
width: 45px !important;
}
-1
View File
@@ -11,7 +11,6 @@
<link rel="shortcut icon" href="theme/img/favicon.ico" />
<link rel="stylesheet" type="text/css" media="all" href="theme/view.css" />
<link rel="stylesheet" type="text/css" media="all" href="theme/preactivation.css" />
<script type="text/javascript" src="theme/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="theme/js/jquery.ajaxfileupload.js"></script>
-39
View File
@@ -1,39 +0,0 @@
<h2><?php echo $this->l('Additional Benefits') ?></h2>
<h3><?php echo ('Exclusive offers dedicated to PrestaShop merchants') ?></h3>
<table cellpadding="0" cellspacing="0" border="0" class="moduleTable">
<tr>
<th style="width: 30px;"></th>
<th style="width: 100px;"><?php echo $this->l('Modules') ?></th>
<th style="padding: 12px; width: 430px;"><?php echo $this->l('Benefits') ?></th>
</tr>
</table>
<?php foreach ($this->partners as $partner_id => $partner): ?>
<table cellpadding="0" cellspacing="0" border="0" class="moduleTable">
<tr style="border-bottom:0px">
<td valign="top" style="text-align: center; padding-top:10px; width: 30px;">
<span style="padding: 12px 4px 6px 2px;">
<input type="checkbox" style="vertical-align: middle;" class="preinstall_partner" name="partner[<?php echo $partner_id ?>]" <?php if ($partner['checked']): ?>checked="checked"<?php endif; ?> />
</span>
</td>
<td valign="top" style="width: 100px; text-align: center;">
<img src="<?php echo $partner['logo'] ?>" alt="<?php echo $partner['name'] ?>" title="<?php echo $partner['name'] ?>">
</td>
<td style="padding: 15px; width: 430px;">
<?php echo $partner['description'] ?>
</td>
</tr>
<tr>
<td colspan="3">
<div id="partner_fields_<?php echo $partner_id ?>">
<?php if ($partner['checked'])
{
$this->fields = $this->getPartnersFields($partner_id, $this->iso);
$this->partner_id = $partner_id;
$this->displayTemplate('partners_fields');
} ?>
</div>
</td>
</tr>
</table>
<?php endforeach; ?>
@@ -1,59 +0,0 @@
<br clear="left" /><hr /><br clear="left" />
<?php foreach ($this->fields as $field_id => $field): ?>
<div>
<label class="aligned" style="float:left;width:200px;padding-left:10px;"><?php echo $field['label'] ?> :</label>
<?php if ($field['type'] == 'text' || $field['type'] == 'password'): ?>
<input
type="<?php echo $field['type'] ?>"
name="partner_fields[<?php echo $this->partner_id?>][<?php echo $field_id ?>]"
class="text required"
value="<?php echo htmlspecialchars($field['value']) ?>"
<?php if ($field['size']): ?>size="<?php echo $field['size'] ?>"<?php endif; ?>
/>
<?php elseif ($field['type'] == 'radio'): ?>
<?php foreach ($field['list'] as $value => $label): ?>
<?php echo $label ?>
<input
type="radio"
name="partner_fields[<?php echo $this->partner_id?>][<?php echo $field_id ?>]"
value="<?php echo $value ?>"
<?php if ($field['value'] == $value): ?>checked="checked"<?php endif; ?>
/>
<?php endforeach; ?>
<?php elseif ($field['type'] == 'select'): ?>
<select name="partner_fields[<?php echo $this->partner_id?>][<?php echo $field_id ?>]" class="pa_list">
<?php foreach ($field['list'] as $value => $label): ?>
<option value="<?php echo $value ?>" <?php if ($field['value'] == $value): ?>selected="selected"<?php endif; ?>>
<?php echo $label ?>
</option>
<?php endforeach; ?>
</select>
<?php elseif ($field['type'] == 'date'): ?>
<select name="partner_fields[<?php echo $this->partner_id?>][<?php echo $field_id ?>][year]" class="pa_list_year" style="border:1px solid #D41958">
<?php for ($i = date('Y') - 81; $i <= date('Y'); $i++): ?>
<option value="<?php echo $i ?>" <?php if ($field['value']['year'] == $i): ?>selected="selected"<?php endif; ?>><?php echo $i ?></option>
<?php endfor; ?>
</select>
<select name="partner_fields[<?php echo $this->partner_id?>][<?php echo $field_id ?>][month]" class="pa_list_month" style="border:1px solid #D41958">
<?php for ($i = 1; $i <= 12; $i++): ?>
<option value="<?php echo $i ?>" <?php if ($field['value']['month'] == $i): ?>selected="selected"<?php endif; ?>><?php echo str_pad($i, 2, '0', STR_PAD_LEFT) ?></option>
<?php endfor; ?>
</select>
<select name="partner_fields[<?php echo $this->partner_id?>][<?php echo $field_id ?>][day]" class="pa_list_day" style="border:1px solid #D41958">
<?php for ($i = 1; $i <= 31; $i++): ?>
<option value="<?php echo $i ?>" <?php if ($field['value']['day'] == $i): ?>selected="selected"<?php endif; ?>><?php echo str_pad($i, 2, '0', STR_PAD_LEFT) ?></option>
<?php endfor; ?>
</select>
<?php endif; ?>
<?php if ($field['help']): ?>
<?php echo $field['help'] ?>
<?php endif; ?>
<br />
</div>
<br clear="left" />
<?php endforeach; ?>