/
attributeMapCSV_view.php
51 lines (49 loc) · 3.18 KB
/
attributeMapCSV_view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<div class='header ui-widget-header'><strong><?php printf($clang->ngT("Select which fields to import as attributes with your participant.","Select which fields to import as attributes with your %s participants.",$linecount), $linecount); ?></strong></div>
<div class="main">
<div id="csvattribute" class='container'>
<div class="heading"><?php $clang->eT("CSV field names "); ?></div>
<div class='instructions'><?php $clang->eT("The following additional fields were found in your CSV file."); ?></div>
<ul class="csvatt">
<?php
foreach ($firstline as $key => $value)
{
echo "<li id='cs_" . $value . "' name='cs_" . $value . "' >" . $value . "</li>";
}
?>
</ul>
</div>
<div id="newcreated" class='container'><div class="heading"><?php $clang->eT("Attributes to be created") ?></div>
<div class='instructions'><?php $clang->eT("Drop a CSV field into this area to create a new participant attribute and import your data into it."); ?></div>
<ul class="newcreate" id="sortable">
</ul>
</div>
<div id="centralattribute" class='container'><div class="heading"><?php $clang->eT("Existing attribute"); ?></div>
<div class='instructions'><?php $clang->eT("Drop a CSV field into an existing participant attribute listed below to import your data into it."); ?></div>
<ul class="cpdbatt">
<?php
foreach ($attributes as $key => $value)
{
echo "<li id='c_" . $value['attribute_id'] . "' name='c_" . $key . "'>" . $value['attribute_name'] . "<br /> </li>";
}
?>
</ul>
<div class='explanation'>
<input type='checkbox' id='overwrite' name='overwrite' /> <label for='overwrite'><?php $clang->eT("Overwrite existing token attribute values if a duplicate participant is found?") ?></label>
<br /><br /><?php
if($participant_id_exists) {
$clang->eT("Duplicates will be detected using the participant_id field in this CSV file");
} else {
$clang->eT("Duplicates will be detected by a combination of firstname, lastname and email addresses");
}
?>
</div>
</div>
</ul>
</div>
<p><input type="button" name="attmapcancel" id="attmapcancel" value="<?php $clang->eT("Cancel") ?>" />
<input type="button" name="attreset" id="attreset" value="<?php $clang->eT("Reset") ?>" onClick="window.location.reload();" />
<input type="button" name="attmap" id="attmap" value="<?php $clang->eT("Continue"); ?>" />
</p>
<div id="processing" title="<?php $clang->eT("Processing...") ?>" style="display:none">
<img src="<?php echo Yii::app()->getConfig('adminimageurl') . '/ajax-loader.gif'; ?>" alt="<?php $clang->eT('Loading...'); ?>" title="<?php $clang->eT('Loading...'); ?>" />
</div>