[PATCH conductor] BZ796862 Launch Time Params, if parameter has new lines in its value, its put into textarea instead of text input

jtomasek at redhat.com jtomasek at redhat.com
Mon Feb 27 13:50:49 UTC 2012


From: Jiri Tomasek <jtomasek at redhat.com>

---
 src/app/stylesheets/layout.scss                    |   15 ++++++++-------
 .../views/deployments/launch_time_params.html.haml |    2 ++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index cdf3e66..03e5f42 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -3389,13 +3389,6 @@ body.monitor form.generic{
     font-size: 13px;
   }
 
-  body.administer input[type="text"],input[type="password"]{
-    border: 1px solid #C4C4C4;
-    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.50);
-    -moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.50);
-    -webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.50);
-  }
-
   input.em{
     font-size: 16px;
     padding: 6px 4px;
@@ -3408,6 +3401,14 @@ body.monitor form.generic{
   input.short{
     width: 100px;
   }
+
+  textarea{
+    padding: 5px 4px;
+    margin: 2px 0px;
+    height: 100px;
+
+    &.long{ width: 400px }
+  }
 }
 
 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/src/app/views/deployments/launch_time_params.html.haml b/src/app/views/deployments/launch_time_params.html.haml
index 7b98ca3..7fcbe58 100644
--- a/src/app/views/deployments/launch_time_params.html.haml
+++ b/src/app/views/deployments/launch_time_params.html.haml
@@ -33,6 +33,8 @@
                   - value = get_hash_multi(params, [:deployment, :launch_parameters, assembly_name, service.name, parameter.name])
                   - if parameter.type == "password"
                     = password_field_tag id, (parameter.value or value)
+                  - elsif (parameter.value or value).to_s.include?("\n")
+                    = text_area_tag id, (parameter.value or value), :class => 'long'
                   - else
                     = text_field_tag id, (parameter.value or value)
                 - else
-- 
1.7.7.6




More information about the aeolus-devel mailing list