-
Notifications
You must be signed in to change notification settings - Fork 988
/
emailtemplates_view.php
110 lines (97 loc) · 4.66 KB
/
emailtemplates_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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/**
* General options
* @var AdminController $this
* @var Survey $oSurvey
*/
$count=0;
// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('surveyEmailTemplates');
App()->getClientScript()->registerScript( "EmailTemplateViews_variables", "
var sReplaceTextConfirmation='".gT("This will replace the existing text. Continue?","js")."';
var sKCFinderLanguage='".sTranslateLangCode2CK(App()->language)."';
var LS = LS || {}; // namespace
LS.lang = LS.lang || {}; // object holding translations
LS.lang['Remove attachment'] = '".gT("Remove attachment")."';
LS.lang['Edit condition'] = '".gT("Edit condition")."';
", LSYii_ClientScript::POS_BEGIN );
?>
<div class="side-body <?php echo getSideBodyClass(false); ?>">
<h3><?php eT("Edit email templates"); ?></h3>
<div class="row">
<div class="col-lg-12 content-right">
<?php echo CHtml::form(array('admin/emailtemplates/sa/update/surveyid/'.$surveyid), 'post', array('name'=>'emailtemplates', 'class'=>'', 'id'=>'emailtemplates'));?>
<ul class="nav nav-tabs">
<?php foreach ($oSurvey->allLanguages as $grouplang): ?>
<li role="presentation" class="<?php if($count==0){ echo 'active'; $count++; }?>" >
<a data-toggle="tab" href='#tab-<?php echo $grouplang; ?>'><?php echo getLanguageNameFromCode($grouplang,false); ?>
<?php if ($grouplang == $oSurvey->language): ?>
<?php echo ' ('.gT("Base language").')'; ?>
<?php endif; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<div class="tab-content">
<?php
$count = 0;
$active = 'active';
foreach ($oSurvey->allLanguages as $key => $grouplang) {
$bplang = $bplangs[$key];
$esrow = $attrib[$key];
$aDefaultTexts = $defaulttexts[$key];
$this->renderPartial('/admin/emailtemplates/email_language_tab', compact( 'ishtml', 'surveyid', 'grouplang', 'bplang', 'esrow', 'aDefaultTexts', 'active'));
if($count == 0) {
$count++;
$active = '';
}
}
?>
<p>
<?php echo CHtml::htmlButton(gT('Save'),array('type'=>'submit','value'=>'save','name'=>'save', 'class'=>'hidden')) ?>
<?php echo CHtml::htmlButton(gT('Save and close'),array('type'=>'submit','value'=>'saveclose','name'=>'save', 'class'=>'hidden')) ?>
<?php echo CHtml::hiddenField('action','tokens'); ?>
<?php echo CHtml::hiddenField('language',$esrow->surveyls_language); ?>
</p>
</div>
<?php echo CHtml::endForm() ?>
</div>
</div>
</div>
<div class="modal modal-large fade" tabindex="-1" role="dialog" id="kc-modal-open">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><?=gT("Choose file to add")?></h4>
</div>
<div class="modal-body" style="padding: 0;">
<iframe frameBorder="0" style="min-height: 600px; height:100%; width: 100%;" src="about:blank"></iframe>
</div>
<div class='modal-footer'>
<button type="button" class='btn btn-default' data-dismiss='modal'><?php eT("Cancel");?></button>
</div>
</div>
</div>
</div>
<div id="attachment-relevance-editor" class="modal fade">
<div class='modal-dialog'>
<div class='modal-content'>
<div class='modal-header'>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>×</span></button>
<label for='attachment-relevance-condition' class="h4 modal-title"><?php eT("Condition");?></label>
</div>
<div class='modal-body'>
<div class='input-group'>
<div class="input-group-addon">{</div>
<textarea class='form-control' id='attachment-relevance-condition'></textarea>
<div class="input-group-addon">}</div>
</div>
</div>
<div class='modal-footer'>
<button type="button" class='btn btn-default' data-dismiss='modal'><?php eT("Close");?></button>
<button type="button" class='btn btn-success'><?php eT("Add");?></button>
</div>
</div>
</div>
</div>