Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (39)
Showing
with 191 additions and 0 deletions
File added
File added
This source diff could not be displayed because it is too large. You can view the blob instead.
File added
File added
File added
public/assets/image/1.jpg

12.1 KiB

public/assets/image/2.jpg

12.1 KiB

public/assets/image/3.jpg

12.1 KiB

public/assets/image/cancel.png

2.48 KiB

public/assets/image/checked.png

505 B

public/assets/image/ngojek.png

59.8 KiB

public/assets/image/pp.jpg

25.5 KiB

public/assets/image/user.png

4.49 KiB

public/assets/image/yesbos.png

6.27 KiB

function deleteLocation(str) {
document.getElementById('modalMessage').style.display = "block";
document.getElementById('nameLocation').innerHTML = str;
document.getElementById('location').value = str;
}
function closeModal() {
document.getElementById('modalMessage').style.display = "none";
}
function editLocation(str) {
id_column = str;
id_column += "s";
input_column = document.getElementById(str);
text_column = document.getElementById(id_column);
pencil_icon = document.getElementById(str + "pencil");
save_icon = document.getElementById(str + "save");
pencil_icon.style.display = "none";
save_icon.style.display = "inline-block";
text_column.style.display = "none";
input_column.type = "text";
}
window.onclick = function(event) {
var modal = document.getElementById('modalMessage');
if (event.target == modal) {
modal.style.display = "none";
}
}
\ No newline at end of file
function validateForm() {
var name = document.forms["form-edit-profile"]["name"];
var phone = document.forms["form-edit-profile"]["phone"];
console.log('KWKW');
if (name.value == "" && phone.value != "") {
alert("Please fill in the red columns!");
name.style.borderBottom = "1.5px solid red";
name.placeholder = " Required";
phone.style.borderBottom = "1px solid black";
return false;
}
else if (name.value != "" && phone.value == "" ) {
alert("Please fill in the red columns!");
name.style.borderBottom = "1px solid black";
phone.placeholder = " Required";
phone.style.borderBottom = "1.5px solid red";
return false;
}
else if (name.value == "" && phone.value == "") {
alert("Please fill in the red columns!");
name.style.borderBottom = "1.5px solid red";
phone.style.borderBottom = "1.5px solid red";
name.placeholder = " Required";
phone.placeholder = " Required";
return false;
}
if(phone.value.length < 9 || phone.value.length > 12) {
alert("Please fill in the red columns!");
phone.placeholder = "Input only up to 9-12 digits";
phone.style.borderBottom = "1.5px groove red";
phone.value = "";
return false;
}
}
function onlyNumber(event) {
return event.charCode >= 48 && event.charCode <= 57;
}
\ No newline at end of file
function hideContent(id) {
var content = document.getElementById(id);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
if(this.responseText == 1) {
alert("Successfully hidden!");
content.style.display = "none";
location.reload();
}
else {
alert("Oops, something went wrong!");
location.reload();
}
}
};
xmlhttp.open("POST", "../src/hide-history-user.php", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("order=" + id);
}
function hideContentDriver(id) {
var content = document.getElementById(id);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
if(this.responseText == 1) {
alert("Successfully hidden!");
content.style.display = "none";
location.reload();
}
else {
alert("Oops, something went wrong!");
location.reload();
}
}
};
xmlhttp.open("POST", "../src/hide-history-driver.php", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("order=" + id);
}
\ No newline at end of file
function validateForm() {
var username = document.forms["form-login"]["username"].value;
var password = document.forms["form-login"]["password"].value;
var username_field = document.getElementById('username-field');
var password_field = document.getElementById('password-field');
if (username == "" && password != "") {
alert("Please fill in the red columns!");
username_field.style.borderBottom = "1.5px solid red";
password_field.style.borderBottom = "1px solid black";
return false;
}
else if (username != "" && password == "" ) {
alert("Please fill in the red columns!");
username_field.style.borderBottom = "1px solid black";
password_field.style.borderBottom = "1.5px solid red";
return false;
}
else if (username == "" && password == "") {
alert("Please fill in the red columns!");
username_field.style.borderBottom = "1.5px solid red";
password_field.style.borderBottom = "1.5px solid red";
return false;
}
}
\ No newline at end of file
function validateForm() {
var elements = document.getElementById("register-form").elements;
empty = false;
for (var i = 0, element; element = elements[i++];) {
if (element.value === "") {
element.style.borderBottom = "1.5px solid red";
empty = true;
}
else if (element.name === "username") {
if(element.value.length > 20) {
empty = true;
element.placeholder = "Maximal 20 characters";
element.style.borderBottom = "1.5px groove red";
element.value = "";
}
}
else if (element.name === "phone") {
if(element.value.length < 9 || element.value.length > 12) {
empty = true;
element.placeholder = "Input only up to 9-12 digits";
element.style.borderBottom = "1.5px groove red";
element.value = "";
}
}
else if (element.name === "email") {
var re = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()\.,;\s@\"]+\.{0,1})+[^<>()\.,;:\s@\"]{2,})$/;
if (!re.test(element.value)) {
empty = true;
element.placeholder = "Email not valid";
element.style.borderBottom = "1.5px groove red";
element.value = "";
}
}
else {
element.style.borderBottom = "1px solid black";
}
}
if(empty) {
alert("Please fill in the red columns!");
return false;
}
}
function onlyNumber(event) {
return event.charCode >= 48 && event.charCode <= 57;
}
\ No newline at end of file