2016-02-09 00:12:54 +01:00
|
|
|
ready = function() {
|
2016-03-04 22:45:36 +01:00
|
|
|
$("[id='user_private']").bootstrapSwitch({ onText: "private", offText: "public"});
|
|
|
|
$("[id='user_quickpay_hidden']").bootstrapSwitch({ onText: "hide", offText: "show" });
|
2016-02-09 00:12:54 +01:00
|
|
|
$('[data-switch]').on('switchChange.bootstrapSwitch', function(event, state) {
|
|
|
|
$(this).closest('form').submit();
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#edit_user_1').on("ajax:error", function(xhr, status, error) {
|
|
|
|
alert("An error occured. Your account has not been updated.");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(ready);
|
|
|
|
$(document).on('page:load', ready);
|