-
Notifications
You must be signed in to change notification settings - Fork 988
/
translateformheader_view.php
61 lines (53 loc) · 2.27 KB
/
translateformheader_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
52
53
54
55
56
57
58
59
60
61
<?php
/* @var $viewData array */
extract($viewData);
?>
<div id="translationloading" style="width: 100%; font-weight: bold; color: #000; text-align: center;">
<br/>
<?php eT("Loading translations"); ?><br/><br/>
</div>
<?php echo CHtml::form(array("quickTranslation/index/surveyid/{$surveyid}/lang/{$tolang}"), 'post', array('name' => 'translateform', 'id' => 'translateform')); ?>
<input type='hidden' name='sid' value='<?php echo $surveyid; ?>'/>
<input type='hidden' name='action' value='translate'/>
<input type='hidden' name='actionvalue' value='translateSave'/>
<input type='hidden' name='tolang' value='<?php echo $tolang; ?>'/>
<input type='hidden' name='baselang' value='<?php echo $baselang; ?>'/>
<script type="text/javascript">
sGoogleApiError = "<?php eT("There was an error using the Google API.");?>";
sDetailedError = "<?php eT("Detailed Error");?>";
translateJsonUrl = "<?php echo $this->createUrl("quickTranslation/ajaxtranslategoogleapi", ['surveyid' => $surveyid]); ?>";
</script>
<div id="translationtabs">
<ul class="nav nav-tabs">
<?php for ($i = 0, $len = count($tab_names); $i < $len; $i++) { ?>
<li class="nav-item" >
<a class="nav-link <?php echo ($i == 0) ? 'active' : '' ?>" data-bs-toggle="tab" href="#tab-<?php echo $tab_names[$i]; ?>">
<span>
<?php echo $amTypeOptions[$i]["description"]; ?>
</span>
</a>
</li>
<?php } ?>
<?php $i = 0; ?>
</ul>
<div class="tab-content">
<!-- here translatetabs_view and inside of them translatefields_view should be rendered.
The data for those is prepared in function displayUntranslatedFields in QuicktranslationController -->
<?php
foreach ($singleTabs as $tabData) {
//find the correct singleTabdata
$this->renderpartial('translatetabs_view', [
'baselangdesc' => $baselangdesc,
'tolangdesc' => $tolangdesc,
'tabData' => $tabData
]);
}
?>
</div>
<p>
<input type='submit' class='standardbtn d-none' value='<?php eT("Save");?>' <?php if ($bReadOnly){?>disabled='disabled'<?php }?>/>
</p>
</div>
<?php
echo CHtml::endForm();
?>