Commit 28e2e32e authored by Keith Downie's avatar Keith Downie

Fixed a bug where the first profile would get reselected when the create button was clicked

parent 4be204e0
...@@ -87,7 +87,7 @@ function ($, sup) ...@@ -87,7 +87,7 @@ function ($, sup)
function initIndex() function initIndex()
{ {
sup.UpdateProfileSelection($('#profile_name li:eq(0)')); sup.UpdateProfileSelection($('#profile_name li[value = ' + window.PROFILE + ']'));
$('#quickvm_topomodal').on('hidden.bs.modal', function() { $('#quickvm_topomodal').on('hidden.bs.modal', function() {
sup.ShowProfileList($('.current')) sup.ShowProfileList($('.current'))
}); });
......
...@@ -272,14 +272,24 @@ function SPITFORM($username, $email, $sshkey, $profile, $newuser, $errors) ...@@ -272,14 +272,24 @@ function SPITFORM($username, $email, $sshkey, $profile, $newuser, $errors)
</div> </div>
</div> </div>
</div>\n"; </div>\n";
echo "<script type='text/javascript'>\n";
echo "window.APT_OPTIONS = {\n"; echo "<script type='text/javascript'>\n";
echo " pageType: 'index',\n"; if (isset($profile) && $profile != "") {
if ($newuser) { echo "window.PROFILE = '$profile_value';\n";
echo " isNewUser: true\n"; }
} else {
echo "};\n"; echo "window.PROFILE = '$profile_default';\n";
echo "</script>\n"; }
echo "</script>\n";
echo "<script type='text/javascript'>\n";
echo "window.APT_OPTIONS = {\n";
echo " pageType: 'index',\n";
if ($newuser) {
echo " isNewUser: true\n";
}
echo "};\n";
echo "</script>\n";
} }
if (!isset($create)) { if (!isset($create)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment