first commit
This commit is contained in:
@@ -0,0 +1,247 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="button" id="button-import" data-toggle="tooltip" title="{{ button_import }}" class="btn btn-success"><i class="fa fa fa-upload"></i></button>
|
||||
<button type="submit" form="form-feed" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_import }} <button type="button" class="close" data-dismiss="alert">×</button></div>
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-feed" class="form-horizontal">
|
||||
<div id="category"></div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-data-feed">{{ entry_google_category }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="google_base_category" value="" placeholder="{{ entry_google_category }}" id="input-google-category" class="form-control" />
|
||||
<input type="hidden" name="google_base_category_id" value="" />
|
||||
<div class="input-group">
|
||||
<input type="text" name="category" value="" placeholder="{{ entry_category }}" id="input-category" class="form-control" />
|
||||
<input type="hidden" name="category_id" value="" />
|
||||
<span class="input-group-btn"><button type="button" id="button-category-add" data-toggle="tooltip" title="{{ button_category_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-data-feed">{{ entry_data_feed }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea rows="5" id="input-data-feed" class="form-control" readonly>{{ data_feed }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_google_base_status" id="input-status" class="form-control">
|
||||
{% if feed_google_base_status %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
// Google Category
|
||||
$('input[name=\'google_base_category\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/feed/google_base/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['google_base_category_id']
|
||||
}
|
||||
}));
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$(this).val(item['label']);
|
||||
$('input[name=\'google_base_category_id\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
|
||||
// Category
|
||||
$('input[name=\'category\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['category_id']
|
||||
}
|
||||
}));
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$(this).val(item['label']);
|
||||
$('input[name="category_id"]').val(item['value']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#category').delegate('.pagination a', 'click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#category').load(this.href);
|
||||
});
|
||||
|
||||
$('#category').load('index.php?route=extension/feed/google_base/category&user_token={{ user_token }}');
|
||||
|
||||
$('#button-category-add').on('click', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/feed/google_base/addcategory&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'google_base_category_id=' + $('input[name=\'google_base_category_id\']').val() + '&category_id=' + $('input[name=\'category_id\']').val(),
|
||||
beforeSend: function() {
|
||||
$('#button-category-add').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-category-add').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#category').before('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#category').load('index.php?route=extension/feed/google_base/category&user_token={{ user_token }}');
|
||||
|
||||
$('#category').before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$('input[name=\'category\']').val('');
|
||||
$('input[name=\'category_id\']').val('');
|
||||
$('input[name=\'google_base_category\']').val('');
|
||||
$('input[name=\'google_base_category_id\']').val('');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#category').delegate('.btn-danger', 'click', function() {
|
||||
var node = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/feed/google_base/removecategory&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: 'category_id=' + encodeURIComponent(this.value),
|
||||
dataType: 'json',
|
||||
crossDomain: true,
|
||||
beforeSend: function() {
|
||||
$(node).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
// Check for errors
|
||||
if (json['error']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#category').load('index.php?route=extension/feed/google_base/category&user_token={{ user_token }}');
|
||||
|
||||
$('#category').before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#button-import').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
|
||||
|
||||
$('#form-upload input[name=\'file\']').trigger('click');
|
||||
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
timer = setInterval(function() {
|
||||
if ($('#form-upload input[name=\'file\']').val() != '') {
|
||||
clearInterval(timer);
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/feed/google_base/import&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#button-import').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-import').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,28 @@
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_google_category }}</td>
|
||||
<td class="text-left">{{ column_category }}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if google_base_categories %}
|
||||
{% for google_base_category in google_base_categories %}
|
||||
<tr>
|
||||
<td class="text-left">{{ google_base_category.google_base_category }}</td>
|
||||
<td class="text-left">{{ google_base_category.category }}</td>
|
||||
<td class="text-right"><button type="button" value="{{ google_base_category.category_id }}" data-loading-text="{{ text_loading }}" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-right">{{ results }}</div>
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-feed" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-feed" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_google_sitemap_status" id="input-status" class="form-control">
|
||||
{% if feed_google_sitemap_status %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-data-feed">{{ entry_data_feed }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea rows="5" readonly id="input-data-feed" class="form-control">{{ data_feed }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-google-sitemap" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if (error_warning) %}
|
||||
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-google-sitemap" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_google_sitemap_fast_status" id="input-status" class="form-control">
|
||||
{% if (feed_google_sitemap_fast_status) %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-data-feed">{{ entry_data_feed }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea rows="5" readonly id="input-data-feed" class="form-control">{{ data_feed }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,120 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><img src="https://www.unisender.com/favicon.ico" alt="" /> </i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="unisender_key"><span data-toggle="tooltip" title="{{ entry_unisender_key_help }}">{{ entry_unisender_key }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input id="unisender_key" type="text" class="form-control" name="feed_unisender_key" value="{{ feed_unisender_key }}" required/>
|
||||
<a href="https://www.unisender.com/?a=opencart" target="_blank">{{ text_get_key }}</a>
|
||||
<div id="key_td" style="width:100%;">
|
||||
{% if _error.feed_unisender_key %}
|
||||
<span class="error alert alert-danger col-sm-12" id="key_error">{{ _error.feed_unisender_key }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="subscribtion_selector"><span data-toggle="tooltip" title="{{ entry_unisender_subscribtion_help }}">{{ entry_unisender_subscribtion }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_unisender_subscribtion[]" id="subscribtion_selector" size="10" class="form-control" multiple>
|
||||
</select>
|
||||
<br/><a id="unselect_subscribtions" href="javascript:void(0);">{{ text_unselect }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-10">
|
||||
<input type="checkbox" id="input-ignore" name="feed_unisender_ignore" value="1" {% if feed_unisender_ignore %}checked{% endif %} />
|
||||
<label class="control-label" for="input-ignore">{{ entry_unisender_ignore }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_unisender_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_unisender_status" id="input-status" class="form-control">
|
||||
{% if feed_unisender_status %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
<a href="{{ export }}">{{ text_export }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function() {
|
||||
$('#unselect_subscribtions').click(function() {
|
||||
$('#subscribtion_selector option').removeAttr('selected');
|
||||
return false;
|
||||
})
|
||||
var subscribtions = {};
|
||||
{% for s in feed_unisender_subscribtion %}
|
||||
subscribtions['{{ s }}'] = true;
|
||||
{% endfor %}
|
||||
$('#unisender_key').change(function() {
|
||||
$('#subscribtion_selector').html('');
|
||||
$('#key_error').remove();
|
||||
$('#subscribtion_selector').removeAttr('readonly');
|
||||
$('#unisender_key').removeAttr('readonly');
|
||||
var err_codes = {
|
||||
invalid_api_key: 'Указан неправильный ключ доступа к API. Проверьте, совпадает ли значение ключа со значением, указанным в личном кабинете.',
|
||||
access_denied: 'Доступ запрещён. Проверьте, включён ли доступ к API в личном кабинете Unisender.'
|
||||
};
|
||||
if ($(this).val()) {
|
||||
$('#subscribtion_selector').attr('readonly', 'readonly');
|
||||
$('#unisender_key').attr('readonly', 'readonly');
|
||||
$.getJSON('index.php?route=extension/feed/unisender/subscribtions&key='+$(this).val()+'&user_token={{ user_token }}', function(data) {
|
||||
$('#subscribtion_selector').removeAttr('readonly');
|
||||
$('#unisender_key').removeAttr('readonly');
|
||||
if (data.error) {
|
||||
var err_text = (err_codes[data.code] ? err_codes[data.code] : 'Ошибка взаимодействия с Unisender API');
|
||||
$('#key_td').html('<span class="error alert alert-danger col-sm-12" id="key_error">'+err_text+'</span>');
|
||||
}
|
||||
else {
|
||||
$.each(data.result, function() {
|
||||
var itm = $(this)[0];
|
||||
$('#subscribtion_selector').append('<option value="' + itm.id + '"' + (subscribtions[itm.id.toString()] ? ' selected' : '') + '>' + itm.title + '</option>');
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
$('#unisender_key').trigger('change');
|
||||
})
|
||||
//--></script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,377 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-feed-yandex-market" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-feed-yandex-market" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_status" id="input-status" class="form-control">
|
||||
{% if feed_yandex_market_status %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-secret-key"><span data-toggle="tooltip" title="{{ help_secret_key }}">{{ entry_secret_key }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="feed_yandex_market_secret_key" value="{{ feed_yandex_market_secret_key }}" placeholder="{{ entry_secret_key }}" id="input-secret-key" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-shopname"><span data-toggle="tooltip" title="{{ help_shopname }}">{{ entry_shopname }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="feed_yandex_market_shopname" value="{{ feed_yandex_market_shopname }}" placeholder="{{ entry_shopname }}" id="input-shopname" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-company"><span data-toggle="tooltip" title="{{ help_company }}">{{ entry_company }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="feed_yandex_market_company" value="{{ feed_yandex_market_company }}" placeholder="{{ entry_company }}" id="input-company" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-id"><span data-toggle="tooltip" title="{{ help_id }}">{{ entry_id }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_id" id="input-id" class="form-control">
|
||||
{% if feed_yandex_market_id == 'model' %}
|
||||
<option value="product_id">{{ text_product_id }}</option>
|
||||
<option value="model" selected="selected">{{ text_model }}</option>
|
||||
<option value="sku">{{ text_sku }}</option>
|
||||
{% elseif feed_yandex_market_id == 'sku' %}
|
||||
<option value="product_id">{{ text_product_id }}</option>
|
||||
<option value="model">{{ text_model }}</option>
|
||||
<option value="sku" selected="selected">{{ text_sku }}</option>
|
||||
{% else %}
|
||||
<option value="product_id" selected="selected">{{ text_product_id }}</option>
|
||||
<option value="model">{{ text_model }}</option>
|
||||
<option value="sku">{{ text_sku }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-type"><span data-toggle="tooltip" title="{{ help_type }}">{{ entry_type }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_type" id="input-type" class="form-control" disabled="disabled">
|
||||
{% if feed_yandex_market_type == 'vendor.model' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model" selected="selected">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% elseif feed_yandex_market_type == 'medicine' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine" selected="selected">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% elseif feed_yandex_market_type == 'books' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books" selected="selected">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% elseif feed_yandex_market_type == 'audiobooks' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks" selected="selected">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% elseif feed_yandex_market_type == 'artist.title' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title" selected="selected">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% elseif feed_yandex_market_type == 'event-ticket' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket" selected="selected">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% elseif feed_yandex_market_type == 'tour' %}
|
||||
<option value="">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour" selected="selected">{{ text_tour }}</option>
|
||||
{% else %}
|
||||
<option value="" selected="selected">{{ text_simplified }}</option>
|
||||
<option value="vendor.model">{{ text_vendor_model }}</option>
|
||||
<option value="medicine">{{ text_medicine }}</option>
|
||||
<option value="books">{{ text_books }}</option>
|
||||
<option value="audiobooks">{{ text_audiobooks }}</option>
|
||||
<option value="artist.title">{{ text_artist_title }}</option>
|
||||
<option value="event-ticket">{{ text_event_ticket }}</option>
|
||||
<option value="tour">{{ text_tour }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-name"><span data-toggle="tooltip" title="{{ help_name }}">{{ entry_name }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_name" id="input-name" class="form-control">
|
||||
{% for result in code_man %}
|
||||
{% if result != 'not_unload' %}
|
||||
<option value="{{ result }}"{% if feed_yandex_market_name == result %} selected="selected"{% endif %}>{{ attribute(_context, 'text_'~result) }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-model"><span data-toggle="tooltip" title="{{ help_model }}">{{ entry_model }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_model" id="input-model" class="form-control">
|
||||
{% for result in code_man %}
|
||||
{% if result == 'not_unload' %}
|
||||
<option value=""{% if feed_yandex_market_model == result %} selected="selected"{% endif %}>{{ attribute(_context, 'text_'~result) }}</option>
|
||||
{% else %}
|
||||
<option value="{{ result }}"{% if feed_yandex_market_model == result %} selected="selected"{% endif %}>{{ attribute(_context, 'text_'~result) }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-vendorcode"><span data-toggle="tooltip" title="{{ help_vendorcode }}">{{ entry_vendorcode }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_vendorcode" id="input-vendorcode" class="form-control">
|
||||
{% for result in code_man %}
|
||||
{% if result == 'not_unload' %}
|
||||
<option value=""{% if feed_yandex_market_vendorcode == result %} selected="selected"{% endif %}>{{ attribute(_context, 'text_'~result) }}</option>
|
||||
{% else %}
|
||||
<option value="{{ result }}"{% if feed_yandex_market_vendorcode == result %} selected="selected"{% endif %}>{{ attribute(_context, 'text_'~result) }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-image"><span data-toggle="tooltip" title="{{ help_image }}">{{ entry_image }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_image" id="input-image" class="form-control">
|
||||
{% if feed_yandex_market_image %}
|
||||
<option value="1" selected="selected">{{ text_yes }}</option>
|
||||
<option value="0">{{ text_no }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_yes }}</option>
|
||||
<option value="0" selected="selected">{{ text_no }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_image_resize }}">{{ entry_image_resize }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input type="number" name="feed_yandex_market_image_width" value="{{ feed_yandex_market_image_width }}" placeholder="{{ text_width }}" class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" name="feed_yandex_market_image_height" value="{{ feed_yandex_market_image_height }}" placeholder="{{ text_height }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
{% if (error_image_width) %}
|
||||
<div class="text-danger">{{ error_image_width }}</div>
|
||||
{% endif %}
|
||||
{% if (error_image_height) %}
|
||||
<div class="text-danger">{{ error_image_height }}</div>
|
||||
{% endif %}
|
||||
{% if (error_image_width_min) %}
|
||||
<div class="text-danger">{{ error_image_width_min }}</div>
|
||||
{% endif %}
|
||||
{% if (error_image_height_min) %}
|
||||
<div class="text-danger">{{ error_image_height_min }}</div>
|
||||
{% endif %}
|
||||
{% if (error_image_width_max) %}
|
||||
<div class="text-danger">{{ error_image_width_max }}</div>
|
||||
{% endif %}
|
||||
{% if (error_image_height_max) %}
|
||||
<div class="text-danger">{{ error_image_height_max }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-image-quantity"><span data-toggle="tooltip" title="{{ help_image_quantity }}">{{ entry_image_quantity }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="number" name="feed_yandex_market_image_quantity" value="{{ feed_yandex_market_image_quantity }}" placeholder="{{ entry_image_quantity }}" id="input-image-quantity" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-main-category"><span data-toggle="tooltip" title="{{ help_main_category }}">{{ entry_main_category }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_main_category" id="input-main-category" class="form-control">
|
||||
{% if feed_yandex_market_main_category %}
|
||||
<option value="1" selected="selected">{{ text_yes }}</option>
|
||||
<option value="0">{{ text_no }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_yes }}</option>
|
||||
<option value="0" selected="selected">{{ text_no }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_category }}">{{ entry_category }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for category in categories %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if category.category_id in feed_yandex_market_categories %}
|
||||
<input type="checkbox" name="feed_yandex_market_categories[]" value="{{ category.category_id }}" checked="checked" />
|
||||
{{ category.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="feed_yandex_market_categories[]" value="{{ category.category_id }}" />
|
||||
{{ category.name }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<a style="cursor:default;" onclick="$(this).parent().find(':checkbox').prop('checked', true);">{{ text_select_all }}</a> / <a style="cursor:default;" onclick="$(this).parent().find(':checkbox').prop('checked', false);">{{ text_unselect_all }}</a></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_manufacturer }}">{{ entry_manufacturer }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for manufacturer in manufacturers %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if manufacturer.manufacturer_id in feed_yandex_market_manufacturers %}
|
||||
<input type="checkbox" name="feed_yandex_market_manufacturers[]" value="{{ manufacturer.manufacturer_id }}" checked="checked" />
|
||||
{{ manufacturer.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="feed_yandex_market_manufacturers[]" value="{{ manufacturer.manufacturer_id }}" />
|
||||
{{ manufacturer.name }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<a style="cursor:default;" onclick="$(this).parent().find(':checkbox').prop('checked', true);">{{ text_select_all }}</a> / <a style="cursor:default;" onclick="$(this).parent().find(':checkbox').prop('checked', false);">{{ text_unselect_all }}</a></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-currency"><span data-toggle="tooltip" title="{{ help_currency }}">{{ entry_currency }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_currency" id="input-currency" class="form-control">
|
||||
{% for currency in currencies %}
|
||||
{% if currency.code == feed_yandex_market_currency %}
|
||||
<option value="{{ currency.code }}" selected="selected">{{ '(' ~ currency.code ~ ') ' ~ currency.title }}</option>
|
||||
{% else %}
|
||||
<option value="{{ currency.code }}">{{ '(' ~ currency.code ~ ') ' ~ currency.title }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-in-stock"><span data-toggle="tooltip" title="{{ help_in_stock }}">{{ entry_in_stock }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_in_stock" id="input-in-stock" class="form-control">
|
||||
{% for stock_status in stock_statuses %}
|
||||
{% if stock_status.stock_status_id == feed_yandex_market_in_stock %}
|
||||
<option value="{{ stock_status.stock_status_id }}" selected="selected">{{ stock_status.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ stock_status.stock_status_id }}">{{ stock_status.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-out-of-stock"><span data-toggle="tooltip" title="{{ help_out_of_stock }}">{{ entry_out_of_stock }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_out_of_stock" id="input-out-of-stock" class="form-control">
|
||||
{% for stock_status in stock_statuses %}
|
||||
{% if stock_status.stock_status_id == feed_yandex_market_out_of_stock %}
|
||||
<option value="{{ stock_status.stock_status_id }}" selected="selected">{{ stock_status.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ stock_status.stock_status_id }}">{{ stock_status.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-quantity-status"><span data-toggle="tooltip" title="{{ help_quantity_status }}">{{ entry_quantity_status }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_market_quantity_status" id="input-quantity-status" class="form-control">
|
||||
{% if feed_yandex_market_quantity_status %}
|
||||
<option value="1" selected="selected">{{ text_yes }}</option>
|
||||
<option value="0">{{ text_no }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_yes }}</option>
|
||||
<option value="0" selected="selected">{{ text_no }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-data-feed">{{ entry_data_feed }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea rows="5" readonly id="input-data-feed" class="form-control">{{ data_feed }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div style="text-align:center;" class="col-sm-12">
|
||||
{{ help_yandex_market }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,79 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-feed" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-feed" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_turbo_status" id="input-status" class="form-control">
|
||||
{% if feed_yandex_turbo_status %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-yandex-turbo-currency">{{ entry_currency }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="feed_yandex_turbo_currency" id="input-yandex-turbo-currency" class="form-control">
|
||||
{% for currency in currencies %}
|
||||
{% if currency.code == feed_yandex_turbo_currency %}
|
||||
<option value="{{ currency.code }}" selected="selected">({{ currency.code }}) {{ currency.title }}</option>
|
||||
{% else %}
|
||||
<option value="{{ currency.code }}">({{ currency.code }}) {{ currency.title }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-data-feed">{{ entry_data_feed }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea rows="5" readonly id="input-data-feed" class="form-control">{{ data_feed }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="made">{{ entry_made }}</div>
|
||||
<style>
|
||||
.made a {
|
||||
display: inline-block;
|
||||
border-radius: 2px;
|
||||
padding: 1px 5px;
|
||||
font-size: 90%;
|
||||
color: #fff;
|
||||
text-decoration: none !important;
|
||||
background: #3d6594;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
Reference in New Issue
Block a user