Add warning about http being needed in url

This commit is contained in:
KodeStar 2022-03-17 10:55:52 +00:00
parent e52bc9c6b2
commit 41c2983312
5 changed files with 41 additions and 3 deletions

12
public/css/app.css vendored
View file

@ -320,7 +320,7 @@ body {
opacity: 1;
width: auto;
height: auto;
overflow: auto;
overflow: visible;
}
.appoptions button.dark {
background: #1b1b1b;
@ -825,6 +825,16 @@ body {
margin: 0;
}
.input {
position: relative;
}
.input .help {
position: absolute;
bottom: -22px;
left: 10px;
color: #c00;
}
div.create {
padding: 30px 15px;
display: flex;

View file

@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=c5354f371a3887feab28",
"/css/app.css": "/css/app.css?id=bc18c3a0e8475fe00a5a",
"/js/app.js": "/js/app.js?id=c95edea425171c6ce8f6"
}

View file

@ -95,7 +95,7 @@ body {
opacity: 1;
width: auto;
height: auto;
overflow: auto;
overflow: visible;
}
}
button.dark {
@ -624,6 +624,15 @@ body {
}
}
}
.input {
position: relative;
.help {
position: absolute;
bottom: -22px;
left: 10px;
color: #c00;
}
}
div.create {
padding: 30px 15px;
display: flex;

View file

@ -38,6 +38,7 @@
<div class="optvalue">
<div class="input">
{!! Form::text('website', $item->url ?? null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!}
<small class="help">Don't forget http(s)://</small>
</div>
<div><button class="btn">Go</button></div>
</div>
@ -67,6 +68,7 @@
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
<small class="help">Don't forget http(s)://</small>
</div>
<div class="input">

View file

@ -57,6 +57,23 @@
$('.tags').select2();
if($('#appurl').val() !== '') {
if ($('#appurl').val().indexOf("://") !== -1) {
$('#appurl').parent().find('.help').hide()
}
}
if($('#website').val() !== '') {
if ($('#website').val().indexOf("://") !== -1) {
$('#website').parent().find('.help').hide()
}
}
$('#appurl, #website').on('input', function () {
if ($(this).val().indexOf("://") !== -1) {
$(this).parent().find('.help').hide()
}
})
$('#searchwebsite').on('click', 'button.btn', function (e) {
e.preventDefault()
let websiteurl = $('#searchwebsite input').val()