Skip to content

Commit

Permalink
Configure hub form
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena committed Jun 27, 2020
1 parent ece23a9 commit ec466a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docs/_static/link_gen/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,28 @@ var apps = {

function changeTab(div) {
var hub = document.getElementById("hub");
var hub_help_text = document.getElementById("hub-help-text");
var env_repo = document.getElementById("repo");
var env_repo_help_text = document.getElementById("env-repo-help-text");
var content_repo = document.getElementById("content-repo-group");
var content_branch = document.getElementById("content-branch-group");
var id = div.id;

if (id.includes("mybinder")) {
hub.placeholder = "https://mybinder.org";
hub.value = "https://mybinder.org";
hub_help_text.hidden = true;
hub.labels[0].innerHTML = "BinderHub URL";
env_repo.labels[0].innerHTML = "Git Environment Repository URL";
env_repo_help_text.hidden = false;
content_repo.hidden = false;
content_branch.hidden = false;
} else {
hub.placeholder = "https://hub.example.com";
hub.disabled = false;
hub_help_text.hidden = false;
hub.labels[0].innerHTML = "JupyterHub URL";
env_repo.labels[0].innerHTML = "Git Repository URL";
env_repo_help_text.hidden = true;
content_repo.hidden = true;
content_branch.hidden = true;
}
Expand Down
6 changes: 5 additions & 1 deletion docs/link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Use the following form to create your own ``nbgitpuller`` links.
<div class="invalid-feedback">
Must be a valid web URL
</div>
<small class="form-text text-muted">
<small class="form-text text-muted" id="hub-help-text">
The JupyterHub to send users to.
<a href="https://github.com/jupyterhub/nbgitpuller">nbgitpuller</a> must be installed in this hub.
</small>
Expand All @@ -65,6 +65,10 @@ Use the following form to create your own ``nbgitpuller`` links.
<div class="invalid-feedback">
Must be a valid git URL
</div>
<small class="form-text text-muted" id="env-repo-help-text" hidden="true">
The environment repository must have
<a href="https://github.com/jupyterhub/nbgitpuller">nbgitpuller</a> installed.
</small>
</div>
<div class="col-sm-4">
<div class="input-group">
Expand Down

0 comments on commit ec466a5

Please sign in to comment.