Skip to content

Commit

Permalink
Add for/id pairings, elastic#12863
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Aug 8, 2017
1 parent e7f6e36 commit 14b8e23
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions src/ui/public/field_editor/field_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
</p>
</div>
<div ng-if="editor.creating" class="form-group">
<label>Name</label>
<label for="scriptedFieldName">Name</label>
<input
ng-model="editor.field.name"
id="scriptedFieldName00------------"
required
placeholder="New Scripted Field"
input-focus
Expand All @@ -26,9 +27,10 @@
</div>

<div ng-if="editor.field.scripted" class="form-group">
<label>Language</label>
<label for="scriptedFieldLang">Language</label>
<select
ng-model="editor.field.lang"
id="scriptedFieldLang"
ng-options="lang as lang for lang in editor.scriptingLangs"
required
class="form-control"
Expand All @@ -38,16 +40,18 @@
</div>

<div class="form-group">
<label>Type</label>
<label for="scriptedFieldType">Type</label>
<select
ng-if="editor.field.scripted"
id="scriptedFieldType"
ng-model="editor.field.type"
ng-options="type as type for type in editor.fieldTypes"
class="form-control"
data-test-subj="editorFieldType">
</select>
<input
ng-if="!editor.field.scripted"
id="scriptedFieldType"
ng-model="editor.field.type"
readonly
class="form-control">
Expand All @@ -58,7 +62,7 @@
<i class="fa fa-warning"></i> Warning
</span>

<label>Format <small>(Default: <i>{{editor.defFormatType.resolvedTitle}}</i>)</small></label>
<label for="scriptFieldFormat">Format <small>(Default: <i>{{editor.defFormatType.resolvedTitle}}</i>)</small></label>

<div class="hintbox" ng-if="editor.showFormatHelp">
<h4 class="hintbox-heading">
Expand All @@ -72,6 +76,7 @@ <h4 class="hintbox-heading">

<select
ng-model="editor.selectedFormatId"
id="scriptFieldFormat"
ng-options="format.id as format.title for format in editor.fieldFormatTypes"
class="form-control"
data-test-subj="editorSelectedFormatId">
Expand All @@ -85,11 +90,12 @@ <h4 class="hintbox-heading">
</div>

<div class="form-group">
<label for="editor.field.count">Popularity</label>
<label for="editorFieldCount">Popularity</label>
<div class="kuiFieldGroup">
<div class="kuiFieldGroupSection">
<input
ng-model="editor.field.count"
id="editorFieldCount"
type="number"
class="form-control"
data-test-subj=editorFieldCount
Expand Down Expand Up @@ -129,9 +135,14 @@ <h4 class="hintbox-heading">

<div ng-if="editor.field.scripted">
<div class="form-group">
<label>Script</label>
<textarea required class="field-editor_script-input form-control text-monospace"
ng-model="editor.field.script" data-test-subj="editorFieldScript"></textarea>
<label for="scriptedFieldScript">Script</label>
<textarea
required
class="field-editor_script-input form-control text-monospace"
id="scriptedFieldScript"
ng-model="editor.field.script"
data-test-subj="editorFieldScript"
></textarea>
</div>

<div class="form-group">
Expand Down

0 comments on commit 14b8e23

Please sign in to comment.