Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3367)

Unified Diff: appengine/monorail/templates/tracker/field-value-single-str.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/monorail/templates/tracker/field-value-single-str.ezt
diff --git a/appengine/monorail/templates/tracker/field-value-single-str.ezt b/appengine/monorail/templates/tracker/field-value-single-str.ezt
new file mode 100644
index 0000000000000000000000000000000000000000..910cfb175418b805df6acd8209c3df02324b95e3
--- /dev/null
+++ b/appengine/monorail/templates/tracker/field-value-single-str.ezt
@@ -0,0 +1,34 @@
+[# Even though this field definition says it is single-valued, the issue might have
+ multiple values if the field definition was previously multi-valued. In such a situation
+ values other than the first value are shown read-only and must be explicitly removed
+ before the comment can be submitted. ]
+
+[# If the field has no explicit values, then show an empty form element.]
+[if-any fields.values][else]
+ <input name="custom_[fields.field_id]" id="custom_[fields.field_id]" value=""
+ [if-any fields.field_def.is_required_bool]required="required"[end]
+ [# TODO(jrobbins): validation]
+ class="multivalued customfield" size="90">
+[end]
+
+
+[for fields.values]
+ [if-index fields.values first]
+ <input name="custom_[fields.field_id]" value="[fields.values.val]"
+ class="multivalued customfield"
+ [if-any fields.field_def.is_required_bool]required="required"[end]
+ [# TODO(jrobbins): validation]
+ size="90"><br>
+ [else]
+ <span>
+ <input disabled="disabled" value="[fields.values.val]"
+ class="multivalued" size="90">
+ <a href="#" class="removeMultiFieldValueWidget">X</a>
+ </span>
+ [end]
+[end]
+
+[for fields.derived_values]
+ <input disabled="disabled" value="[fields.derived_values.val]"
+ style="font-style:italic" class="multivalued" size="90"><br>
+[end]

Powered by Google App Engine
This is Rietveld 408576698