From ba0824575d569629b52f93cb3d8b37f19d738ebd Mon Sep 17 00:00:00 2001
From: Bo-Chun Louis Chen <louistw@uab.edu>
Date: Mon, 25 Sep 2023 14:40:55 -0500
Subject: [PATCH] Set max hour base on partition

---
 form.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/form.js b/form.js
index 28bd58e..ed93a43 100644
--- a/form.js
+++ b/form.js
@@ -30,10 +30,12 @@ function toggle_gpu_visibility(event) {
   const partition = event.target.value;
   const cpu_selector = '#batch_connect_session_context_bc_num_slots';
   const gpu_selector = '#batch_connect_session_context_bc_num_gpus';
+  const hour_selector = '#batch_connect_session_context_bc_num_hours';
 
   toggle_visibilty_of_form_group(gpu_selector, table[partition]["max_gpu"] != -1);
   set_max_value(cpu_selector, table[partition]["max_cpu"]);
   set_max_value(gpu_selector, table[partition]["max_gpu"]);
+  set_max_value(hour_selector, table[partition]["max_hour"]);
 }
 
 function toggle_visibilty_of_form_group(form_id, show) {
-- 
GitLab