Add DialogManager to a global API and create the Ask dialog for the user
This commit is contained in:
parent
02b49687cf
commit
44a88cc7b5
10 changed files with 334 additions and 1 deletions
13
templates/Ask/controls.hbs
Normal file
13
templates/Ask/controls.hbs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<div class="control-row">
|
||||
<button
|
||||
type="button"
|
||||
data-action="cancel"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
>
|
||||
Confirm and Close
|
||||
</button>
|
||||
</div>
|
||||
12
templates/Ask/inputs.hbs
Normal file
12
templates/Ask/inputs.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<div class="dialog-content">
|
||||
{{#if description}}
|
||||
<p>
|
||||
{{ description }}
|
||||
</p>
|
||||
{{/if}}
|
||||
{{#each inputs as | i |}}
|
||||
<div class="prompt">
|
||||
{{> (concat (systemFilePath "templates/Ask/inputs/" ) i.type ".hbs") i}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
3
templates/Ask/inputs/details.hbs
Normal file
3
templates/Ask/inputs/details.hbs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<p class="prompt__details">
|
||||
{{{ details }}}
|
||||
</p>
|
||||
12
templates/Ask/inputs/input.hbs
Normal file
12
templates/Ask/inputs/input.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<label
|
||||
for="{{id}}"
|
||||
>
|
||||
{{ label }}
|
||||
</label>
|
||||
<input
|
||||
type="{{ inputType }}"
|
||||
id="{{ id }}"
|
||||
name="{{ key }}"
|
||||
{{ valueAttribute }}="{{ defaultValue }}"
|
||||
{{#if autofocus}}autofocus{{/if}}
|
||||
>
|
||||
Loading…
Add table
Add a link
Reference in a new issue