-
Notifications
You must be signed in to change notification settings - Fork 28
/
edit-list.php
261 lines (220 loc) · 12 KB
/
edit-list.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<?php include('includes/header.php');?>
<?php include('includes/login/auth.php');?>
<?php include('includes/list/main.php');?>
<script src="<?php echo get_app_info('path');?>/js/redactor/redactor.min.js"></script>
<link rel="stylesheet" href="<?php echo get_app_info('path');?>/js/redactor/redactor.css" />
<script src="<?php echo get_app_info('path');?>/js/lists/editor.js?2"></script>
<form action="<?php echo get_app_info('path')?>/includes/list/edit.php" method="POST" accept-charset="utf-8" class="form-vertical">
<div class="row-fluid">
<div class="span2">
<?php include('includes/sidebar.php');?>
</div>
<div class="span10">
<div class="row-fluid">
<div class="span12">
<div>
<p class="lead"><?php echo get_app_data('app_name');?></p>
</div>
<h2><?php echo _('Edit list');?></h2><br/>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<label class="control-label" for="list_name"><?php echo _('List name');?></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="list_name" name="list_name" placeholder="<?php echo _('The list name');?>" value="<?php echo get_lists_data('name', $_GET['l']);?>">
</div>
</div>
</div>
</div>
<hr/>
<div class="row-fluid">
<div class="span12">
<h2><?php echo _('Subscribe settings');?></h2><br/>
</div>
</div>
<div class="row-fluid">
<div class="span4">
<label class="control-label"><strong><?php echo _('List type');?></strong></label>
<div class="well">
<p><?php echo _('If you select double opt-in, users will be required to click a link in a confirmation email they\'ll receive when they sign up via the subscribe form or API.');?></p>
<p>
<div class="btn-group" data-toggle="buttons-radio">
<a href="javascript:void(0)" title="" class="btn" id="single"><i class="icon icon-angle-right"></i> <?php echo _('Single Opt-In');?></a>
<a href="javascript:void(0)" title="" class="btn" id="double"><i class="icon icon-double-angle-right"></i> <?php echo _('Double Opt-In');?></a>
</div>
<script type="text/javascript">
$(document).ready(function() {
<?php
$opt_in = get_lists_data('opt_in', $_GET['l']);
if($opt_in==0):
?>
$("#single").button('toggle');
$("#opt_in").val("0");
<?php else:?>
$("#double").button('toggle');
$("#opt_in").val("1");
<?php endif;?>
$("#single").click(function(){
$("#opt_in").val("0");
});
$("#double").click(function(){
$("#opt_in").val("1");
});
});
</script>
</p>
</div>
<label class="control-label" for="subscribed_url"><strong><?php echo _('Subscribe success page');?></strong></label>
<div class="well">
<p><?php echo _('When users subscribe through the subscribe form, they\'ll be sent to a generic subscription confirmation page. To redirect users to a page of your preference, enter the link below. If you chose double opt-in as your List Type, this page will tell them a confirmation email has been sent to them.');?></p>
<label class="control-label" for="subscribed_url"><?php echo _('Page URL');?></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="subscribed_url" name="subscribed_url" placeholder="http://" style="width: 98%;" value="<?php echo get_lists_data('subscribed_url', $_GET['l']);?>">
</div>
</div>
</div>
<label class="control-label" for="subscribed_url"><strong><?php echo _('Subscription confirmed page');?></strong> (<?php echo _('only applies for double opt-ins');?>)</label>
<div class="well">
<p><?php echo _('If your List Type is double opt-in, users who clicked the confirmation URL will be sent to a generic confirmation page. To redirect users to a page of your preference, enter the link below.');?></p>
<label class="control-label" for="confirm_url"><?php echo _('Page URL');?></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="confirm_url" name="confirm_url" placeholder="http://" style="width: 98%;" value="<?php echo get_lists_data('confirm_url', $_GET['l']);?>">
</div>
</div>
</div>
</div>
<div class="span8">
<div class="control-group">
<div class="controls">
<label class="checkbox">
<?php $thankyou = get_lists_data('thankyou', $_GET['l']); ?>
<input type="checkbox" id="thankyou_email" name="thankyou_email" <?php if($thankyou == 1){echo 'checked';}?>>
<?php echo _('Send user a thank you email after they subscribe through the subscribe form or API?');?>
</label>
</div>
</div>
<label class="control-label" for="thankyou_subject"><strong><?php echo _('Thank you email subject');?></strong></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="thankyou_subject" name="thankyou_subject" placeholder="<?php echo _('Email subject');?>" style="width: 98%;" value="<?php echo get_lists_data('thankyou_subject', $_GET['l']);?>">
</div>
</div>
<label class="control-label" for="thankyou_message"><strong><?php echo _('Thank you email message');?></strong></label>
<div class="control-group">
<div class="controls">
<textarea class="input-xlarge" id="thankyou_message" name="thankyou_message" rows="10" placeholder="<?php echo _('Email message');?>">
<?php echo get_lists_data('thankyou_message', $_GET['l']);?>
</textarea>
</div>
</div>
<br/>
<label class="control-label" for="confirmation_subject"><strong><?php echo _('Confirmation email subject');?></strong> (<?php echo _('only applies for double opt-ins');?>)<br/><em>* <?php echo _('A generic subject line will be used if you leave this field empty.');?></em></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="confirmation_subject" name="confirmation_subject" placeholder="<?php echo _('Subject of confirmation email');?>" style="width: 98%;" value="<?php echo get_lists_data('confirmation_subject', $_GET['l']);?>">
</div>
</div>
<label class="control-label" for="confirmation_email"><strong><?php echo _('Double Opt-In confirmation message');?></strong> (<?php echo _('only applies for double opt-ins');?>)<br/><em>* <?php echo _('A generic email message will be used if you leave this field empty.');?></em><br/><em>* <?php echo _('Don\'t forget to include the confirmation link tag');?> </em><code>[confirmation_link]</code><em> <?php echo _('somewhere in your message');?></em>.</label>
<div class="control-group">
<div class="controls">
<textarea class="input-xlarge" id="confirmation_email" name="confirmation_email" rows="10" placeholder="<?php echo _('Email message');?>">
<?php echo get_lists_data('confirmation_email', $_GET['l']);?>
</textarea>
</div>
</div>
</div>
</div>
<br/>
<hr/>
<div class="row-fluid">
<div class="span12">
<h2><?php echo _('Unsubscribe settings');?></h2><br/>
</div>
</div>
<div class="row-fluid">
<div class="span4">
<label class="control-label"><strong><?php echo _('Unsubscribe user');?></strong></label>
<div class="well">
<p><?php echo _('When a user unsubscribes from a newsletter or through the API, choose whether to unsubscribe them from this list only, or unsubscribe them from all lists in this brand.');?></p>
<p>
<div class="btn-group" data-toggle="buttons-radio">
<a href="javascript:void(0)" title="" class="btn" id="this-list"><i class="icon icon-minus"></i> <?php echo _('Only this list');?></a>
<a href="javascript:void(0)" title="" class="btn" id="all-list"><i class="icon icon-reorder"></i> <?php echo _('All lists');?></a>
</div>
<script type="text/javascript">
$(document).ready(function() {
<?php
$ual = get_lists_data('unsubscribe_all_list', $_GET['l']);
if($ual==0):
?>
$("#this-list").button('toggle');
$("#unsubscribe_all_list").val("0");
<?php else:?>
$("#all-list").button('toggle');
$("#unsubscribe_all_list").val("1");
<?php endif;?>
$("#this-list").click(function(){
$("#unsubscribe_all_list").val("0");
});
$("#all-list").click(function(){
$("#unsubscribe_all_list").val("1");
});
});
</script>
</p>
</div>
<label class="control-label" for="unsubscribed_url"><strong><?php echo _('Unsubscribe confirmation page');?></strong></label>
<div class="well">
<p><?php echo _('When users unsubscribe from a newsletter, they\'ll be sent to a generic unsubscription confirmation page. To redirect users to a page of your preference, enter the link below.');?></p>
<label class="control-label" for="subscribed_url"><?php echo _('Page URL');?></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="unsubscribed_url" name="unsubscribed_url" placeholder="http://" style="width: 98%;" value="<?php echo get_lists_data('unsubscribed_url', $_GET['l']);?>">
</div>
</div>
</div>
</div>
<div class="span8">
<div class="control-group">
<div class="controls">
<label class="checkbox">
<?php $goodbye = get_lists_data('goodbye', $_GET['l']); ?>
<input type="checkbox" id="goodbye_email" name="goodbye_email" <?php if($goodbye == 1){echo 'checked';}?>>
<?php echo _('Send user a confirmation email after they unsubscribe from a newsletter or through the API?');?>
</label>
</div>
</div>
<label class="control-label" for="goodbye_subject"><strong><?php echo _('Goodbye email subject');?></strong></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="goodbye_subject" name="goodbye_subject" placeholder="<?php echo _('Email subject');?>" style="width: 98%;" value="<?php echo get_lists_data('goodbye_subject', $_GET['l']);?>">
</div>
</div>
<label class="control-label" for="goodbye_message"><strong><?php echo _('Goodbye email message');?></strong></label>
<div class="control-group">
<div class="controls">
<textarea class="input-xlarge" id="goodbye_message" name="goodbye_message" rows="10" placeholder="<?php echo _('Email message');?>">
<?php echo get_lists_data('goodbye_message', $_GET['l']);?>
</textarea>
</div>
</div>
<input type="hidden" name="id" value="<?php echo $_GET['i'];?>">
<input type="hidden" name="list" value="<?php echo $_GET['l'];?>">
<input type="hidden" name="opt_in" id="opt_in" value="">
<input type="hidden" name="unsubscribe_all_list" id="unsubscribe_all_list" value="">
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span2"></div>
<div class="span10">
<button type="submit" class="btn btn-inverse" style="float:right;"><i class="icon-ok icon-white"></i> <?php echo _('Save');?></button>
</div>
</div>
</form>
<?php include('includes/footer.php');?>