Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions proxy_backends/client/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import { Proxies } from '/proxies/collection';
// NPM import
import 'urijs';

Template.proxyBackend.onRendered(() => {
// Make Disable API Key field easier to use
// Fixes browser rendering issue
$("[name='apiUmbrella.settings.disable_api_key']").bootstrapSwitch();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that simple check / uncheck works much better here. bootstrapSwitch may work as a single element, but not as a part of a form.

Copy link
Copy Markdown
Contributor Author

@brylie brylie Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkbox is not working, for some reason, in Firefox 50.

The Bootstrap Switch allows the form to submit, and gives explicit text to let the user know about the field state:

screenshot from 2016-09-29 12-52-44

screenshot from 2016-09-29 12-53-39

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also refine the display of Bootstrap Switch as an enhancement.

Copy link
Copy Markdown
Contributor Author

@brylie brylie Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the button smaller.
screenshot from 2016-09-29 13-01-18
screenshot from 2016-09-29 13-01-29

Copy link
Copy Markdown
Contributor Author

@brylie brylie Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We disagree as to whether the button 'works' in the form, both literally and aesthetically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good.

});

Template.proxyBackend.helpers({
apiHost () {
// Get one proxy from the Proxies collection
Expand Down