Skip to content

Commit

Permalink
Dev: added link to services
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 1, 2016
1 parent b7fd28e commit 082b32e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

$config['versionnumber'] = "2.06lts";
$config['dbversionnumber'] = 184;
$config['buildnumber'] = 160229;
$config['buildnumber'] = '';
$config['updatable'] = true;
return $config;
?>
10 changes: 5 additions & 5 deletions application/controllers/admin/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,12 @@ public function getnewkey()
{
if (Permission::model()->hasGlobalPermission('superadmin'))
{
// We try to get the update key in the database. If it's empty, getWelcomeMessage will return subscription
$updateKey = NULL;
// We want to call the server to display the subscribe message
// So if needed, we can display a specific html message (like we do for update to LTS with a free key)
// To force server to render the subscribe message, we call for the last 2.06+ release (which need at least a free key)
$updateModel = new UpdateForm();
$destinationBuild = $_REQUEST['destinationBuild'];
$welcome = $updateModel->getWelcomeMessage($updateKey, $destinationBuild); //$updateKey
echo $this->_renderWelcome($welcome);
$welcome = $updateModel->getWelcomeMessage(null, '160129'); //$updateKey
echo $this->_renderWelcome($welcome);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
echo $serverAnswer->html;
?>


<?php if(isset($serverAnswer->alert_message) && $serverAnswer->alert_message=="subscribe_lts"):?>
<div id="update-alert" class="alert alert-info alert-dismissible" role="alert" style="background-color: #fff; border: 1px solid #800051; color: #800051; margin-top: 1em;">
<button aria-disabled="false" role="button" type="button" class="close ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only limebutton" data-dismiss="alert" aria-label="Close"><span class="ui-button-text"><span aria-hidden="true">×</span></span></button>
<?php eT('To use comfortUpdate for LTS version, you need to subscribe to a Premium Package. Free keys are not accepted.');?>
<?php printf(gT('To use comfortUpdate for LTS version, %s you need to subscribe to a Premium Package %s. Free keys are not accepted.'), '<a href="https://www.limesurvey.org/services">', '</a>' );?>


</div>
<?php endif;?>

Expand Down
27 changes: 1 addition & 26 deletions scripts/admin/comfortupdate/displayComfortStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,10 @@ $.fn.displayComfortStep = function(options)
}


/*
$url += '?destinationBuild=' + $destinationBuild + '&access_token=' + $access_token;
$.ajax({
url: $url,
success: function(html) {
// We hide the loader, and we append the submit new key content
$ajaxLoader.hide();
$("#updaterContainer").empty().append(html);
// Menus
$("#welcome").hide();
$("#newKey").show();
},
error : function(html, statut){
$("#preUpdaterContainer").empty();
$("#updaterLayout").show();
$("#updaterContainer").show();
$("#updaterContainer").empty().append("<span class='error'>you have an error, or a notice, inside your local installation of limesurvey. See : <br/></span>");
$("#updaterContainer").append(html.responseText);
}
});
*/

// Those datas are defined in _ajaxVariables view
datas = 'destinationBuild=' + $destinationBuild + '&access_token=' + $access_token + '&'+csrf_token_name+'='+csrf_token;


$.ajax({
type: "POST",
data: datas,
Expand Down

0 comments on commit 082b32e

Please sign in to comment.