Skip to content

Commit 54704ee

Browse files
authored
Complete <select> migration (hestiacp#2919)
* Add initial .form-control styles, apply to "Hostname" text input * Refactor Setup Webapp form to use new form controls * Apply new selects to Add/Edit Package forms * Apply new selects to Add/Edit Mail forms * Apply new selects to Add/Edit DNS forms * Fix checkboxes <label> on Setup Webapp form * Apply new selects to Add/Edit DNS Record forms * Apply new selects to Add/Edit Firewall Rule forms * Apply new selects to Add Firewall IP List form * Apply new selects to Add/Edit IP forms * Apply new select to Add IP form (missing from previous commit) * Apply new select to Ban IP Address form * Apply new select to Add Database form * Remove old .vst-list CSS * Replace last reference to .vst-list in JS
1 parent 96534ce commit 54704ee

26 files changed

+319
-483
lines changed

web/css/src/themes/dark.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -657,27 +657,30 @@ label:hover {
657657

658658
}
659659

660-
.vst-input {
660+
.vst-input,
661+
.form-control {
661662
background-color: #454545;
662663
border: 1px solid #606060;
663664
color: #d4d4d4;
664665
box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
665666
}
666667

667-
.vst-input:hover {
668+
.vst-input:hover,
669+
.form-control:hover {
668670
border-color: #0090ff;
669671
background-color: #494949;
670672
}
671673

672-
.vst-input:focus {
674+
.vst-input:focus,
675+
.form-control:focus {
673676
background-color: #222;
674677
border-color: #0080df;
675678
color: #fff;
676679
box-shadow: 0 1px 6px rgb(0 52 91 / 75%);
677680
}
678681

679682
.vst-input:disabled,
680-
.vst-list:disabled,
683+
.form-control:disabled,
681684
.form-select:disabled,
682685
.vst-textinput:disabled {
683686
background-color: #303030;
@@ -690,7 +693,7 @@ label:hover {
690693
}
691694

692695
.vst-input:disabled:hover,
693-
.vst-list:disabled:hover,
696+
.form-control:disabled:hover,
694697
.form-select:disabled:hover,
695698
.vst-textinput:disabled:hover {
696699
border-color: #606060 !important;
@@ -713,7 +716,6 @@ label:hover {
713716
box-shadow: none !important;
714717
}
715718

716-
.vst-list,
717719
.form-select {
718720
background-color: #454545;
719721
border: 1px solid #606060;
@@ -738,13 +740,11 @@ textarea:focus::placeholder {
738740
color: #909090 !important;
739741
}
740742

741-
.vst-list:hover,
742743
.form-select:hover {
743744
border-color: #0090ff;
744745
background-color: #494949;
745746
}
746747

747-
.vst-list:focus,
748748
.form-select:focus {
749749
background-color: #222;
750750
border-color: #0080df;

web/css/src/themes/default.css

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ form#vstobjects .alert {
625625

626626
.app-form label {
627627
font-size: 0.85rem;
628-
padding-bottom: 3px;
629628
font-weight: 600;
630629
cursor: default;
631630
}
@@ -2295,6 +2294,21 @@ label:hover {
22952294
color: #333;
22962295
}
22972296

2297+
.form-control {
2298+
background-color: #fff;
2299+
border: 1px solid #cfcfcf;
2300+
display: block;
2301+
width: 100%;
2302+
padding: 8px 3px 8px 14px;
2303+
font-size: 0.8rem;
2304+
font-weight: normal;
2305+
color: #4e4e4e;
2306+
border-radius: 4px;
2307+
line-height: 1.5;
2308+
appearance: none;
2309+
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
2310+
}
2311+
22982312
.vst-input {
22992313
background-color: #fff;
23002314
border: 1px solid #cfcfcf;
@@ -2310,18 +2324,20 @@ label:hover {
23102324
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
23112325
}
23122326

2313-
.vst-input:hover {
2327+
.vst-input:hover,
2328+
.form-control:hover {
23142329
border: 1px solid #94c8f0;
23152330
}
23162331

2317-
.vst-input:focus {
2332+
.vst-input:focus,
2333+
.form-control:focus {
23182334
border: 1px solid #008fee;
23192335
background-color: #d7f9ff;
23202336
color: #333;
23212337
}
23222338

23232339
.vst-input:disabled,
2324-
.vst-list:disabled,
2340+
.form-control:disabled,
23252341
.form-select:disabled,
23262342
.vst-textinput:disabled {
23272343
background-color: #e7e7e7;
@@ -2330,13 +2346,14 @@ label:hover {
23302346
}
23312347

23322348
.vst-input:focus:disabled,
2349+
.form-control:focus:disabled,
23332350
.vst-textinput:disabled {
23342351
border-color: #dedede;
23352352
background-color: #f1f1f1;
23362353
}
23372354

23382355
.vst-input:disabled:hover,
2339-
.vst-list:disabled:hover,
2356+
.form-control:disabled:hover,
23402357
.form-select:disabled:hover,
23412358
.vst-textinput:disabled:hover {
23422359
border-color: #cfcfcf;
@@ -2365,37 +2382,6 @@ label:hover {
23652382
background-color: #fff;
23662383
}
23672384

2368-
.vst-list {
2369-
background-color: #fff;
2370-
border: 1px solid #ccc;
2371-
border-radius: 4px;
2372-
color: #4e4e4e;
2373-
font-family: Exo, Arial, Helvetica, sans-serif;
2374-
font-size: 0.8rem;
2375-
font-weight: normal;
2376-
height: 36px;
2377-
cursor: pointer;
2378-
margin: 2px 6px 0 0;
2379-
min-width: 380px;
2380-
padding: 4px 1px 4px 10px;
2381-
background-image: url("/images/arrow.png");
2382-
background-position: 360px;
2383-
background-repeat: no-repeat;
2384-
width: 380px;
2385-
appearance: none;
2386-
text-shadow: 0 0 0 #4b4b4b;
2387-
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
2388-
}
2389-
2390-
.vst-list:hover {
2391-
border: 1px solid #94c8f0;
2392-
}
2393-
2394-
.vst-list:focus {
2395-
border: 1px solid #008fee;
2396-
color: #333;
2397-
}
2398-
23992385
.vst-text {
24002386
cursor: default;
24012387
}

web/css/src/themes/flat.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ strong {
8989
box-shadow: none;
9090
}
9191

92-
.vst-input {
92+
.vst-input,
93+
.form-control {
9394
box-shadow: none;
9495
}
9596

96-
.vst-list,
9797
.form-select {
9898
box-shadow: none;
9999
}

web/css/src/themes/vestia.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ strong {
278278
inset 0 0 2px rgb(255 255 255 / 100%) !important;
279279
}
280280

281-
.vst-input {
281+
.vst-input,
282+
.form-control {
282283
box-shadow: none;
283284
border-radius: 0 !important;
284285
}
285286

286-
.vst-list,
287287
.form-select {
288288
box-shadow: none;
289289
border-radius: 0 !important;
@@ -356,6 +356,7 @@ a.vst-text:hover b,
356356
}
357357

358358
.vst-input:focus,
359+
.form-control:focus,
359360
.vst-textinput:focus,
360361
.login .vst-input:focus,
361362
.login .vst-textinput:focus {
@@ -364,14 +365,13 @@ a.vst-text:hover b,
364365
color: #333;
365366
}
366367

367-
.vst-list:focus,
368368
.form-select:focus {
369369
border: 1px solid #ff6701;
370370
color: #333;
371371
}
372372

373373
.vst-input:hover,
374-
.vst-list:hover,
374+
.form-control:hover,
375375
.form-select:hover,
376376
.vst-textinput:hover {
377377
border: 1px solid #e95e00;
@@ -514,7 +514,7 @@ meter {
514514
}
515515

516516
.vst-input,
517-
.vst-list,
517+
.form-control,
518518
.form-select,
519519
.vst-textinput {
520520
font-family: Arial, Helvetica, sans-serif !important;

web/css/themes/dark.min.css

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

web/css/themes/default.min.css

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

web/css/themes/flat.min.css

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

0 commit comments

Comments
 (0)