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)
function initIndex()
{
sup.UpdateProfileSelection($('#profile_name li:eq(0)'));
sup.UpdateProfileSelection($('#profile_name li[value = ' + window.PROFILE + ']'));
$('#quickvm_topomodal').on('hidden.bs.modal', function() {
sup.ShowProfileList($('.current'))
});
......
......@@ -272,14 +272,24 @@ function SPITFORM($username, $email, $sshkey, $profile, $newuser, $errors)
</div>
</div>
</div>\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";
echo "<script type='text/javascript'>\n";
if (isset($profile) && $profile != "") {
echo "window.PROFILE = '$profile_value';\n";
}
else {
echo "window.PROFILE = '$profile_default';\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)) {
......
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