Only enable "Keep Enabled" button if data entered into form is valid. Also changed the wording a bit here and there.
parent
4cf041aaad
commit
b168ef7e74
|
@ -1970,6 +1970,8 @@ function FirstRunViewModel() {
|
||||||
});
|
});
|
||||||
|
|
||||||
self.keepAccessControl = function() {
|
self.keepAccessControl = function() {
|
||||||
|
if (!self.validData()) return;
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
"ac": true,
|
"ac": true,
|
||||||
"user": self.username(),
|
"user": self.username(),
|
||||||
|
|
|
@ -53,15 +53,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>
|
<p>
|
||||||
OctoPrint by default now ships with Access Control enabled, meaning you won't be able to do anything with the
|
<strong>Please read the following, it is very important for your printer's health!</strong>
|
||||||
printer unless you login first as a configured user. This is to prevent strangers (possibly with
|
|
||||||
malicious intent) to gain access to printer for using it in such a way that it may be damaged or worse, in case
|
|
||||||
you make your OctoPrint installation accessible to the internet or other untrustworthy computer networks.
|
|
||||||
</p>
|
</p>
|
||||||
<div>
|
|
||||||
<p>
|
<p>
|
||||||
It looks like you haven't configured access control yet. Please set up the username and password for the
|
OctoPrint by default now ships with Access Control enabled, meaning you won't be able to do anything with the
|
||||||
initial administrator account who will have full access to both the printer and OctoPrint's settings:
|
printer unless you login first as a configured user. This is to <strong>prevent strangers - possibly with
|
||||||
|
malicious intent - to gain access to your printer</strong> via the internet or another untrustworthy network
|
||||||
|
and using it in such a way that it is damaged or worse (i.e. causes a fire).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
It looks like you haven't configured access control yet. Please <strong>set up an username and password</strong> for the
|
||||||
|
initial administrator account who will have full access to both the printer and OctoPrint's settings, then click
|
||||||
|
on "Keep Access Control Enabled":
|
||||||
</p>
|
</p>
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<div class="control-group" data-bind="css: {success: validUsername()}">
|
<div class="control-group" data-bind="css: {success: validUsername()}">
|
||||||
|
@ -84,17 +87,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
<p>
|
<p>
|
||||||
In case that your OctoPrint installation is only accessible from within a network only trustworthy people have
|
<strong>Note:</strong> In case that your OctoPrint installation is only accessible from within a trustworthy network and you don't
|
||||||
access to and you don't need Access Control for other reasons, you may alternatively disable Access Control
|
need Access Control for other reasons, you may alternatively disable Access Control. You should only
|
||||||
all together. You should really only do this if you are absolutely sure that only people you know and trust
|
do this if you are absolutely certain that only people you know and trust will be able to connect to it.
|
||||||
will be able to connect to it. To reiterate, do <strong>NOT</strong> underestimate the risk of an unsecured
|
</p>
|
||||||
access to your printer!
|
<p>
|
||||||
|
<strong>Do NOT underestimate the risk of an unsecured access from the internet to your printer!</strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a href="#" class="btn btn-danger" data-bind="click: disableAccessControl">Disable Access Control</a>
|
<a href="#" class="btn btn-danger" data-bind="click: disableAccessControl">Disable Access Control</a>
|
||||||
<a href="#" class="btn btn-primary" data-bind="click: keepAccessControl, enable: validData()">Keep Access Control Enabled</a>
|
<a href="#" class="btn btn-primary" data-bind="click: keepAccessControl, enable: validData(), css: {disabled: !validData()}">Keep Access Control Enabled</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue