Inital commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
$(document).ready(function() {
|
||||
$("#hookanalytics-form").on("submit", function(e, data){
|
||||
e.preventDefault();
|
||||
var form = $(this);
|
||||
|
||||
$('body').append('<div class="modal-backdrop fade in" id="loading-event"><div class="loading"></div></div>');
|
||||
|
||||
$.ajax({
|
||||
url: form.attr('action'),
|
||||
type: form.attr('method'),
|
||||
data: form.serialize()
|
||||
}).done(function(){
|
||||
$("#loading-event").remove();
|
||||
})
|
||||
.success(function(data) {
|
||||
if (data.error != 0) {
|
||||
$("#loading-event").remove();
|
||||
$('#hookanalytics-failed-body').html(data.message);
|
||||
$("#hookanalytics-failed").modal("show");
|
||||
}
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown){
|
||||
$("#loading-event").remove();
|
||||
$('#hookanalytics-failed-body').html(jqXHR.responseJSON.message);
|
||||
$("#hookanalytics-failed").modal("show");
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
<div class="modal fade" id="hookanalytics-failed" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl d='hookanalytics.bo.default' l="An error occured"}</h3>
|
||||
</div>
|
||||
<div class="modal-body" id="hookanalytics-failed-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l='Edit your analytics configuration.'}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="hookanalytics.configuration.form"}
|
||||
<form method="POST" id="hookanalytics-form" action="{url path="/admin/module/hookanalytics/save"}" {form_enctype} class="clearfix">
|
||||
|
||||
{form_hidden_fields}
|
||||
|
||||
{form_field field='trackingcode'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" style="height: 200px;" title="{$label}">{$value}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<button type="submit" id="hookanalytics-save" name="hookanalytics_save" value="save" class="form-submit-button btn btn-sm btn-default" title="{intl d='hookanalytics.bo.default' l='Save'}">{intl d='hookanalytics.bo.default' l='Save'}</button>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user