Commit 86ab83d0 authored by Leigh Stoller's avatar Leigh Stoller

Fix a few nits from Rob:

1) When sending email verification, set the From to aptlab.net.

2) After entering the verification code, throw up the Please Wait
   modal. 

3. Use "booted" instead "provisioned"
parent 76be24e8
......@@ -157,7 +157,7 @@ while ($row = mysql_fetch_array($query_result)) {
function SPITFORM($formfields, $newuser, $errors)
{
global $TBBASE, $TBMAIL_OPS;
global $TBBASE, $APTMAIL;
global $profile_array, $this_user, $profilename, $profile, $am_array;
# XSS prevention.
......@@ -346,7 +346,7 @@ function SPITFORM($formfields, $newuser, $errors)
"Here is your user verification code. Please copy and\n".
"paste this code into the box on the experiment page.\n\n".
" $stuffing\n",
"From: $TBMAIL_OPS");
"From: $APTMAIL");
echo "<input type='hidden' name='stuffing' value='$stuffing' />";
}
}
......
......@@ -35,10 +35,5 @@ window.APT_OPTIONS.config = function ()
window.APT_OPTIONS.initialize = function (sup)
{
if (window.APT_OPTIONS.isNewUser)
{
sup.ShowModal('#verify_modal');
}
$('body').show();
}
......@@ -11,6 +11,14 @@ function ($, sup)
{
window.APT_OPTIONS.initialize(sup);
if (window.APT_OPTIONS.isNewUser) {
$('#verify_modal_submit').click(function (event) {
sup.HideModal('#verify_modal');
sup.ShowModal("#waitwait");
return true;
});
sup.ShowModal('#verify_modal');
}
$('#quickvm_topomodal').on('hidden.bs.modal', function() {
ShowProfileList($('.current'))
});
......@@ -36,8 +44,6 @@ function ($, sup)
sup.ShowModal("#waitwait");
return true;
});
UpdateProfileSelection($('#profile_name li[value = ' +
window.PROFILE + ']'));
}
......
......@@ -106,6 +106,7 @@ function ($, sup, moment)
if (status == 'provisioned') {
$("#quickvm_progress_bar").width("66%");
status_html = "booted";
}
else if (status == 'ready') {
bgtype = "bg-success";
......
......@@ -23,6 +23,7 @@
#
$APTHOST = "$WWWHOST";
$APTBASE = "$TBBASE/apt";
$APTMAIL = $TBMAIL_OPS;
#
# Global flag to disable accounts. We do this on some pages which
......@@ -42,6 +43,7 @@ if ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.aptlab.net") {
$APTHOST = "www.aptlab.net";
$WWWHOST = "www.aptlab.net";
$APTBASE = "https://www.aptlab.net";
$APTMAIL = "APT Operations <testbed-ops@aptlab.net>";
}
#
......@@ -275,6 +277,7 @@ function SpitVerifyModal($id, $label)
</div>
<div class='form-group'>
<button class='btn btn-primary form-control'
id='verify_modal_submit'
type='submit' name='create'>
$label</button>
</div>
......
......@@ -506,7 +506,7 @@ if (!$this_user) {
"Here is your user verification code. Please copy and\n".
"paste this code into the box on the account page.\n\n".
"\t" . $_SESSION["verify_key"] . "\n",
"From: $TBMAIL_OPS");
"From: $APTMAIL");
#
# Respit complete form but show the verify email modal.
......
......@@ -202,6 +202,7 @@ $creator_uid = $creator->uid();
$creator_email = $creator->email();
$profile = Profile::Lookup($instance->profile_idx());
$profile_name = $profile->name();
$profile_idx = $profile->idx();
$color = "";
$bgtype = "bg-info";
$statustext = "Please wait while we get your experiment ready";
......@@ -224,6 +225,8 @@ elseif ($instance_status == "created") {
$spinwidth = "33";
}
elseif ($instance_status == "provisioned") {
# Rob prefers booted.
$instance_status = "booted";
$spinwidth = "66";
}
......@@ -277,6 +280,10 @@ echo "<td class='uk-width-4-5' $style>
echo "</tr>\n";
echo "</table>\n";
echo "<div class='pull-right'>\n";
echo " <a class='btn btn-xs btn-primary' $disabled
id='snapshot_button' type=button
href='manage_profile.php?action=snapshot&snapuuid=$uuid'>
Snapshot</a>\n";
echo " <button class='btn btn-xs btn-success' $disabled
id='extend_button' type=button
data-toggle='modal' data-target='#extend_modal'>
......
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