Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
e351dc97
Commit
e351dc97
authored
Feb 15, 2019
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add placeholders to input fields (inputFieldHint in the geni-lib).
parent
66e36ba7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
www/aptui/js/new/ppwizardstart.js
www/aptui/js/new/ppwizardstart.js
+8
-1
No files found.
www/aptui/js/new/ppwizardstart.js
View file @
e351dc97
...
...
@@ -265,6 +265,7 @@ $(function () {
var
inputTemplateString
=
"
<input data-fieldid='<%- fieldid %>'
"
+
"
data-fieldname='<%- fieldname %>'
"
+
"
placeholder='<%- placeholder %>'
"
+
"
name='<%- name %>'
"
+
"
<% if (multivalue) { %>
"
+
"
style='display: inline-block; width: 75%'
"
+
...
...
@@ -474,6 +475,9 @@ $(function () {
}
function
GenerateInput
(
name
,
fieldIndex
,
details
,
value
)
{
var
placeholder
=
details
.
inputFieldHint
?
details
.
inputFieldHint
:
""
var
html
=
inputTemplate
({
"
fieldid
"
:
fieldIndex
,
"
fieldname
"
:
details
.
name
,
...
...
@@ -481,6 +485,7 @@ $(function () {
"
prompt
"
:
details
.
description
,
"
value
"
:
value
,
"
multivalue
"
:
details
.
multiValue
,
"
placeholder
"
:
placeholder
,
});
if
(
details
.
multiValue
)
{
html
+=
mvalueTemplate
();
...
...
@@ -963,8 +968,10 @@ $(function () {
outerdiv
.
addClass
(
'
has-changes
'
);
}
outerdiv
.
addClass
(
'
has-error
'
);
// This used to have display:inline, but that did
// work with multivalue fields.
innerdiv
.
append
(
'
<label class="control-label"
'
+
'
style="
display: inline
;"
'
+
'
style="
padding-top: 2px
;"
'
+
'
for="inputError">Error:
'
+
errorMsg
+
'
</label>
'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment