Skip to content

Commit a8fd728

Browse files
committed
Fix error field highlighting, closes pterodactyl#90
1 parent c95a058 commit a8fd728

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

CHANGELOG.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
# Changelog
22
This file is a running track of new features and fixes to each version of the panel released starting with `v0.4.0`.
33

4-
## v0.4.0 (release scheduled ~ Mid September)
5-
Requires `Daemon@0.2.0`
4+
This project follows [Semantic Versioning](http://semver.org) guidelines.
65

7-
### New Features
6+
## v0.4.1
7+
8+
### Changed
9+
* Overallocate fields are now auto-filled with a value of `0`
10+
11+
### Fixed
12+
* Wrong error highlighting of overallocate fields on Node creation ([#90](https://github.com/Pterodactyl/Panel/issues/90), thanks [@schrej](https://github.com/schrej))
13+
14+
## v0.4.0
15+
16+
### Added
817
* Task scheduler supporting customized CRON syntax or dropdown selected options. (currently only support command and power options)
918
* Adds support for changing per-server database passwords from the panel.
1019
* Allows for use of IP rather than a FQDN if the node is not using SSL
@@ -15,10 +24,9 @@ Requires `Daemon@0.2.0`
1524
* Improved service management and setup on first install.
1625
* New terminal that supports ANSI color codes as well as cleaner output. You can also simply type `start` or `boot` to start your server rather than having to use the start button.
1726

18-
### Bug Fixes
27+
### Fixed
1928
* Fixes password auto-generation on 'Manage Server' page. ([#67](https://github.com/Pterodactyl/Panel/issues/67), thanks [@ET-Bent](https://github.com/ET-Bent))
2029
* Fixes some overly verbose user output when an error occurs
21-
* **[Security Patch]** Fixes listing of server variables for server. Previously a bug made it possible to view settings for all servers, even if the user didn't own that server. ([#69](https://github.com/Pterodactyl/Panel/issues/69))
2230
* Prevent calling daemon until database call has been confirmed when changing default connection.
2331
* Fixes a few display issues relating to subusers and database management.
2432
* Fixes the server name in the header not linking to the server correctly. ([#79](https://github.com/Pterodactyl/Panel/issues/79), thanks [@xX1bumblebee1Xx](https://github.com/xX1bumblebee1Xx))
@@ -27,5 +35,11 @@ Requires `Daemon@0.2.0`
2735
* Fixes a bug where new files could not be created through the panel for a server. ([#85](https://github.com/Pterodactyl/Panel/issues/85), thanks [@xX1bumblebee1Xx](https://github.com/xX1bumblebee1Xx))
2836
* Fixes the exception handler to properly display and log exceptions that might occur rather than leaving a vague error. ([#81](https://github.com/Pterodactyl/Panel/issues/83))
2937

30-
### General
38+
### Changed
3139
* Update Laravel to version `5.3` and update dependencies.
40+
41+
### Deprecated
42+
* Requires Pterodactyl Daemon `v0.2.*`
43+
44+
### Security
45+
* Fixes listing of server variables for server. Previously a bug made it possible to view settings for all servers, even if the user didn't own that server. ([#69](https://github.com/Pterodactyl/Panel/issues/69))

resources/views/admin/nodes/new.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<div class="form-group col-md-6 col-xs-6">
100100
<label for="memory_overallocate" class="control-label">Overallocate</label>
101101
<div class="input-group">
102-
<input type="text" name="memory_overallocate" class="form-control" value="{{ old('memory_overallocate') }}"/>
102+
<input type="text" name="memory_overallocate" class="form-control" value="{{ old('memory_overallocate', 0) }}"/>
103103
<span class="input-group-addon">%</span>
104104
</div>
105105
</div>
@@ -124,7 +124,7 @@
124124
<div class="form-group col-md-6 col-xs-6">
125125
<label for="disk_overallocate" class="control-label">Overallocate</label>
126126
<div class="input-group">
127-
<input type="text" name="disk_overallocate" class="form-control" value="{{ old('disk_overallocate') }}"/>
127+
<input type="text" name="disk_overallocate" class="form-control" value="{{ old('disk_overallocate', 0) }}"/>
128128
<span class="input-group-addon">%</span>
129129
</div>
130130
</div>

resources/views/layouts/admin.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@
200200
201201
@if (count($errors) > 0)
202202
@foreach ($errors->all() as $error)
203-
<?php preg_match('/^The\s(.*?)\s/', $error, $matches) ?>
203+
<?php preg_match('/^The\s(.*?)\sfield/', $error, $matches) ?>
204204
@if (isset($matches[1]))
205-
$('[name="{{ $matches[1] }}"]').parent().parent().addClass('has-error');
205+
$('[name="{{ str_replace(' ', '_', $matches[1]) }}"]').parent().parent().addClass('has-error');
206206
@endif
207207
@endforeach
208208
@endif

0 commit comments

Comments
 (0)