mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 21:26:16 +02:00
18 lines
456 B
JavaScript
18 lines
456 B
JavaScript
$('#locale-save').on('click', function () {
|
|
var value = $("input:radio[name ='language']:checked").val();
|
|
var jsonData = {'value': value};
|
|
Grocy.Api.Put('user/settings/locale', jsonData,
|
|
function(result)
|
|
{
|
|
location.pathname = GetUriParam('returnto');
|
|
},
|
|
function(xhr)
|
|
{
|
|
if (!xhr.statusText.isEmpty())
|
|
{
|
|
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
|
|
}
|
|
}
|
|
);
|
|
});
|