mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
Multi-language support
This commit is contained in:
@@ -823,15 +823,15 @@ function checkDHCP() {
|
||||
var id = $(this).attr('name');
|
||||
var pool = $(this).val().split('/');
|
||||
var base = $('#'+id).text().split('/');
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');}
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal({title:'_(Missing subnet size)_',text:'_(Pool subnet size is not defined)_',type:'error',confirmButtonText:'_(Ok)_'});}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal({title:'_(Invalid subnet size)_',text:'_(Pool subnet size is too large)_',type:'error',confirmButtonText:'_(Ok)_'});}
|
||||
if (typeof(pool[1])=='undefined') pool[1] = 0;
|
||||
if (typeof(base[1])=='undefined') base[1] = 32;
|
||||
var toppool = ip2int(pool[0]);
|
||||
var topbase = ip2int(base[0]);
|
||||
var endpool = toppool+Math.pow(2,32-pool[1]);
|
||||
var endbase = topbase+Math.pow(2,32-base[1]);
|
||||
if (good && (toppool < topbase || endpool > endbase)) {good = false; swal('_(Invalid pool address)_','_(Pool address is out of range)_','error');}
|
||||
if (good && (toppool < topbase || endpool > endbase)) {good = false; swal({title:'_(Invalid pool address)_',text:'_(Pool address is out of range)_',type:'error',confirmButtonText:'_(Ok)_'});}
|
||||
}
|
||||
});
|
||||
if (good) $('#settingsForm').find('input[name^="DOCKER_DHCP6_"]').each(function(){
|
||||
@@ -839,8 +839,8 @@ function checkDHCP() {
|
||||
var id = $(this).attr('name');
|
||||
var pool = $(this).val().split('/');
|
||||
var base = $('#'+id).text().split('/');
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');}
|
||||
if (good && typeof(pool[1])=='undefined') {good = false; swal({title:'_(Missing subnet size)_',text:'_(Pool subnet size is not defined)_',type:'error',confirmButtonText:'_(Ok)_'});}
|
||||
if (good && pool[1]<=base[1]) {good = false; swal({title:'_(Invalid subnet size)_',text:'_(Pool subnet size is too large)_',type:'error',confirmButtonText:'_(Ok)_'});}
|
||||
}
|
||||
});
|
||||
return good;
|
||||
@@ -852,27 +852,27 @@ function checkIP() {
|
||||
$('#settingsForm').find('input[name^="DOCKER_SUBNET_"]').each(function(){
|
||||
if ($(this).val() && !validIP4.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('_(Invalid IPv4 subnet)_','_(Please enter a valid subnet)_','error'); return false;}
|
||||
if (error) {swal({title:'_(Invalid IPv4 subnet)_',text:'_(Please enter a valid subnet)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_GATEWAY_"]').each(function(){
|
||||
if ($(this).val() && !validIP4.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('_(Invalid IPv4 gateway)_','_(Please enter a valid gateway)_','error'); return false;}
|
||||
if (error) {swal({title:'_(Invalid IPv4 gateway)_',text:'_(Please enter a valid gateway)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_RANGE_"]').each(function(){
|
||||
if ($(this).val() && !validIP4.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('_(Invalid IPv4 range)_','_(Please enter a valid range)_','error'); return false;}
|
||||
if (error) {swal({title:'_(Invalid IPv4 range)_',text:'_(Please enter a valid range)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_SUBNET6_"]').each(function(){
|
||||
if ($(this).val() && !validIP6.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('_(Invalid IPv6 subnet)_','_(Please enter a valid subnet)_','error'); return false;}
|
||||
if (error) {swal({title:'_(Invalid IPv6 subnet)_',text:'_(Please enter a valid subnet)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_GATEWAY6_"]').each(function(){
|
||||
if ($(this).val() && !validIP6.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('_(Invalid IPv6 gateway)_','_(Please enter a valid gateway)_','error'); return false;}
|
||||
if (error) {swal({title:'_(Invalid IPv6 gateway)_',text:'_(Please enter a valid gateway)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;}
|
||||
$('#settingsForm').find('input[name^="DOCKER_RANGE6_"]').each(function(){
|
||||
if ($(this).val() && !validIP6.test($(this).val())) error = true;
|
||||
});
|
||||
if (error) {swal('_(Invalid IPv6 range)_','_(Please enter a valid range)_','error'); return false;}
|
||||
if (error) {swal({title:'_(Invalid IPv6 range)_',text:'_(Please enter a valid range)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;}
|
||||
return true;
|
||||
}
|
||||
function showLogOptions(log) {
|
||||
|
||||
@@ -48,6 +48,13 @@ $menu = [];
|
||||
$autostart = @file($autostart_file, FILE_IGNORE_NEW_LINES) ?: [];
|
||||
$names = array_map('var_split', $autostart);
|
||||
|
||||
function my_lang_log($text) {
|
||||
global $language;
|
||||
if (isset($language['healthy'])) $text = str_replace('healthy',$language['healthy'],$text);
|
||||
if (isset($language['Exited'])) $text = str_replace('Exited',$language['Exited'],$text);
|
||||
return my_lang(my_lang(_($text),2));
|
||||
}
|
||||
|
||||
foreach ($containers as $ct) {
|
||||
$name = $ct['Name'];
|
||||
$id = $ct['Id'];
|
||||
@@ -126,19 +133,19 @@ foreach ($containers as $ct) {
|
||||
echo "<td class='advanced'><span class='cpu-$id'>0%</span><div class='usage-disk mm'><span id='cpu-$id' style='width:0'></span><span></span></div>";
|
||||
echo "<br><span class='mem-$id'>0 / 0</span></td>";
|
||||
echo "<td><input type='checkbox' id='$id-auto' class='autostart' container='".htmlspecialchars($name)."'".($info['autostart'] ? ' checked':'').">";
|
||||
echo "<span id='$id-wait' style='float:right;display:none'>wait<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title='"._('seconds')."'></span></td>";
|
||||
echo "<span id='$id-wait' style='float:right;display:none'>"._('wait')."<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title='"._('seconds')."'></span></td>";
|
||||
echo "<td><a class='log' onclick=\"containerLogs('".addslashes(htmlspecialchars($name))."','$id',false,false)\"><img class='basic' src='/plugins/dynamix/icons/log.png'><div class='advanced'>";
|
||||
echo htmlspecialchars(str_replace('Up','Uptime',$ct['Status']))."</div><div class='advanced' style='margin-top:4px'>Created ".htmlspecialchars($ct['Created'])."</div></a></td></tr>";
|
||||
echo htmlspecialchars(str_replace('Up',_('Uptime'),my_lang_log($ct['Status'])))."</div><div class='advanced' style='margin-top:4px'>"._('Created')." ".htmlspecialchars(my_lang($ct['Created']))."</div></a></td></tr>";
|
||||
}
|
||||
foreach ($images as $image) {
|
||||
if (count($image['usedBy'])) continue;
|
||||
$id = $image['Id'];
|
||||
$menu[] = sprintf("addDockerImageContext('%s','%s');", $id, implode(',',$image['Tags']));
|
||||
echo "<tr class='advanced'><td style='width:220px;padding:8px'>";
|
||||
echo "<span class='outer apps'><span id='$id' class='hand'><img src='/webGui/images/disk.png' class='img'></span><span class='inner'>(orphan image)<br><i class='fa fa-square stopped grey-text'></i><span class='state'>stopped</span></span></span>";
|
||||
echo "</td><td colspan='5'>Image ID: $id<br>";
|
||||
echo "<span class='outer apps'><span id='$id' class='hand'><img src='/webGui/images/disk.png' class='img'></span><span class='inner'>("._('orphan image').")<br><i class='fa fa-square stopped grey-text'></i><span class='state'>"._('stopped')."</span></span></span>";
|
||||
echo "</td><td colspan='6'>"._('Image ID').": $id<br>";
|
||||
echo implode(', ',array_map('htmlspecialchars',$image['Tags']));
|
||||
echo "</td><td>Created ".htmlspecialchars($image['Created'])."</td></tr>";
|
||||
echo "</td><td>"._('Created')." ".htmlspecialchars(my_lang($image['Created']))."</td></tr>";
|
||||
}
|
||||
echo "\0".implode($menu).implode($docker)."\0".(pgrep('rc.docker')!==false ? 1:0);
|
||||
?>
|
||||
|
||||
@@ -85,7 +85,7 @@ function popupWithIframe(title, cmd, reload, func) {
|
||||
$('.ui-dialog .ui-dialog-content').css('padding', '12');
|
||||
}
|
||||
function execUpContainer(container) {
|
||||
var title = 'Updating the container: '+container;
|
||||
var title = _('Updating the container')+': '+container;
|
||||
var cmd = '/plugins/dynamix.docker.manager/include/CreateDocker.php?updateContainer=true&ct[]='+encodeURIComponent(container);
|
||||
popupWithIframe(title, cmd, true, 'loadlist');
|
||||
}
|
||||
@@ -108,13 +108,14 @@ function updateContainer(container) {
|
||||
text:body,
|
||||
type:'warning',
|
||||
showCancelButton:true,
|
||||
confirmButtonText:'Yes, update it!'
|
||||
confirmButtonText:_('Yes, update it!'),
|
||||
cancelButtonText:_('Cancel')
|
||||
},function(){
|
||||
execUpContainer(container);
|
||||
});
|
||||
}
|
||||
function rmContainer(container, image, id) {
|
||||
var body = _('Remove container')+': '+container+'<br><br><label><input id="removeimagechk" type="checkbox" checked style="display:inline;width:unset;height:unset;margin-top:unset;margin-bottom:unset">also remove image</label>';
|
||||
var body = _('Remove container')+': '+container+'<br><br><label><input id="removeimagechk" type="checkbox" checked style="display:inline;width:unset;height:unset;margin-top:unset;margin-bottom:unset">'+_('also remove image')+'</label>';
|
||||
$('input[type=button]').prop('disabled',true);
|
||||
swal({
|
||||
title:_('Are you sure?'),
|
||||
@@ -122,7 +123,8 @@ function rmContainer(container, image, id) {
|
||||
type:'warning',
|
||||
html:true,
|
||||
showCancelButton:true,
|
||||
confirmButtonText:'Yes, delete it!',
|
||||
confirmButtonText:_('Yes, delete it!'),
|
||||
cancelButtonText:_('Cancel'),
|
||||
showLoaderOnConfirm:true
|
||||
},function(c){
|
||||
if (!c) {setTimeout(loadlist,0); return;}
|
||||
@@ -142,7 +144,8 @@ function rmImage(image, imageName) {
|
||||
text:body,
|
||||
type:'warning',
|
||||
showCancelButton:true,
|
||||
confirmButtonText:'Yes, delete it!',
|
||||
confirmButtonText:_('Yes, delete it!'),
|
||||
cancelButtonText:_('Cancel'),
|
||||
showLoaderOnConfirm:true
|
||||
},function(c){
|
||||
if (!c) {setTimeout(loadlist,0); return;}
|
||||
@@ -158,7 +161,8 @@ function eventControl(params, spin) {
|
||||
} else {
|
||||
swal({
|
||||
title:_('Execution error'), html:true,
|
||||
text:data.success, type:'error'
|
||||
text:data.success, type:'error',
|
||||
confirmButtonText:_('Ok'),
|
||||
},function(){
|
||||
if (spin) setTimeout(spin+'()',500); else location=window.location.href;
|
||||
});
|
||||
@@ -187,7 +191,7 @@ function resumeAll() {
|
||||
}
|
||||
function checkAll() {
|
||||
$('input[type=button]').prop('disabled',true);
|
||||
$('.updatecolumn').html('<span style="color:#267CA8"><i class="fa fa-refresh fa-spin"></i> checking...</span>');
|
||||
$('.updatecolumn').html('<span style="color:#267CA8"><i class="fa fa-refresh fa-spin"></i> '+_('checking')+'...</span>');
|
||||
$.post('/plugins/dynamix.docker.manager/include/DockerUpdate.php',{},function(){loadlist();});
|
||||
}
|
||||
function updateAll() {
|
||||
@@ -207,9 +211,9 @@ function rebuildAll() {
|
||||
function containerLogs(container, id) {
|
||||
var height = 600;
|
||||
var width = 900;
|
||||
var run = eventURL+'?action=log&container='+id+'&title=Log for: '+container;
|
||||
var run = eventURL+'?action=log&container='+id+'&title='+_('Log for:')+' '+container;
|
||||
var top = (screen.height-height) / 2;
|
||||
var left = (screen.width-width) / 2;
|
||||
var options = 'resizeable=yes,scrollbars=yes,height='+height+',width='+width+',top='+top+',left='+left;
|
||||
window.open(run, 'log', options);
|
||||
window.open(run, _('log'), options);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ function ajaxVMDispatch(params, spin){
|
||||
if (data.error) {
|
||||
swal({
|
||||
title:_("Execution error"), html:true,
|
||||
text:data.error, type:"error"
|
||||
text:data.error, type:"error",
|
||||
confirmButtonText:_('Ok')
|
||||
},function(){
|
||||
if (spin) setTimeout(spin+'()',500); else location=window.location.href;
|
||||
});
|
||||
@@ -72,7 +73,7 @@ function addVMContext(name, uuid, template, state, vncurl, log){
|
||||
}
|
||||
opts.push({divider:true});
|
||||
if (log !== "") {
|
||||
opts.push({text:_("Logs"), icon:"fa-navicon", action:function(e){e.preventDefault(); openWindow('/webGui/scripts/tail_log&arg1='+log, 'Log for:'+name, 600, 900);}});
|
||||
opts.push({text:_("Logs"), icon:"fa-navicon", action:function(e){e.preventDefault(); openWindow('/webGui/scripts/tail_log&arg1='+log, _('Log for:')+name, 600, 900);}});
|
||||
}
|
||||
opts.push({text:_("Edit"), icon:"fa-pencil", href:path+'/UpdateVM?uuid='+uuid});
|
||||
if (state == "shutoff") {
|
||||
@@ -83,7 +84,9 @@ function addVMContext(name, uuid, template, state, vncurl, log){
|
||||
title:_("Are you sure?"),
|
||||
text:_("Remove definition:")+name,
|
||||
type:"warning",
|
||||
showCancelButton:true
|
||||
showCancelButton:true,
|
||||
confirmButtonText:_('Proceed'),
|
||||
cancelButtonText:_('Cancel')
|
||||
},function(){
|
||||
$('#vm-'+uuid).find('i').removeClass('fa-play fa-square fa-pause').addClass('fa-refresh fa-spin');
|
||||
ajaxVMDispatch({action:"domain-undefine",uuid:uuid}, "loadlist");
|
||||
@@ -96,7 +99,9 @@ function addVMContext(name, uuid, template, state, vncurl, log){
|
||||
title:_("Are you sure?"),
|
||||
text:_("Completely REMOVE")+" "+name+" "+_("disk image and definition"),
|
||||
type:"warning",
|
||||
showCancelButton:true
|
||||
showCancelButton:true,
|
||||
confirmButtonText:_('Proceed'),
|
||||
cancelButtonText:_('Cancel')
|
||||
},function(){
|
||||
$('#vm-'+uuid).find('i').removeClass('fa-play fa-square fa-pause').addClass('fa-refresh fa-spin');
|
||||
ajaxVMDispatch({action:"domain-delete",uuid:uuid}, "loadlist");
|
||||
|
||||
@@ -147,7 +147,7 @@ function prepareInput(form) {
|
||||
form.file.disabled = false;
|
||||
form.text.disabled = false;
|
||||
form.copy.disabled = false;
|
||||
swal({title:'_(Printable Characters Only)_',text:'_(Use <b>ASCII</b> characters from space " " to tilde "~")_<br>_(Otherwise use the <b>keyfile</b> method for UTF8 input)_',html:true,type:'error'});
|
||||
swal({title:'_(Printable Characters Only)_',text:'_(Use <b>ASCII</b> characters from space " " to tilde "~")_<br>_(Otherwise use the **keyfile** method for UTF8 input)_',html:true,type:'error',confirmButtonText:'_(Ok)_'});
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ function parityWarning(form) {
|
||||
} else {
|
||||
var text = '_(<i>Parity</i> disk(s) content will be overwritten)_';
|
||||
}
|
||||
swal({title:'_(Proceed to start)_',text:text,html:true,type:'warning',confirmButtonText:'_(Proceed)_',showCancelButton:true},function(){prepareInput(form);});
|
||||
swal({title:'_(Proceed to start)_',text:text,html:true,type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){prepareInput(form);});
|
||||
}
|
||||
function tab0() {
|
||||
$.removeCookie('one',{path:'/'});
|
||||
@@ -187,7 +187,7 @@ function parityStatus() {
|
||||
function stopArray(form) {
|
||||
$(form).append('<input type="hidden" name="cmdStop" value="Stop">');
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdStop"]').remove();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(p){if (p) form.submit(); else $('input[name="cmdStop"]').remove();});
|
||||
<?else:?>
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
@@ -195,7 +195,7 @@ function stopArray(form) {
|
||||
function stopParity(form,text) {
|
||||
$(form).append('<input type="hidden" name="cmdNoCheck" value="Cancel">');
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the running operation)_: '+text,type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdNoCheck"]').remove();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the running operation)_: '+text,type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(p){if (p) form.submit(); else $('input[name="cmdNoCheck"]').remove();});
|
||||
<?else:?>
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
@@ -217,7 +217,7 @@ function shutdown_now(form,cmd) {
|
||||
case 'reboot': var text = '_(This will reboot the system)_'; break;
|
||||
case 'shutdown': var text = '_(This will shutdown the system)_'; break;
|
||||
}
|
||||
swal({title:'_(Proceed)_?',text:text,type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmd"]').remove();});
|
||||
swal({title:'_(Proceed)_?',text:text,type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(p){if (p) form.submit(); else $('input[name="cmd"]').remove();});
|
||||
<?else:?>
|
||||
form.submit();
|
||||
<?endif;?>
|
||||
@@ -272,6 +272,7 @@ function formatWarning(val) {
|
||||
+ '<p><br><b>_(WARNING)_</b>'
|
||||
+ '<p>_(A format is <b>NEVER</b> part of a data recovery or disk rebuild process and if done in such circumstances will normally lead to loss of all data on the disks being formatted)_.',
|
||||
type: "warning",
|
||||
confirmButtonText:'_(Ok)_',
|
||||
html: true
|
||||
});
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ function apply(form) {
|
||||
// step 1: prepare the update and report back the changes
|
||||
$.post('/webGui/include/UpdateOne.php',args,function(reply){
|
||||
if (reply.error) {
|
||||
swal({type:'error', title:'_(Assignment error)_', text:reply.error},function(){
|
||||
swal({type:'error',title:'_(Assignment error)_',text:reply.error,confirmButtonText:'_(Ok)_'},function(){
|
||||
$('#wait-'+id).hide();
|
||||
$(form).find('input[value="_(Done)_"]').val('_(Reset)_').prop('disabled',false).prop('onclick',null).off('click').click(function(){reset($('form[name="'+id+'"]'));});
|
||||
});
|
||||
@@ -86,7 +86,7 @@ function apply(form) {
|
||||
$.post('/webGui/include/UpdateTwo.php',{id:id,name:encodeURI(name)},function(reply){
|
||||
if (reply.error) {
|
||||
// report error and reload table
|
||||
swal({type:'error', title:'_(Execution error)_', text:reply.error},function(){
|
||||
swal({type:'error',title:'_(Execution error)_',text:reply.error,confirmButtonText:'_(Ok)_'},function(){
|
||||
$('#wait-'+id).hide();
|
||||
$('input[value="_(Done)_"]').prop('disabled',false);
|
||||
reset($('form[name="'+id+'"]'));
|
||||
|
||||
@@ -939,7 +939,7 @@ function toggleView(field,init,view) {
|
||||
}
|
||||
function StopArray() {
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true},function(){StopArrayNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){StopArrayNow();});
|
||||
<?else:?>
|
||||
StopArrayNow();
|
||||
<?endif;?>
|
||||
@@ -950,7 +950,7 @@ function StopArrayNow() {
|
||||
}
|
||||
function StartArray() {
|
||||
<?if ($confirm['stop']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will start the array)_',type:'warning',showCancelButton:true},function(){StartArrayNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will start the array)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){StartArrayNow();});
|
||||
<?else:?>
|
||||
StartArrayNow();
|
||||
<?endif;?>
|
||||
@@ -961,7 +961,7 @@ function StartArrayNow() {
|
||||
}
|
||||
function Reboot() {
|
||||
<?if ($confirm['down']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will reboot the system)_',type:'warning',showCancelButton:true},function(){RebootNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will reboot the system)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){RebootNow();});
|
||||
<?else:?>
|
||||
RebootNow();
|
||||
<?endif;?>
|
||||
@@ -972,7 +972,7 @@ function RebootNow() {
|
||||
}
|
||||
function Shutdown() {
|
||||
<?if ($confirm['down']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will shutdown the system)_',type:'warning',showCancelButton:true},function(){ShutdownNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will shutdown the system)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){ShutdownNow();});
|
||||
<?else:?>
|
||||
ShutdownNow();
|
||||
<?endif;?>
|
||||
@@ -985,7 +985,7 @@ function ShutdownNow() {
|
||||
<?if ($sleep):?>
|
||||
function Sleep() {
|
||||
<?if ($confirm['sleep']):?>
|
||||
swal({title:'_(Proceed)_?',text:'_(This will put the system to sleep)_',type:'warning',showCancelButton:true},function(){SleepNow();});
|
||||
swal({title:'_(Proceed)_?',text:'_(This will put the system to sleep)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){SleepNow();});
|
||||
<?else:?>
|
||||
SleepNow();
|
||||
<?endif;?>
|
||||
|
||||
@@ -73,20 +73,20 @@ $(function() {
|
||||
url:'/webGui/include/FileUpload.php',
|
||||
beforeEach:function(file) {
|
||||
if (!file.type.match(/^image\/png/)) {
|
||||
swal({title:"_(Warning)_",text:"_(Only PNG images are allowed)_!",type:"warning"});
|
||||
swal({title:"_(Warning)_",text:"_(Only PNG images are allowed)_!",type:"warning",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(err, file, i) {
|
||||
switch (err) {
|
||||
case 'BrowserNotSupported':
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB)_ (524,288 _(bytes)_)",type:"error"});
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB)_ (524,288 _(bytes)_)",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -104,7 +104,7 @@ $(function() {
|
||||
$('select[name="banner"]').trigger('change');
|
||||
filename = file.name;
|
||||
} else {
|
||||
swal({title:"_(Upload error)_",text:response,type:"error"});
|
||||
swal({title:"_(Upload error)_",text:response,type:"error",confirmButtonText:'_(Ok)_'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ function prepareSettings(form) {
|
||||
$(form).find('input[name^="METRIC:"]').each(function(){metrics.push($(this).val());});
|
||||
$(form).find('input[name^="METRIC6:"]').each(function(){metrics6.push($(this).val());});
|
||||
if (metrics.same() || metrics6.same()) {
|
||||
swal('Duplicate metrics','List of default gateways contains duplicate metric values','error');
|
||||
swal({title:'Duplicate metrics',text:'List of default gateways contains duplicate metric values',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (form.TYPE.value == 'access') {
|
||||
@@ -118,7 +118,7 @@ function prepareSettings(form) {
|
||||
var vlans = [];
|
||||
$(form).find('input[name^="VLANID:"]').each(function(){vlans.push($(this).val());});
|
||||
if (vlans.same()) {
|
||||
swal('_(VLAN assignment mismatch)_','_(List of VLANs contains duplicate VLAN numbers)_','error');
|
||||
swal({title:'_(VLAN assignment mismatch)_',text:'_(List of VLANs contains duplicate VLAN numbers)_',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ function backup() {
|
||||
$('input[value="_(Creating Flash backup)_..."]').val('_(Flash backup)_');
|
||||
$('div.spinner').hide('slow');
|
||||
$('#pleaseWait').hide('slow');
|
||||
swal('_(Creation error)_','_(Insufficient free disk space available)_','error');
|
||||
swal({title:'_(Creation error)_',text:'_(Insufficient free disk space available)_',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ var keys = {};
|
||||
function upload(form) {
|
||||
var language = form.language.value;
|
||||
if (!language) {
|
||||
swal('_(Missing Language)_','_(Please select a language before proceeding)_!','error');
|
||||
swal({title:'_(Missing Language)_',text:'_(Please select a language before proceeding)_!',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return;
|
||||
}
|
||||
var cmd = form.check.checked ? 'rm' :'add';
|
||||
@@ -42,7 +42,7 @@ function upload(form) {
|
||||
var name = list.split(',');
|
||||
for (var i=0; i < name.length; i++) installed.push(keys[name[i]]);
|
||||
$('#installed').text(installed.join(', '));
|
||||
swal({title:title,text:'_(See)_ <a href="/Settings/DisplaySettings">_(Display Settings)_</a> _(to select your language)_',type:'success',html:true});
|
||||
swal({title:title,text:'_(See)_ <a href="/Settings/DisplaySettings">_(Display Settings)_</a> _(to select your language)_',type:'success',html:true,confirmButtonText:'_(Ok)_'});
|
||||
$('#uploadbutton').prop('disabled',true);
|
||||
}
|
||||
});
|
||||
@@ -56,7 +56,7 @@ function getZIPfile(event,form) {
|
||||
form.file.value = reader.result;
|
||||
$('#uploadbutton').prop('disabled',false);
|
||||
} else {
|
||||
swal('_(Wrong File Extension)_','_(Only ZIP files are allowed)_','warning');
|
||||
swal({title:'_(Wrong File Extension)_',text:'_(Only ZIP files are allowed)_',type:'warning',confirmButtonText:'_(Ok)_'});
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
|
||||
@@ -58,7 +58,7 @@ function provisionSSL(button) {
|
||||
var obj = data.responseJSON;
|
||||
var msg = "_(Sorry, an error occurred in processing your SSL certificate)_. _(The error is)_: "+obj.error+".";
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal("_(Oops)_",msg,"error");
|
||||
swal({title:"_(Oops)_",text:msg,type:"error",confirmButtonText:'_(Ok)_'});
|
||||
};
|
||||
var success_provision = function(data) {
|
||||
if (data.bundle) {
|
||||
@@ -78,7 +78,7 @@ function provisionSSL(button) {
|
||||
};
|
||||
var success_rebind_check = function(data) {
|
||||
$.post("/webGui/include/CertUpload.php",{text:data.bundle,csrf_token:"<?=$var['csrf_token']?>"},function(data2) {
|
||||
swal({title:"",text:msg,type:"success",allowEscapeKey:false},function(){button.form.submit();});
|
||||
swal({title:"",text:msg,type:"success",allowEscapeKey:false,confirmButtonText:'_(Ok)_'},function(){button.form.submit();});
|
||||
}).fail(failure);
|
||||
};
|
||||
$.post("/webGui/include/ProvisionCert.php",success_provision).fail(failure);
|
||||
@@ -90,11 +90,11 @@ function updateDNS(button) {
|
||||
var obj = data.responseJSON;
|
||||
var msg = "_(Sorry, an error occurred updating unraid.net DNS records)_. _(The error is)_: "+obj.error+".";
|
||||
$(button).prop("disabled", false).html('_(Update DNS)_');
|
||||
swal("_(Oops)_",msg,"error");
|
||||
swal({title:"_(Oops)_",text:msg,type:"error",confirmButtonText:'_(Ok)_'});
|
||||
};
|
||||
var success = function(data) {
|
||||
$(button).prop("disabled", false).html('_(Update DNS)_');
|
||||
swal("","_(Your local IP address)_ <?=$internalip?> _(has been updated for unraid.net)_.","success");
|
||||
swal({title:"",text:"_(Your local IP address)_ <?=$internalip?> _(has been updated for unraid.net)_.",type:"success",confirmButtonText:'_(Ok)_'});
|
||||
};
|
||||
$.post("/webGui/include/UpdateDNS.php",success).fail(failure);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ function checkPorts(form) {
|
||||
item.prop('disabled',false);
|
||||
}
|
||||
if (list.length > 0) {
|
||||
swal({title:'_(Non-recommended port)_'+(list.length>1?'s':''),text:list.join(', ')+'<br>_(may conflict with well-known services)_',html:true,type:'warning',showCancelButton:true},function(){form.submit();});
|
||||
swal({title:'_(Non-recommended port)_'+(list.length>1?'s':''),text:list.join(', ')+'<br>_(may conflict with well-known services)_',html:true,type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){form.submit();});
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function check_rules(form) {
|
||||
var mac = [];
|
||||
$(form).find('select[name^="eth"]').each(function(){mac.push($(this).val());});
|
||||
if (mac.same()) {
|
||||
swal('_(MAC address mismatch)_','_(Rules contain duplicate MAC address assignments)_','error');
|
||||
swal({title:'_(MAC address mismatch)_',text:'_(Rules contain duplicate MAC address assignments)_',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
||||
@@ -44,7 +44,7 @@ function setNewPerms(form) {
|
||||
dirs += item.value;
|
||||
}
|
||||
}
|
||||
if (dirs) swal({title:'_(Proceed)_?',text:'_(This will update folder & file permissions)_',type:'warning',showCancelButton:true},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'_(New Permissions)_',490,430,true);});
|
||||
if (dirs) swal({title:'_(Proceed)_?',text:'_(This will update folder & file permissions)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'_(New Permissions)_',490,430,true);});
|
||||
}
|
||||
$(function() {
|
||||
$('#s1').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>, firstItemChecksAll:true, explicitClose:'..._(close)_'});
|
||||
|
||||
@@ -62,7 +62,7 @@ function archiveList(init) {
|
||||
});
|
||||
}
|
||||
function askConfirmation() {
|
||||
swal({title:"_(Are you sure)_?",text:"_(This will delete all notification files)_!",type:"warning",showCancelButton:true},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});});
|
||||
swal({title:"_(Are you sure)_?",text:"_(This will delete all notification files)_!",type:"warning",showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});});
|
||||
}
|
||||
function openClose(row) {
|
||||
var extra = '#archive_list .tablesorter-childRow.row'+row+' td';
|
||||
|
||||
@@ -37,7 +37,7 @@ span.status.vhshift{margin-right:-10px!important}
|
||||
</style>
|
||||
<script>
|
||||
function deleteRoute(gateway,route,metric) {
|
||||
swal({title:"Delete route?",text:route+" by gateway "+gateway,type:"warning",showCancelButton:true},function(){
|
||||
swal({title:"Delete route?",text:route+" by gateway "+gateway,type:"warning",showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){
|
||||
$.post('/webGui/include/RoutingTable.php',{gateway:gateway,route:route,metric:metric,task:'delete'},function(){resetTable();});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -338,15 +338,15 @@ function prepareEdit(form) {
|
||||
// Test share name validity
|
||||
var share = form.shareName.value.trim();
|
||||
if (share.length==0) {
|
||||
swal('_(Missing share name)_', '_(Enter a name for the share)_', 'error');
|
||||
swal({title:'_(Missing share name)_',text:'_(Enter a name for the share)_',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (share.match('^(disk[0-9]+|cache[0-9]*|flash)$')) {
|
||||
swal('_(Invalid share name)_', '_(Do not use reserved names)_', 'error');
|
||||
swal({title:'_(Invalid share name)_',text:'_(Do not use reserved names)_',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (share.match('[:\\\/*<>|"]')) {
|
||||
swal('_(Invalid Characters)_', '_(You cannot use the following within share names)_ : \\ / * < > | "','error');
|
||||
swal({title:'_(Invalid Characters)_',text:'_(You cannot use the following within share names)_ : \\ / * < > | "',type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
form.shareName.value = share;
|
||||
|
||||
@@ -36,7 +36,7 @@ $(function() {
|
||||
function mailcheck(form) {
|
||||
var email = /^\S+@\S+\.\S+/;
|
||||
if (!email.test(form.root.value)) {
|
||||
swal({title:"_(Invalid email address)_",text:"_(Please enter a valid sending email address)_",type:"error"});
|
||||
swal({title:"_(Invalid email address)_",text:"_(Please enter a valid sending email address)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -19,7 +19,7 @@ Code="e93f"
|
||||
<script>
|
||||
function TerminalButton() {
|
||||
if (/MSIE|Edge/.test(navigator.userAgent)) {
|
||||
swal({title:'_(Unsupported Feature)_',text:'_(Sorry, this feature is not supported by MSIE/Edge)_.<br>_(Please try a different browser)_',html:true,type:'error'});
|
||||
swal({title:'_(Unsupported Feature)_',text:'_(Sorry, this feature is not supported by MSIE/Edge)_.<br>_(Please try a different browser)_',html:true,type:'error',confirmButtonText:'_(Ok)_'});
|
||||
return;
|
||||
}
|
||||
var d = new Date();
|
||||
|
||||
@@ -59,15 +59,15 @@ function showPassword() {
|
||||
function checkUsername(form) {
|
||||
var username = form.userName.value.trim();
|
||||
if (!username.match('^[a-z_][a-z0-9_-]*[$]?$')) {
|
||||
swal({title:"_(Invalid user name)_",text:"_(Use only lowercase letters, digits, underscores and dashes)_",type:"error"});
|
||||
swal({title:"_(Invalid user name)_",text:"_(Use only lowercase letters, digits, underscores and dashes)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (username.match('^(disk[0-9]+|cache[0-9]*|parity[0-9]*|flash)$')) {
|
||||
swal({title:"_(Invalid user name)_",text:"_(Do not use reserved names)_",type:"error"});
|
||||
swal({title:"_(Invalid user name)_",text:"_(Do not use reserved names)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) {
|
||||
swal({title:"_(Password too long)_",text:"_(Use a password up to 128 characters)_",type:"error"});
|
||||
swal({title:"_(Password too long)_",text:"_(Use a password up to 128 characters)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (filename) {
|
||||
@@ -118,20 +118,20 @@ $(function(){
|
||||
data:{path:path,"csrf_token":"<?=$var['csrf_token']?>"},
|
||||
beforeEach:function(file) {
|
||||
if (!file.type.match(/^image\/png/)) {
|
||||
swal({title:"Warning",text:"Only PNG images are allowed!",type:"warning"});
|
||||
swal({title:"Warning",text:"Only PNG images are allowed!",type:"warning",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(error, file, i) {
|
||||
switch (error) {
|
||||
case 'BrowserNotSupported':
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 95 kB)_ (97,280 _(bytes)_)",type:"error"});
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 95 kB)_ (97,280 _(bytes)_)",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -149,7 +149,7 @@ $(function(){
|
||||
$('input[name="userDesc"]').trigger('change');
|
||||
filename = file.name;
|
||||
} else {
|
||||
swal({title:"_(Upload error)_",text:response,type:"error"});
|
||||
swal({title:"_(Upload error)_",text:response,type:"error",confirmButtonText:'_(Ok)_'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -65,7 +65,7 @@ function showPassword() {
|
||||
}
|
||||
function checkPassword(form) {
|
||||
if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) {
|
||||
swal({title:"Password too long",text:"Use a password up to 128 characters",type:"error"});
|
||||
swal({title:"Password too long",text:"Use a password up to 128 characters",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
form.userPassword.value = base64(form.userPasswordGUI.value);
|
||||
@@ -122,20 +122,20 @@ $(function(){
|
||||
data:{"csrf_token":"<?=$var['csrf_token']?>"},
|
||||
beforeEach:function(file) {
|
||||
if (!file.type.match(/^image\/png/)) {
|
||||
swal({title:"Warning",text:"Only PNG images are allowed!",type:"warning"});
|
||||
swal({title:"Warning",text:"Only PNG images are allowed!",type:"warning",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function(error, file, i) {
|
||||
switch (error) {
|
||||
case 'BrowserNotSupported':
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
|
||||
swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
break;
|
||||
case 'TooManyFiles':
|
||||
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
|
||||
break;
|
||||
case 'FileTooLarge':
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB (524,288 bytes))_",type:"error"});
|
||||
swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB (524,288 bytes))_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -153,7 +153,7 @@ $(function(){
|
||||
$('input[name="userDesc"]').trigger('change');
|
||||
filename = file.name;
|
||||
} else {
|
||||
swal({title:"_(Upload error)_",text:response,type:"error"});
|
||||
swal({title:"_(Upload error)_",text:response,type:"error",confirmButtonText:'_(Ok)_'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -296,7 +296,7 @@ function hideUpgrade(set) {
|
||||
}
|
||||
function openUpgrade() {
|
||||
hideUpgrade();
|
||||
swal({title:'<?=_("Update")?> Unraid OS',text:'<?=_("Do you want to update to the new version")?>?',type:'warning',showCancelButton:true},function(){
|
||||
swal({title:'<?=_("Update")?> Unraid OS',text:'<?=_("Do you want to update to the new version")?>?',type:'warning',showCancelButton:true,confirmButtonText:'<?=_("Proceed")?>',cancelButtonText:'<?=_("Cancel")?>'},function(){
|
||||
openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2=unRAIDServer.plg','<?=_("Update")?> Unraid OS',600,900,true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,7 +42,12 @@ function my_lang($text,$do=0) {
|
||||
}
|
||||
if (isset($language['today'])) $text = str_replace('today',$language['today'],$text);
|
||||
if (isset($language['yesterday'])) $text = str_replace('yesterday',$language['yesterday'],$text);
|
||||
if (isset($language['day ago'])) $text = str_replace('day ago',$language['day ago'],$text);
|
||||
if (isset($language['days ago'])) $text = str_replace('days ago',$language['days ago'],$text);
|
||||
if (isset($language['week ago'])) $text = str_replace('week ago',$language['week ago'],$text);
|
||||
if (isset($language['weeks ago'])) $text = str_replace('weeks ago',$language['weeks ago'],$text);
|
||||
if (isset($language['month ago'])) $text = str_replace('month ago',$language['month ago'],$text);
|
||||
if (isset($language['months ago'])) $text = str_replace('months ago',$language['months ago'],$text);
|
||||
break;
|
||||
case 1: // number translation
|
||||
$numbers = isset($language['Numbers_array']) ? explode(' ',$language['Numbers_array']) : [];
|
||||
@@ -81,8 +86,6 @@ $return = 'function _(t){return t;}';
|
||||
$jscript = "$docroot/webGui/javascript/translate.en.js";
|
||||
|
||||
if ($locale) {
|
||||
// split URI into translation levels
|
||||
$uri = array_filter(explode('/',strtok($_SERVER['REQUEST_URI'],'?')));
|
||||
$text = "$docroot/languages/$locale/translations.txt";
|
||||
if (file_exists($text)) {
|
||||
$basis = "$docroot/languages/$locale/translations.dot";
|
||||
@@ -104,6 +107,8 @@ if ($locale) {
|
||||
file_put_contents($jscript,$return);
|
||||
}
|
||||
}
|
||||
// split URI into translation levels
|
||||
$uri = array_filter(explode('/',strtok($_SERVER['REQUEST_URI'],'?')));
|
||||
foreach($uri as $more) {
|
||||
$more = strtolower($more);
|
||||
$text = "$docroot/languages/$locale/$more.txt";
|
||||
|
||||
@@ -58,7 +58,7 @@ function startTrial() {
|
||||
$.post('https://keys.lime-technology.com/account/trial',{timestamp:timestamp,guid:guid},function(data) {
|
||||
$.post('/webGui/include/TrialRequest.php',{trial:data.trial,csrf_token:'<?=$var['csrf_token']?>'},function(data2) {
|
||||
$('#spinner_image,#status_panel').fadeOut('fast');
|
||||
parent.swal({title:"<?=_('Trial')?> <?=(strstr($var['regTy'], 'expired')?_('extended'):_('started'))?>",text:"<?=_('Thank you for registering USB Flash GUID')?> "+guid+".",type:'success'},function(){parent.window.location='/Main';});
|
||||
parent.swal({title:"<?=_('Trial')?> <?=(strstr($var['regTy'], 'expired')?_('extended'):_('started'))?>",text:"<?=_('Thank you for registering USB Flash GUID')?> "+guid+".",type:'success',confirmButtonText:'<?=_("Ok")?>'},function(){parent.window.location='/Main';});
|
||||
});
|
||||
}).fail(function(data) {
|
||||
$('#trial_form').find('input').prop('disabled', false);
|
||||
|
||||
Reference in New Issue
Block a user