...
 
Commits (8)
......@@ -4,9 +4,10 @@ url: https://rocket.chat
permalink: /:year/:month/:day/:title/
paginate_path: /blog/page/:num/
paginate: 8
future: true
# bump if alterting styles
version: 115
version: 116
# read speed
wpm: 160
......
......@@ -157,14 +157,6 @@
photo: yes
country: Brazil
- name: Isabella Russell
role: Marketing Lead
department: Marketing
username: isabella.russell
github_username: isabellarussell
photo: yes
country: United Kingdom
- name: Pierre Lehnen
role: Software Engineer
github_username: Hudell
......
---
title: Rocket.Chat Apps Development
description: In this webinar, Douglas Gubert, Rocket.Chat Apps Advocate, will demonstrate how to leverage the Rocket.Chat Apps-Engine to extend Rocket.Chat's functionality without deep diving into the base code
webinarID: 008
webinarURL: INSERT_HERE
dateEvent: 2019-03-07 14:00:00
bgSize: cover
bgColor: 030c1a
hosts:
- Douglas Gubert
- Bruno Raymundo
language: USA
gmt: -3
cover: /images/webinars/apps-development.png
categories:
- Webinars
---
......@@ -18,6 +18,17 @@ theme: dark
<div class="space--4"></div>
<form class="form-validate" data-validate>
<fieldset>
<label class="label--small theme_type--grey" for="recipient">Department</label>
<div class="select select--theme-dark">
<select required name="recipient" id="recipient">
<option value="" selected disabled>Select the Department</option>
<option value="sales">Sales</option>
<option value="support">Support</option>
</select>
</div>
</fieldset>
<fieldset>
<label class="label--small theme_type--grey" for="firstName">First Name</label>
<input required minlength="3" maxlength="100" class="input input--dark input--icon-user" type="text" id="firstName" name="firstName" placeholder="Type your first name" />
......@@ -53,16 +64,6 @@ theme: dark
<textarea required rows="7" class="input input--dark" name="message" id="message" placeholder="Type your message"></textarea>
</fieldset>
<fieldset>
<label class="label--small theme_type--grey" for="recipient">Department</label>
<div class="select select--theme-dark">
<select name="recipient" id="recipient">
<option value="sales">Sales</option>
<option value="support">Support</option>
</select>
</div>
</fieldset>
<div class="space--2"></div>
<button type="submit" class="button">Send message</button>
<div class="space--4"></div>
......
......@@ -551,6 +551,10 @@ var formHelpers = {
jsonData[input.name] = input.value;
}
if (jsonData.recipient === 'support') {
finalEndpoint = this.url + '/support';
}
http.open('POST', finalEndpoint, true);
http.setRequestHeader('Content-type', 'application/json');
http.onload = function() {
......
......@@ -5,23 +5,18 @@ $(document).on('submit', '.featherlight .form-validate', function(event){
obj[item.name] = item.value;
return obj;
}, {});
data['solution'] = 'devops';
return submit(data);
});
submit = function(data) {
var http = new XMLHttpRequest();
var finalEndpoint = '//contactmailer.rocket.chat/solution';
var finalEndpoint = '//contactmailer.rocket.chat/solutions';
http.open('POST', finalEndpoint, true);
http.setRequestHeader('Content-type', 'application/json');
http.onload = function() {
var response = JSON.parse(this.response);
if (response.message === 'success') {
formHelpers.toggleModal();
} else {
console.error(response.message);
}
};
http.send(JSON.stringify(data));
......