- true]) ?>
\ No newline at end of file
+ true]) ?>
diff --git a/view/template/developer/quickstart.php b/view/template/developer/quickstart.php
index 48d6d030..5f1ace82 100644
--- a/view/template/developer/quickstart.php
+++ b/view/template/developer/quickstart.php
@@ -50,4 +50,4 @@
-
\ No newline at end of file
+
diff --git a/view/template/layout/basic.php b/view/template/layout/basic.php
index a993d1d3..c69f9b9c 100644
--- a/view/template/layout/basic.php
+++ b/view/template/layout/basic.php
@@ -13,7 +13,9 @@
-
+
+
+
diff --git a/view/template/page/400.php b/view/template/page/400.php
index 5d45d5a7..b952b4f2 100644
--- a/view/template/page/400.php
+++ b/view/template/page/400.php
@@ -5,4 +5,4 @@
-
\ No newline at end of file
+
diff --git a/view/template/page/405.php b/view/template/page/405.php
index d02260be..39fe34e6 100644
--- a/view/template/page/405.php
+++ b/view/template/page/405.php
@@ -5,4 +5,4 @@
{{page.badmethod_details}}
-
\ No newline at end of file
+
diff --git a/view/template/page/join-us.php b/view/template/page/join-us.php
index ccf39232..0def0d6e 100644
--- a/view/template/page/join-us.php
+++ b/view/template/page/join-us.php
@@ -176,7 +176,7 @@
Interested in contributing but not ready for commitment? We have a guide for contributors to help you find other ways to get
involved. If none of that suits your fancy, join our Discord chat and we'll help you find something you'll love.
Here is a sample key-value entry in the LBRY blockchain. Here, wonderfullife is the key, and the rest of the description is the value.
$lbrynet-cli resolve_name name=wonderfullife
-
+
wonderfullife : {
title: "It’s a Wonderful Life",
description: "An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.",
@@ -311,7 +311,7 @@
Content Distribution
Digital content distributors with server-client models are subject to the whims of internet service providers and hostile foreign governments. Traffic from the host servers can be throttled or halted altogether if the owners of cables and routers so choose. However, in case of the LBRY protocol content comes from anywhere and everywhere, and is therefore not so easily stifled.
-
Additionally, the market mechanisms of LBRY create a strong incentive for efficient distribution, which will save the costs of producers and ISPs alike. These properties, along with LBRY’s infringement
+
Additionally, the market mechanisms of LBRY create a strong incentive for efficient distribution, which will save the costs of producers and ISPs alike. These properties, along with LBRY’s infringement
disincentivizing properties, make LBRY an appealing technology for large existing data or content distributors.
Transaction Settlement
While payments can be issued directly on the LBRY blockchain, the LBRY protocol encourages a volume of transactions that will not scale without usage of off-chain settlement.
diff --git a/view/template/report/dmca.php b/view/template/report/dmca.php
index 6011fc01..a90bea20 100644
--- a/view/template/report/dmca.php
+++ b/view/template/report/dmca.php
@@ -56,4 +56,4 @@
- $learnFooter ?? false]) ?>
\ No newline at end of file
+ $learnFooter ?? false]) ?>
diff --git a/web/css/yt2.css b/web/css/yt2.css
index 054e78df..14567c87 100644
--- a/web/css/yt2.css
+++ b/web/css/yt2.css
@@ -315,6 +315,8 @@ header .right a.github {
.claim .block {
position: relative;
float: left;
+ margin-top: 10px;
+
}
.claim input {
float: left;
@@ -344,6 +346,11 @@ header .right a.github {
-moz-box-shadow: 0 0 10px 0 rgba(0,0,0,0.15);
box-shadow: 0 0 10px 0 rgba(0,0,0,0.15);
}
+.error_form{
+ -webkit-box-shadow:inset 0px 0px 0px 2px red;
+ -moz-box-shadow:inset 0px 0px 0px 2px red;
+ box-shadow:inset 0px 0px 0px 2px red;
+}
.claim label {
position: absolute;
top: 0;
@@ -1116,4 +1123,4 @@ header .right a.github {
.how .step.three .text {
width: 90%;
}
-}
\ No newline at end of file
+}
diff --git a/web/js/yt2/FormValidation.js b/web/js/yt2/FormValidation.js
new file mode 100644
index 00000000..0ab700d9
--- /dev/null
+++ b/web/js/yt2/FormValidation.js
@@ -0,0 +1,62 @@
+function submitDetailsForm() {
+ $("#youtube_claim").submit(function (event) {
+
+ // get value from id
+ var lbry_channel_name = $.trim($('#lbry_channel_name').val());
+ var email = $.trim($('#email').val());
+ var youtube_url = $.trim($('#youtube_url').val());
+
+ // Make sure that the error message are hidden before trying to validate value
+ $('#lbry_error').hide();
+ $('#email_error').hide();
+ $('#youtube_url_error').hide();
+
+ // If the lbry name is invalid or blank stop the post request
+ if(!validateLBRYName(lbry_channel_name) || lbry_channel_name === '') {
+ $('#lbry_channel_name').addClass('error_form');
+ $('#lbry_error').show();
+ event.preventDefault();
+ }
+ // Show the other field if the LBRY channel name field is validated once
+ else{
+ // Check only if the two fields
+ if ($('#email').is(":visible") && $('#youtube_url').is(":visible")) {
+ // If the email is invalid or blank stop the post request
+ if (!validateEmail(email) || email === '') {
+ $('#email').addClass('error_form');
+ $('#email_error').show();
+ event.preventDefault();
+ }
+
+ // If the youtube url is invalid or blank stop the post request
+ if (!validateYoutubeChannelUrl(youtube_url) || youtube_url === '') {
+ $('#youtube_url').addClass('error_form');
+ $('#youtube_url_error').show();
+ event.preventDefault();
+ }
+ }
+ else{
+ event.preventDefault();
+ }
+ $('#youtube_url').show();
+ $('#email').show();
+ }
+
+
+ });
+}
+
+function validateEmail(email) {
+ var re = /\S+@\S+\.\S+/;
+ return re.test(email);
+}
+
+function validateLBRYName(lbry_channel_name){
+ var re = /[1-z]+/;
+ return re.test(lbry_channel_name);
+}
+
+function validateYoutubeChannelUrl(youtube_channel_url){
+ var re = /^UC[A-Za-z0-9_-]{22}$/;
+ return re.test(youtube_channel_url)
+}
\ No newline at end of file