Newer
Older
<?php
if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) die('Access Denied');
$pages = Page::getPages();
?>
<h2><?php echo __('Company Profile'); ?></h2>
<form action="settings.php?t=pages" method="post" class="save"
enctype="multipart/form-data">
Nathan Febuary
committed
<input type="hidden" name="t" value="pages" >
Nathan Febuary
committed
<ul class="clean tabs">
<li class="active"><a href="#basic-information"><i class="icon-asterisk"></i>
<?php echo __('Basic Information'); ?></a></li>
<li><a href="#site-pages"><i class="icon-file"></i>
<?php echo __('Site Pages'); ?></a></li>
<li><a href="#logos"><i class="icon-picture"></i>
<?php echo __('Logos'); ?></a></li>
<li><a href="#backdrops"><i class="icon-picture"></i>
<?php echo __('Login Backdrop'); ?></a></li>
Nathan Febuary
committed
</ul>
<div class="tab_content" id="basic-information">
<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
$form = $ost->company->getForm();
$form->addMissingFields();
$form->render();
Nathan Febuary
committed
</table>
</div>
<div class="hidden tab_content" id="site-pages">
<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<em><?php echo sprintf(__(
'To edit or add new pages go to %s Manage > Site Pages %s'),
'<a href="pages.php">','</a>'); ?></em>
</th>
</tr>
</thead>
<tbody>
<tr>
<td width="220" class="required"><?php echo __('Landing Page'); ?>:</td>
<option value="">— <?php echo __('Select Landing Page'); ?> —</option>
<?php
foreach($pages as $page) {
if(strcasecmp($page->getType(), 'landing')) continue;
echo sprintf('<option value="%d" %s>%s</option>',
$page->getId(),
($config['landing_page_id']==$page->getId())?'selected="selected"':'',
$page->getName());
} ?>
</select> <font class="error">* <?php echo $errors['landing_page_id']; ?></font>
<i class="help-tip icon-question-sign" href="#landing_page"></i>
</span>
<td width="220" class="required"><?php echo __('Offline Page'); ?>:</td>
<option value="">— <?php echo __('Select Offline Page');
?> —</option>
<?php
foreach($pages as $page) {
if(strcasecmp($page->getType(), 'offline')) continue;
echo sprintf('<option value="%d" %s>%s</option>',
$page->getId(),
($config['offline_page_id']==$page->getId())?'selected="selected"':'',
$page->getName());
} ?>
</select> <font class="error">* <?php echo $errors['offline_page_id']; ?></font>
<i class="help-tip icon-question-sign" href="#offline_page"></i>
</span>
<td width="220" class="required"><?php
echo __('Default Thank-You Page'); ?>:</td>
<select name="thank-you_page_id">
<option value="">— <?php
echo __('Select Thank-You Page'); ?> —</option>
<?php
foreach($pages as $page) {
if(strcasecmp($page->getType(), 'thank-you')) continue;
echo sprintf('<option value="%d" %s>%s</option>',
$page->getId(),
($config['thank-you_page_id']==$page->getId())?'selected="selected"':'',
$page->getName());
} ?>
</select> <font class="error">* <?php echo $errors['thank-you_page_id']; ?></font>
<i class="help-tip icon-question-sign" href="#default_thank_you_page"></i>
</span>
</td>
</tr>
</tbody>
</table>
Nathan Febuary
committed
</div>
<div class="hidden tab_content" id="logos">
<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
Nathan Febuary
committed
<em><?php echo __('System Default Logo'); ?><i class="help-tip icon-question-sign" href="#logos"></i></em>
</th>
</tr>
</thead>
<tbody>
<tr>
Nathan Febuary
committed
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
<td colspan="2">
<table style="width:100%">
<thead>
<tr>
<th>Client</th>
<th>Staff</th>
<th>Logo</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="radio" name="selected-logo" value="0"
style="margin-left: 1em"
<?php if (!$ost->getConfig()->getClientLogoId())
echo 'checked="checked"'; ?>/>
</td>
<td>
<input type="radio" name="selected-logo-scp" value="0"
style="margin-left: 1em"
<?php if (!$ost->getConfig()->getStaffLogoId())
echo 'checked="checked"'; ?>/>
</td>
<td>
<img src="<?php echo ROOT_PATH; ?>assets/default/images/logo.png"
alt="Default Logo" valign="middle"
style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
margin: 0.5em; height: 5em;
vertical-align: middle"/>
<img src="<?php echo ROOT_PATH; ?>scp/images/ost-logo.png"
alt="Default Logo" valign="middle"
style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
margin: 0.5em; height: 5em;
vertical-align: middle"/>
</td>
</tr>
<tr>
<th colspan="3">
<em><?php echo __('Use a custom logo'); ?> <i class="help-tip icon-question-sign" href="#upload_a_new_logo"></i></em>
</th>
</tr>
<?php
$current = $ost->getConfig()->getClientLogoId();
$currentScp = $ost->getConfig()->getStaffLogoId();
foreach (AttachmentFile::allLogos() as $logo) { ?>
<tr>
<td>
<input type="radio" name="selected-logo"
style="margin-left: 1em" value="<?php
echo $logo->getId(); ?>" <?php
if ($logo->getId() == $current)
echo 'checked="checked"'; ?>/>
</td>
<td>
<input type="radio" name="selected-logo-scp"
style="margin-left: 1em" value="<?php
echo $logo->getId(); ?>" <?php
if ($logo->getId() == $currentScp)
echo 'checked="checked"'; ?>/>
</td>
<td>
<img src="<?php echo $logo->getDownloadUrl(); ?>"
alt="Custom Logo" valign="middle"
style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
margin: 0.5em; height: 5em;
vertical-align: middle;"/>
<?php if ($logo->getId() != $current && $logo->getId() != $currentScp) { ?>
<label class="checkbox inline">
Nathan Febuary
committed
<input type="checkbox" name="delete-logo[]" value="<?php
echo $logo->getId(); ?>"/> <?php echo __('Delete'); ?>
</label>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<b><?php echo __('Upload a new logo'); ?>:</b>
<input type="file" name="logo[]" size="30" value="" />
<font class="error"><br/><?php echo $errors['logo']; ?></font>
</tr>
</tbody>
</table>
Nathan Febuary
committed
</div>
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<div class="hidden tab_content" id="backdrops">
<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<em><?php echo __('System Default Backdrop'); ?><i
class="help-tip icon-question-sign" href="#backdrops"></i></em>
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<table style="width:100%">
<thead>
<tr>
<th>Staff</th>
<th>Backdrop</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="radio" name="selected-backdrop" value="0"
style="margin-left: 1em"
<?php if (!$ost->getConfig()->getStaffLogoId())
echo 'checked="checked"'; ?>/>
</td>
<td>
<img src="<?php echo ROOT_PATH; ?>scp/images/login-headquarters.jpg"
alt="Default Backdrop" valign="middle"
style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
margin: 0.5em; height: 6em;
vertical-align: middle"/>
</td>
</tr>
<tr>
<th colspan="2">
<em><?php echo __('Use a custom backdrop');
?> <i class="help-tip icon-question-sign" href="#upload_a_new_backdrop"></i></em>
</th>
</tr>
<?php
$current = $ost->getConfig()->getStaffLoginBackdropId();
foreach (AttachmentFile::allBackdrops() as $logo) { ?>
<tr>
<td>
<input type="radio" name="selected-backdrop"
style="margin-left: 1em" value="<?php
echo $logo->getId(); ?>" <?php
if ($logo->getId() == $current)
echo 'checked="checked"'; ?>/>
</td>
<td>
<img src="<?php echo $logo->getDownloadUrl(); ?>"
alt="Custom Backdrop" valign="middle"
style="box-shadow: 0 0 0.5em rgba(0,0,0,0.5);
margin: 0.5em; height: 6em;
vertical-align: middle;"/>
<?php if ($logo->getId() != $current) { ?>
<label class="checkbox inline">
<input type="checkbox" name="delete-backdrop[]" value="<?php
echo $logo->getId(); ?>"/> <?php echo __('Delete'); ?>
</label>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<b><?php echo __('Upload a new backdrop'); ?>:</b>
<input type="file" name="backdrop[]" size="30" value="" />
<font class="error"><br/><?php echo $errors['backdrop']; ?></font>
</td>
</tr>
</tbody>
</table>
</div>
<p style="text-align:center;">
<input class="button" type="submit" name="submit-button" value="<?php
echo __('Save Changes'); ?>">
<input class="button" type="reset" name="reset" value="<?php
echo __('Reset Changes'); ?>">
<div style="display:none;" class="dialog" id="confirm-action">
<h3><?php echo __('Please Confirm'); ?></h3>
<a class="close" href=""><i class="icon-remove-circle"></i></a>
<hr/>
<p class="confirm-action" id="delete-confirm">
<font color="red"><strong><?php echo sprintf(
__('Are you sure you want to DELETE %s?'),
_N('selected image', 'selected images', 2)); ?></strong></font>
<br/><br/><?php echo __('Deleted data CANNOT be recovered.'); ?>
<div><?php echo __('Please confirm to continue.'); ?></div>
<hr style="margin-top:1em"/>
<p class="full-width">
<span class="buttons pull-left">
<input type="button" value="<?php echo __('No, Cancel'); ?>" class="close">
<span class="buttons pull-right">
<input type="button" value="<?php echo __('Yes, Do it!'); ?>" class="confirm">
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
</span>
</p>
<div class="clear"></div>
</div>
<script type="text/javascript">
$(function() {
$('#save input:submit.button').bind('click', function(e) {
var formObj = $('#save');
if ($('input:checkbox:checked', formObj).length) {
e.preventDefault();
$('.dialog#confirm-action').undelegate('.confirm');
$('.dialog#confirm-action').delegate('input.confirm', 'click', function(e) {
e.preventDefault();
$('.dialog#confirm-action').hide();
$('#overlay').hide();
formObj.submit();
return false;
});
$('#overlay').show();
$('.dialog#confirm-action .confirm-action').hide();
$('.dialog#confirm-action p#delete-confirm')
.show()
.parent('div').show().trigger('click');
return false;
}
else return true;
});
});
</script>