Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/account/template_edit.php |
<!-- TinyMCE -->
<script type="text/javascript" src="CMS/html/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<script>
$(document).ready(function() {
new AjaxUpload('thumb', {
action: "upload_ajax.php",
name: 'thumb',
onSubmit: function(file, extension) {
$('.loading_wait').show();
var str = file;
var ext1 = str.indexOf("JPG");
var ext2 = str.indexOf("jpg");
if( ext1 > 0 || ext2 > 0) {
} else {
alert('Zły format pliku! Tylko pliki JPG');
$('.loading_wait').hide();
return false;
}
},
onComplete: function(file, response) {
if( response == "SIZEOFF" ) {
alert('Rozmiar pliku jest za duży ( Maks. 10MB )');
$('.loading_wait').hide();
return false;
}
if( response == "TOSMALL_PROPORTION" ) {
alert('Rozmiar pliku jest za mały. Minimalny wymiar to 2000 pikseli.');
$('.loading_wait').hide();
return false;
}
if( response == "BAD_DPI" ) {
alert('Błędna rozdzielczość pliku. Zalecamy 72DPI.');
$('.loading_wait').hide();
return false;
}
file = response;
var path = 'uploaded/match/'+file;
$('.loading_wait').hide();
$('.upload_info').show();
$('#upload_thumb').val(path);
}
});
});
</script>
<?php if (isset($message)):?>
<div id="message-red" >
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="red-left">
<?php echo $message;?>
</td>
<td class="red-right"><a class="close-red"><?php echo HTML::image('static/images/table/icon_close_red.gif');?></a></td>
</tr>
</table>
</div>
<?php endif;?>
<?php echo Message::render(); ?>
<div class="wrapper">
<?php echo aurora::partial('frontend_sider'); ?>
<div id="content">
<h2>Zarządzanie <span>profilem</span></h2>
<?php echo aurora::partial('frontend_account_info'); ?>
<p>Witaj w strefie dostępnej dla użytkowników systemu.<br/>Zapraszamy do korzystania z dostępnych opcji.</p>
<br style="clear: both;"/><br style="clear: both;"/>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'template' AND Request::current()->param('act') == '' ) echo 'button_gray_active'; ?>" href="Account/template">Twoje szablony</a></li>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'template' AND !empty($_GET['action']) AND $_GET['action'] == 'edit') echo 'button_gray_active'; ?>" href="Account/template?action=edit">Dodaj szablon</a></li>
<br style="clear: both;"/><br style="clear: both;"/><br style="clear: both;"/>
<h2>Edycja <span>szablonu</span></h2>
<form method="post" action="" name="form_edit_data" enctype="multipart/form-data">
<fieldset class="forms small_fields">
<input type="hidden" name="action" value="edit_data"/>
<div>
<label>Nazwa szablonu:</label><br style="clear: both;"/><input type="text" id="title" name="title" value="<?php echo @$user_templates->title; ?>"/>
</div>
<div>
<label>Tytuł:</label><br style="clear: both;"/><input type="text" id="subject" name="subject" value="<?php echo @$user_templates->subject; ?>"/>
</div>
<div style="width: 100%;">
<label>Treść:</label><br style="clear: both;"/><textarea type="textarea" id="welcome_text" name="welcome_text" value=""><?php echo !empty($user_templates->welcome_text) ? $user_templates->welcome_text : $default_text; ?></textarea>
</div>
<div>
<label>Adres do odpowiedzi:</label><br style="clear: both;"/><input type="text" id="email_replay" name="email_replay" value="<?php echo @$user_templates->email_replay; ?>"/>
</div>
<div style="width: 100%;">
<a href="http://<?php echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>" class="button_black">Anuluj</a>
<input type="submit" onclick="validateForm_Data(); return false;" id="register_buttonData" value="Zastosuj"/>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<script>
$(window).ready( function() {
$('#fv').click( function() {
if( $('#fv:checked').length ) {
$('#fv_area').show();
} else {
$('#fv_area').hide();
}
});
});
function NIPIsValid(nip) {
var weights = [6, 5, 7, 2, 3, 4, 5, 6, 7];
nip = nip.replace(/[\s-]/g, '');
if (nip.length == 10 && parseInt(nip, 10) > 0) {
var sum = 0;
for(var i = 0; i < 9; i++){
sum += nip[i] * weights[i];
}
return (sum % 11) == nip[9];
}
return false;
}
function validateForm_Data() {
var error = 0;
var form = document.forms['form_edit_data'];
if( 1 == 1 ) {
f = "#title";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
}
if( error === 0 ) {
form.submit();
} else {
alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
}
}
</script>
<script>
function validateForm2() {
var error = 0;
var form = document.forms['form_edit2'];
field = "#password";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" ) {
$(field).addClass('input_error');
error++;
}
field = "#oldpassword";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" ) {
$(field).addClass('input_error');
error++;
}
field1 = "#password";
field = "#re-password";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" || ($(field1).val() != $(field).val() ) ) {
$(field).addClass('input_error');
error++;
}
if( error === 0 ) {
form.submit();
} else {
alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
}
}
function validateForm() {
var error = 0;
var form = document.forms['form_edit'];
field = "#email";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" ) {
$(field).addClass('input_error');
error++;
} else {
if (!$(field).val().match(/^[0-9a-z_.-]+@([0-9a-z-]+.)+[a-z]{2,6}$/)) {
$(field).addClass('input_error');
error++;
}
}
/*
field = "#newsletter";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( !$(field).is(':checked') ) {
$(field).addClass('input_error');
error++;
alert('Zaakceptuj otrzymywanie newslettera');
}
field = "#newsletter2";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( !$(field).is(':checked') ) {
$(field).addClass('input_error');
error++;
alert('Zaakceptuj zgodę na otrzymywanie newslettera o nowych wersjach zakupionych skryptów');
}
*/
field0 = "#email";
field = "#email2";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() != $(field0).val() ) {
$(field).addClass('input_error');
error++;
}
if( error === 0 ) {
form.submit();
} else {
alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
}
}
</script>