Commit a298d0b6 authored by Ivan Tyagov's avatar Ivan Tyagov

Allow user to select desired username / password.

parent e386fa1e
......@@ -27,6 +27,10 @@
First Name: <input name="your_first_name" id="first_name"/>
Last Name: <input name="your_last_name" id="last_name"/>
Email: <input name="your_email" id="email"/>
Username: <input name="your_reference" id="reference"/>
Password: <input name="your_password" id="password" type="password"/>
Confirmation Password: <input name="your_confirm_password" id="confirm_password" type="password"/>
<input data-theme="b" data-inline="true" type="submit" data-i18n="[value]Register" value="Register" data-icon="check" />
</form>
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.54150.62060.20974</string> </value>
<value> <string>977.10261.58373.1809</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1563275707.24</float>
<float>1563449676.86</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -28,15 +28,15 @@
var gadget = this,
first_name = document.getElementById("first_name").value,
last_name = document.getElementById("last_name").value,
email = document.getElementById("email").value;
email = document.getElementById("email").value,
reference = document.getElementById("reference").value,
password = document.getElementById("password").value,
confirm_password = document.getElementById("confirm_password").value;
function showMessage(msg) {
document.getElementById("status-message").innerHTML = msg;
}
if ((validateEmail(email)) && (first_name) && (last_name)) {
if ((validateEmail(email)) && (first_name) && (last_name) && (reference) && (password) && (confirm_password) && (password === confirm_password) ) {
/* send to server */
var url = "ERP5Site_newCredentialRequest?batch_mode=1&reference=" + email + "&default_email_text=" + email + "&first_name=" + first_name + "&last_name=" + last_name;
var url = "ERP5Site_newCredentialRequest?batch_mode=1&reference=" + reference + "&default_email_text=" + email + "&first_name=" + first_name + "&last_name=" + last_name + "&password=" + password;
return RSVP.Queue()
.push(function () {
......@@ -68,7 +68,7 @@
});
})*/;
} else {
return gadget.notifySubmitted({message: 'bad fields', status: 'error'});
return gadget.notifySubmitted({message: 'Misformatted email and / or passwords not matching. Please note that all fields are required!', status: 'error'});
}
});
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.8898.22031.4078</string> </value>
<value> <string>977.10272.46563.23142</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1563367884.02</float>
<float>1563450686.29</float>
<string>UTC</string>
</tuple>
</state>
......
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