Skip to content

Commit 1fd2756

Browse files
committed
Fix UI bugs with operator role
1 parent df45d96 commit 1fd2756

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/main/resources/www/js/views/admin/AddUserDialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ define([
5959
});
6060
this.$('input[type="password"]').on("keyup", function() {
6161
if (that.$('#password1').val() == that.$('#password2').val()) {
62-
that.dialogButtons().eq(0).button('enable');
62+
that.dialogButtons().eq(1).button('enable');
6363
}
6464
else {
65-
that.dialogButtons().eq(0).button('disable');
65+
that.dialogButtons().eq(1).button('disable');
6666
}
6767
});
6868
this.$("#username").select();

src/main/resources/www/js/views/admin/EditUserDialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ define([
5656
});
5757
this.$('input[type="password"]').on("keyup", function() {
5858
if (that.$('#password1').val() == that.$('#password2').val()) {
59-
that.dialogButtons().eq(0).button('enable');
59+
that.dialogButtons().eq(1).button('enable');
6060
}
6161
else {
62-
that.dialogButtons().eq(0).button('disable');
62+
that.dialogButtons().eq(1).button('disable');
6363
}
6464
});
6565
this.$("#username").select();

src/main/resources/www/js/views/devices/DeviceComplianceView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ define([
3939
this.$el.html(this.template(this.device.toJSON()));
4040
new TableSort(this.$("#rules").get(0));
4141

42-
if (!user.isReadWrite()) {
42+
if (!user.isOperator()) {
4343
this.$("#checkcompliance").remove();
4444
}
4545

src/main/resources/www/templates/admin/addUser.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<label for="roleuser">Visitor</label>
2727
</div>
2828
<div>
29-
<input type="radio" id="roleuser" name="role" value="user" <% if (level >= 100 && level < 100) { %>checked="checked"<% } %> data-level="50" />
30-
<label for="roleuser">Operator</label>
29+
<input type="radio" id="roleoperator" name="role" value="operator" <% if (level >= 50 && level < 100) { %>checked="checked"<% } %> data-level="50" />
30+
<label for="roleoperator">Operator</label>
3131
</div>
3232
<div>
3333
<input type="radio" id="rolereadwrite" name="role" value="readwrite" <% if (level >= 100 && level < 500) { %>checked="checked"<% } %> data-level="100" />

0 commit comments

Comments
 (0)