-
Notifications
You must be signed in to change notification settings - Fork 178
Conversation
@ameliagoodman can you fix the merge conflicts and update this PR? |
b2b5c29
to
713b387
Compare
@jjeffryes oops. finished that now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bug in the render, can you update it?
</div> | ||
<div class="flexCol-5 sslSwitch-radio ustCol-border <% ob.errors.server_ip && print('invalid') %>"> | ||
<input type="radio" class="fieldItem" id="js-sslOn" name="sslSwitch" value="true" checked /><label for="js-sslOn" class="radioLabel"><%= polyglot.t('SSLOn') %></label> | ||
<input type="radio" class="fieldItem" id="js-sslOff" name="sslSwitch" value="false" /><label for="js-sslOff" class="radioLabel"><%= polyglot.t('SSLOff') %></label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state of the radio button isn't being set to match what's in the model on render (that's what <% if(!ob.SSL){ %> hide <% } %>
did in the existing code).
You need to add some code around the checked attribute so the input that matches the value in the model is checked, something like:
<% if(ob.SSL) { %>checked<% } %> />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small change I noticed.
</div> | ||
<div class="flexCol-5 sslSwitch-radio ustCol-border <% ob.errors.server_ip && print('invalid') %>"> | ||
<% if(ob.SSL) { %> | ||
<input type="radio" class="fieldItem" id="js-sslOn" name="sslSwitch" value="true" checked /><label for="js-sslOn" class="radioLabel"><%= polyglot.t('SSLOn') %></label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to have one set of radio buttons, and then inside each one, do
` <% if(ob.SSL) { print(checked) } %>
For the true one, and !ob.SSL for the false one.
#1817