Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit a162fdd

Browse files
authored
Merge pull request #1837 from ameliagoodman/sslRadio
switched ssl button to radio
2 parents a0b2bd8 + 081e32d commit a162fdd

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

css/obBase.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6401,7 +6401,6 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
64016401
display: none; /* hide in production */
64026402
}
64036403

6404-
64056404
.peersList {
64066405
margin-top: 10px;
64076406
padding-right: 30px;
@@ -6419,3 +6418,12 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
64196418
.peersList>ul>li {
64206419
padding-bottom: 5px;
64216420
}
6421+
6422+
.sslSwitch-radio {
6423+
margin: auto;
6424+
padding: 15px;
6425+
}
6426+
6427+
.sslSwitch-radio>input[type="radio"].fieldItem + label {
6428+
padding: 0 0px 0 35px
6429+
}

js/templates/serverConfigForm.html

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<div class="flexCol-8 borderRight0 custCol-border <% ob.errors.name && print('invalid') %>">
2828
<input name="name" type="text" id="fld_name" class="fieldItem" value="<%= ob.name %>">
29-
</div>
29+
</div>
3030
</div>
3131

3232
<div class="flexRow">
@@ -46,21 +46,15 @@
4646
</div>
4747
</div>
4848

49-
<div class="flexCol-8 borderRight0 custCol-border <% ob.errors.server_ip && print('invalid') %>">
49+
<div class="flexCol-3 borderRight0 custCol-border <% ob.errors.server_ip && print('invalid') %>">
5050
<input name="server_ip" type="text" id="fld_server" placeholder="" class="fieldItem" required="" value="<%= ob.server_ip %>">
51-
<div class="btn btn-txt btn-corner btn-cornerTR custCol-secondary ion-locked
52-
positionAbsolute tooltip <% if(!ob.SSL){ %> hide <% } %> js-sslOn"
53-
data-tooltip="<%= polyglot.t('SSLIsOn') %>">
54-
<%= polyglot.t('SSLOn') %>
55-
</div>
56-
<div class="btn btn-txt btn-corner btn-cornerTR custCol-secondary ion-unlocked
57-
positionAbsolute tooltip <% if(ob.SSL){ %> hide <% } %> js-sslOff"
58-
data-tooltip="<%= polyglot.t('SSLIsOff') %>">
59-
<%= polyglot.t('SSLOff') %>
60-
</div>
6151
</div>
62-
</div>
52+
<div class="flexCol-5 sslSwitch-radio ustCol-border <% ob.errors.server_ip && print('invalid') %>">
53+
<input type="radio" class="fieldItem" id="js-sslOn" name="sslSwitch" value="true" <% if(ob.SSL) { print("checked") } %> /><label for="js-sslOn" class="radioLabel"><%= polyglot.t('SSLOn') %></label>
54+
<input type="radio" class="fieldItem" id="js-sslOff" name="sslSwitch" value="false" <% if(!ob.SSL) { print("checked") } %>/><label for="js-sslOff" class="radioLabel"><%= polyglot.t('SSLOff') %></label>
6355

56+
</div>
57+
</div>
6458
<div class="flexRow">
6559
<% if (ob.errors.username) { %>
6660
<div class="flexCol-12">
@@ -169,7 +163,7 @@
169163
<div class="flexCol-8 borderRight0 custCol-border <% ob.errors.heartbeat_socket_port && print('invalid') %>">
170164
<input name="heartbeat_socket_port" type="text" id="fld_heartbeat_socket_port" placeholder="" class="fieldItem" value="<%= ob.heartbeat_socket_port %>">
171165
</div>
172-
</div>
166+
</div>
173167

174168
</div>
175169
</form>

js/views/serverConfigFormVw.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ module.exports = BaseVw.extend({
1111
'click .js-save': 'saveForm',
1212
'keyup': 'processKey',
1313
'input input': 'inputEntered',
14-
'click .js-sslOn': 'sslOn',
15-
'click .js-sslOff': 'sslOff'
14+
'click #js-sslOn': 'sslOn',
15+
'click #js-sslOff': 'sslOff'
1616
},
1717

1818
initialize: function(options) {
@@ -25,10 +25,6 @@ module.exports = BaseVw.extend({
2525
this.listenTo(this.model, 'invalid sync', function() {
2626
this.render();
2727
});
28-
29-
this.listenTo(this.model, 'change:SSL', function() {
30-
this.render();
31-
});
3228
},
3329

3430
processKey: function(e) {
@@ -54,11 +50,11 @@ module.exports = BaseVw.extend({
5450
},
5551

5652
sslOn: function(){
57-
this.model.set('SSL', false);
53+
this.model.set('SSL', true);
5854
},
5955

6056
sslOff: function(){
61-
this.model.set('SSL', true);
57+
this.model.set('SSL', false);
6258
},
6359

6460
render: function() {

0 commit comments

Comments
 (0)