mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
Apply suggestions from code review
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
parent
2546639171
commit
5725a32200
2 changed files with 6 additions and 5 deletions
|
@ -501,7 +501,8 @@ function prepareAccessTokenPrompt(callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDomainIDPrompt(callback) {
|
function createDomainIDPrompt(callback) {
|
||||||
swal({
|
swal(
|
||||||
|
{
|
||||||
title: 'Finish Registering Domain',
|
title: 'Finish Registering Domain',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
text: 'Enter a label for this machine.</br></br>This will help you identify which domain ID belongs to which machine.</br></br>This is a required step for registration.</br></br>',
|
text: 'Enter a label for this machine.</br></br>This will help you identify which domain ID belongs to which machine.</br></br>This is a required step for registration.</br></br>',
|
||||||
|
@ -509,14 +510,14 @@ function createDomainIDPrompt(callback) {
|
||||||
confirmButtonText: "Create",
|
confirmButtonText: "Create",
|
||||||
closeOnConfirm: false,
|
closeOnConfirm: false,
|
||||||
html: true
|
html: true
|
||||||
}, function(inputValue){
|
}, function(inputValue) {
|
||||||
if (inputValue === false) {
|
if (inputValue === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputValue === "") {
|
if (inputValue === "") {
|
||||||
swal.showInputError("Please enter a valid label for your machine.")
|
swal.showInputError("Please enter a valid label for your machine.");
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
|
|
@ -179,7 +179,7 @@ function promptToCreateDomainID() {
|
||||||
"label": label
|
"label": label
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post("/api/domains", domainJSON, function(data){
|
$.post("/api/domains", domainJSON, function(data) {
|
||||||
// we successfully created a domain ID, set it on that field
|
// we successfully created a domain ID, set it on that field
|
||||||
var domainID = data.domain.domainId;
|
var domainID = data.domain.domainId;
|
||||||
console.log("Setting domain ID to ", data, domainID);
|
console.log("Setting domain ID to ", data, domainID);
|
||||||
|
|
Loading…
Reference in a new issue