about summary refs log tree commit diff
path: root/gn2/wqflask/templates/oauth2/create-resource.html
diff options
context:
space:
mode:
authorArun Isaac2023-12-29 18:55:37 +0000
committerArun Isaac2023-12-29 19:01:46 +0000
commit204a308be0f741726b9a620d88fbc22b22124c81 (patch)
treeb3cf66906674020b530c844c2bb4982c8a0e2d39 /gn2/wqflask/templates/oauth2/create-resource.html
parent83062c75442160427b50420161bfcae2c5c34c84 (diff)
downloadgenenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for
"correct" packaging and deployment as a Guix service.
Diffstat (limited to 'gn2/wqflask/templates/oauth2/create-resource.html')
-rw-r--r--gn2/wqflask/templates/oauth2/create-resource.html89
1 files changed, 89 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/oauth2/create-resource.html b/gn2/wqflask/templates/oauth2/create-resource.html
new file mode 100644
index 00000000..479f4152
--- /dev/null
+++ b/gn2/wqflask/templates/oauth2/create-resource.html
@@ -0,0 +1,89 @@
+{%extends "base.html"%}
+{%from "oauth2/profile_nav.html" import profile_nav%}
+
+{%block title%}Create Resource{%endblock%}
+{%block css%}
+<link rel="stylesheet" type="text/css" href="/static/new/css/mytooltip.css" />
+{%endblock%}
+
+{%block content%}
+<div class="container" style="min-width: 1250px;">
+  {{profile_nav("resources", user_privileges)}}
+
+  {{flash_me()}}
+
+  <div class="container-fluid">
+    <div class="row">
+      {%if resource_category_error%}
+      <p>
+	<span class="glyphicon glyphicon-exclamation-sign text-danger"></span>
+	&nbsp;
+	<span class="text-danger">{{resource_category_error.error}}</span>:
+	{{resource_category_error.error_message}}
+      </p>
+      {%else%}
+      <form method="POST"
+	    action="{{url_for('oauth2.resource.create_resource')}}">
+
+	<fieldset>
+	  <legend>Resource Category</legend>
+	  <div class="form-group">
+	    {%for category in resource_categories%}
+	    <div class="radio mytooltip">
+	      <label for="rdo:resource_category:{{category.resource_category_id}}"
+		     class="form-label"
+		     style="text-transform: capitalize;">
+		<input type="radio" name="resource_category" required="required"
+		       id="rdo:resource_category:{{category.resource_category_id}}"
+		       value="{{category.resource_category_id}}"
+		       {%if resource_category is defined%}
+		       {%if category.resource_category_id == resource_category%}
+		       checked="checked"
+		       {%endif%}
+		       {%endif%} />
+		{{category.resource_category_key}}
+	      </label>
+	      <span class="mytooltiptext">
+		{{category.resource_category_description}}
+	      </span>
+	    </div>
+	    {%endfor%}
+	  </div>
+	</fieldset>
+
+	<fieldset>
+	  <legend>Basic Resource Information</legend>
+	  <div class="form-group mytooltip">
+	    <label for="resource_name" class="form-label">Name</label>
+	    <input type="text" name="resource_name" class="form-control"
+		   {%if resource_name is defined and resource_name is not none%}
+		   value="{{resource_name}}"
+		   {%endif%}
+		   required="required" />
+	    <span class="mytooltiptext">
+	      The resource name, e.g. the experiment name.
+	    </span>
+	  </div>
+	</fieldset>
+
+	<fieldset>
+	  <legend>Access Control</legend>
+	  <div class="form-group mytooltip">
+	    <label for="chk-public">Publicly Viewable?</label>
+	    <input type="checkbox" name="public" id="chk-public"
+		   checked="checked" />
+	    <span class="mytooltiptext">
+	      Select whether data in this resource will be publicly viewable.
+	    </span>
+	  </div>
+	</fieldset>
+
+	<input class="btn btn-primary" type="submit" value="Create" />
+
+      </form>
+      {%endif%}
+    </div>
+  </div>
+
+</div>
+{%endblock%}