Commit 86ab83d0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

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