Inital commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
$(document).ready(function() {
|
||||
$("#hooksocial-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();
|
||||
$('#hooksocial-failed-body').html(data.message);
|
||||
$("#hooksocial-failed").modal("show");
|
||||
}
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown){
|
||||
$("#loading-event").remove();
|
||||
$('#hooksocial-failed-body').html(jqXHR.responseJSON.message);
|
||||
$("#hooksocial-failed").modal("show");
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,94 @@
|
||||
<div class="modal fade" id="hooksocial-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='hooksocial.bo.default' l="An error occured"}</h3>
|
||||
</div>
|
||||
<div class="modal-body" id="hooksocial-failed-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl d='hooksocial.bo.default' l='Edit your social accounts.'}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="hooksocial.configuration.form"}
|
||||
<form method="POST" id="hooksocial-form" action="{url path="/admin/module/hooksocial/save"}" {form_enctype} class="clearfix">
|
||||
|
||||
{form_hidden_fields}
|
||||
|
||||
{form_field field='twitter'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='facebook'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='google'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='instagram'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='pinterest'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='youtube'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field field='rss'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<button type="submit" id="hooksocial-save" name="hooksocial_save" value="save" class="form-submit-button btn btn-sm btn-default" title="{intl d='hooksocial.bo.default' l='Save'}">{intl d='hooksocial.bo.default' l='Save'}</button>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<ul role="presentation">
|
||||
{if {config key="hooksocial_facebook"} }
|
||||
<li>
|
||||
<a href="http://facebook.com/{config key="hooksocial_facebook"}" rel="nofollow" class="facebook" data-toggle="tooltip" data-placement="top"
|
||||
title="{intl l="Facebook" d="hooksocial.fo.default"}" target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-facebook fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Facebook" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="hooksocial_twitter"} }
|
||||
<li>
|
||||
<a href="https://twitter.com/{config key="hooksocial_twitter"}" rel="nofollow" class="twitter" data-toggle="tooltip" data-placement="top"
|
||||
title="{intl l="Twitter" d="hooksocial.fo.default"}" target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-twitter fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Twitter" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="hooksocial_pinterest"} }
|
||||
<li>
|
||||
<a href="https://www.pinterest.com/{config key="hooksocial_pinterest"}" class="pinterest" rel="nofollow" data-toggle="tooltip" data-placement="top" title="{intl l="Pinterest" d="hooksocial.fo.default"}"
|
||||
target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-pinterest fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Pinterest" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="hooksocial_instagram"} }
|
||||
<li>
|
||||
<a href="http://instagram.com/{config key="hooksocial_instagram"}" rel="nofollow" class="instagram" data-toggle="tooltip" data-placement="top"
|
||||
title="{intl l="Instagram" d="hooksocial.fo.default"}" target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-instagram fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Instagram" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="hooksocial_google"} }
|
||||
<li>
|
||||
<a href="http://plus.google.com/{config key="hooksocial_google"}" rel="nofollow" class="google-plus" data-toggle="tooltip" data-placement="top"
|
||||
title="{intl l="Google+" d="hooksocial.fo.default"}" target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-google-plus fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Google+" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="hooksocial_youtube"} }
|
||||
<li>
|
||||
<a href="{config key="hooksocial_youtube"}" rel="nofollow" class="youtube" data-toggle="tooltip" data-placement="top"
|
||||
title="{intl l="Youtube" d="hooksocial.fo.default"}" target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-youtube fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Youtube" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {config key="hooksocial_rss"} }
|
||||
<li>
|
||||
<a href="{config key="hooksocial_rss"}" class="rss" rel="nofollow" data-toggle="tooltip" data-placement="top" title="{intl l="RSS" d="hooksocial.fo.default"}"
|
||||
target="_blank">
|
||||
<span class="fa-stack fa-lg">
|
||||
<span class="fa fa-circle fa-stack-2x"></span>
|
||||
<span class="fa fa-rss fa-stack-1x fa-inverse"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="RSS" d="hooksocial.fo.default"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user