Skip to content

Commit 41c2983

Browse files
committed
Add warning about http being needed in url
1 parent e52bc9c commit 41c2983

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

public/css/app.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ body {
320320
opacity: 1;
321321
width: auto;
322322
height: auto;
323-
overflow: auto;
323+
overflow: visible;
324324
}
325325
.appoptions button.dark {
326326
background: #1b1b1b;
@@ -825,6 +825,16 @@ body {
825825
margin: 0;
826826
}
827827

828+
.input {
829+
position: relative;
830+
}
831+
.input .help {
832+
position: absolute;
833+
bottom: -22px;
834+
left: 10px;
835+
color: #c00;
836+
}
837+
828838
div.create {
829839
padding: 30px 15px;
830840
display: flex;

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/assets/sass/_app.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ body {
9595
opacity: 1;
9696
width: auto;
9797
height: auto;
98-
overflow: auto;
98+
overflow: visible;
9999
}
100100
}
101101
button.dark {
@@ -624,6 +624,15 @@ body {
624624
}
625625
}
626626
}
627+
.input {
628+
position: relative;
629+
.help {
630+
position: absolute;
631+
bottom: -22px;
632+
left: 10px;
633+
color: #c00;
634+
}
635+
}
627636
div.create {
628637
padding: 30px 15px;
629638
display: flex;

resources/views/items/form.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<div class="optvalue">
3939
<div class="input">
4040
{!! Form::text('website', $item->url ?? null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!}
41+
<small class="help">Don't forget http(s)://</small>
4142
</div>
4243
<div><button class="btn">Go</button></div>
4344
</div>
@@ -67,6 +68,7 @@
6768
<div class="input">
6869
<label>{{ strtoupper(__('app.url')) }}</label>
6970
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
71+
<small class="help">Don't forget http(s)://</small>
7072
</div>
7173

7274
<div class="input">

resources/views/items/scripts.blade.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,23 @@
5757
5858
$('.tags').select2();
5959
60+
if($('#appurl').val() !== '') {
61+
if ($('#appurl').val().indexOf("://") !== -1) {
62+
$('#appurl').parent().find('.help').hide()
63+
}
64+
}
65+
if($('#website').val() !== '') {
66+
if ($('#website').val().indexOf("://") !== -1) {
67+
$('#website').parent().find('.help').hide()
68+
}
69+
}
70+
$('#appurl, #website').on('input', function () {
71+
if ($(this).val().indexOf("://") !== -1) {
72+
$(this).parent().find('.help').hide()
73+
}
74+
})
75+
76+
6077
$('#searchwebsite').on('click', 'button.btn', function (e) {
6178
e.preventDefault()
6279
let websiteurl = $('#searchwebsite input').val()

0 commit comments

Comments
 (0)