0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00

Merge branch 'master' into pm-multiple-targets

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-04-19 11:04:47 +05:30
Commit 9ded3602eb
62 geänderte Dateien mit 1213 neuen und 941 gelöschten Zeilen

3
.eslintrc Normale Datei
Datei anzeigen

@ -0,0 +1,3 @@
{
"extends": "eslint-config-discourse"
}

53
.github/workflows/plugin-linting.yml gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,53 @@
name: Linting
on:
push:
branches:
- master
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Setup bundler
run: gem install bundler -v 2.1.4 --no-doc
- name: Setup gems
run: bundle install --jobs 4
- name: Yarn install
run: yarn install --dev
- name: ESLint
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
- name: Prettier
run: |
yarn prettier -v
if [ -d "assets" ]; then \
yarn prettier --list-different "assets/**/*.{scss,js,es6}" ; \
fi
if [ -d "test" ]; then \
yarn prettier --list-different "test/**/*.{js,es6}" ; \
fi
- name: Ember template lint
run: yarn ember-template-lint assets/javascripts
- name: Rubocop
run: bundle exec rubocop .

137
.github/workflows/plugin-tests.yml gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,137 @@
name: Plugin Tests
on:
push:
branches:
- master
- main
pull_request:
jobs:
build:
name: ${{ matrix.build_type }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
DISCOURSE_HOSTNAME: www.example.com
RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
RAILS_ENV: test
PGHOST: localhost
PGUSER: discourse
PGPASSWORD: discourse
strategy:
fail-fast: false
matrix:
build_type: ["backend", "frontend"]
ruby: ["2.7"]
postgres: ["12"]
redis: ["4.x"]
services:
postgres:
image: postgres:${{ matrix.postgres }}
ports:
- 5432:5432
env:
POSTGRES_USER: discourse
POSTGRES_PASSWORD: discourse
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
with:
repository: discourse/discourse
fetch-depth: 1
- name: Install plugin
uses: actions/checkout@v2
with:
path: plugins/${{ github.event.repository.name }}
fetch-depth: 1
- name: Check spec existence
id: check_spec
uses: andstor/file-existence-action@v1
with:
files: "plugins/${{ github.event.repository.name }}/spec"
- name: Check qunit existence
id: check_qunit
uses: andstor/file-existence-action@v1
with:
files: "plugins/${{ github.event.repository.name }}/test/javascripts"
- name: Setup Git
run: |
git config --global user.email "ci@ci.invalid"
git config --global user.name "Discourse CI"
- name: Setup packages
run: |
sudo apt-get update
sudo apt-get -yqq install postgresql-client libpq-dev gifsicle jpegoptim optipng jhead
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-pngquant | sudo sh
- name: Update imagemagick
if: matrix.build_type == 'backend'
run: |
wget https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-imagemagick
chmod +x install-imagemagick
sudo ./install-imagemagick
- name: Setup redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Lint English locale
if: matrix.build_type == 'backend'
run: bundle exec ruby script/i18n_lint.rb "plugins/${{ github.event.repository.name }}/locales/{client,server}.en.yml"
- name: Get yarn cache directory
id: yarn-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-yarn-
- name: Yarn install
run: yarn install --dev
- name: Migrate database
run: |
bin/rake db:create
bin/rake db:migrate
- name: Plugin RSpec
if: matrix.build_type == 'backend' && steps.check_spec.outputs.files_exists == 'true'
run: bin/rake plugin:spec[${{ github.event.repository.name }}]
- name: Plugin QUnit
if: matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exists == 'true'
run: bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000']
timeout-minutes: 30
- name: Simplecov Report
if: matrix.build_type == 'backend'
run: COVERAGE=1 bin/rake plugin:spec[${{ github.event.repository.name }}]

4
.gitignore gevendort
Datei anzeigen

@ -1,3 +1,7 @@
coverage/* coverage/*
!coverage/.last_run.json !coverage/.last_run.json
gems/ gems/
.bundle/
auto_generated
.DS_Store
node_modules/

1
.prettierrc Normale Datei
Datei anzeigen

@ -0,0 +1 @@
{}

2
.rubocop.yml Normale Datei
Datei anzeigen

@ -0,0 +1,2 @@
inherit_gem:
rubocop-discourse: default.yml

4
.template-lintrc.js Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
module.exports = {
plugins: ["ember-template-lint-plugin-discourse"],
extends: "discourse:recommended",
};

7
Gemfile Normale Datei
Datei anzeigen

@ -0,0 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
group :development do
gem 'rubocop-discourse'
end

38
Gemfile.lock Normale Datei
Datei anzeigen

@ -0,0 +1,38 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
parallel (1.20.1)
parser (3.0.1.0)
ast (~> 2.4.1)
rainbow (3.0.0)
regexp_parser (2.1.1)
rexml (3.2.5)
rubocop (1.12.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-discourse (2.4.1)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.2.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-progressbar (1.11.0)
unicode-display_width (2.0.0)
PLATFORMS
ruby
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.2.16

Datei anzeigen

@ -1,3 +1,3 @@
{{#if currentUser.admin}} {{#if currentUser.admin}}
{{nav-item route='adminWizards' label='admin.wizard.nav_label'}} {{nav-item route="adminWizards" label="admin.wizard.nav_label"}}
{{/if}} {{/if}}

Datei anzeigen

@ -1,7 +1,7 @@
{{#each site.complete_custom_wizard as |wizard|}} {{#each site.complete_custom_wizard as |wizard|}}
<div class='row'> <div class="row">
<div class='alert alert-info alert-wizard'> <div class="alert alert-info alert-wizard">
<a href="{{wizard.url}}">{{i18n 'wizard.complete_custom' name=wizard.name}}</a> <a href={{wizard.url}}>{{i18n "wizard.complete_custom" name=wizard.name}}</a>
</div> </div>
</div> </div>
{{/each}} {{/each}}

Datei anzeigen

@ -1,5 +1,5 @@
<div class="wizard-api-header page"> <div class="wizard-api-header page">
<div class='buttons'> <div class="buttons">
{{#if updating}} {{#if updating}}
{{loading-spinner size="small"}} {{loading-spinner size="small"}}
{{else}} {{else}}
@ -23,7 +23,7 @@
<div class="wizard-header"> <div class="wizard-header">
{{#if api.isNew}} {{#if api.isNew}}
{{i18n 'admin.wizard.api.new'}} {{i18n "admin.wizard.api.new"}}
{{else}} {{else}}
{{api.title}} {{api.title}}
{{/if}} {{/if}}
@ -31,14 +31,14 @@
<div class="metadata"> <div class="metadata">
<div class="title"> <div class="title">
<label>{{i18n 'admin.wizard.api.title'}}</label> <label>{{i18n "admin.wizard.api.title"}}</label>
{{input value=api.title placeholder=(i18n 'admin.wizard.api.title_placeholder')}} {{input value=api.title placeholder=(i18n "admin.wizard.api.title_placeholder")}}
</div> </div>
<div class="name"> <div class="name">
<label>{{i18n 'admin.wizard.api.name'}}</label> <label>{{i18n "admin.wizard.api.name"}}</label>
{{#if api.isNew}} {{#if api.isNew}}
{{input value=api.name placeholder=(i18n 'admin.wizard.api.name_placeholder')}} {{input value=api.name placeholder=(i18n "admin.wizard.api.name_placeholder")}}
{{else}} {{else}}
{{api.name}} {{api.name}}
{{/if}} {{/if}}
@ -64,7 +64,7 @@
</div> </div>
<div class="wizard-header"> <div class="wizard-header">
{{i18n 'admin.wizard.api.auth.label'}} {{i18n "admin.wizard.api.auth.label"}}
</div> </div>
</div> </div>
@ -72,13 +72,13 @@
<div class="settings"> <div class="settings">
<div class="wizard-header medium"> <div class="wizard-header medium">
{{i18n 'admin.wizard.api.auth.settings'}} {{i18n "admin.wizard.api.auth.settings"}}
</div> </div>
{{#if showRedirectUri}} {{#if showRedirectUri}}
<div class="control-group redirect-uri"> <div class="control-group redirect-uri">
<div class="control-label"> <div class="control-label">
<label>{{i18n 'admin.wizard.api.auth.redirect_uri'}}</label> <label>{{i18n "admin.wizard.api.auth.redirect_uri"}}</label>
<div class="controls"> <div class="controls">
{{api.redirectUri}} {{api.redirectUri}}
</div> </div>
@ -87,14 +87,14 @@
{{/if}} {{/if}}
<div class="control-group auth-type"> <div class="control-group auth-type">
<label>{{i18n 'admin.wizard.api.auth.type'}}</label> <label>{{i18n "admin.wizard.api.auth.type"}}</label>
<div class="controls"> <div class="controls">
{{combo-box {{combo-box
value=api.authType value=api.authType
content=authorizationTypes content=authorizationTypes
onChange=(action (mut api.authType)) onChange=(action (mut api.authType))
options=(hash options=(hash
none='admin.wizard.api.auth.type_none' none="admin.wizard.api.auth.type_none"
)}} )}}
</div> </div>
</div> </div>
@ -102,7 +102,7 @@
{{#if isOauth}} {{#if isOauth}}
{{#if threeLeggedOauth}} {{#if threeLeggedOauth}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.url'}}</label> <label>{{i18n "admin.wizard.api.auth.url"}}</label>
<div class="controls"> <div class="controls">
{{input value=api.authUrl}} {{input value=api.authUrl}}
</div> </div>
@ -110,51 +110,51 @@
{{/if}} {{/if}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.token_url'}}</label> <label>{{i18n "admin.wizard.api.auth.token_url"}}</label>
<div class="controls"> <div class="controls">
{{input value=api.tokenUrl}} {{input value=api.tokenUrl}}
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.client_id'}}</label> <label>{{i18n "admin.wizard.api.auth.client_id"}}</label>
<div class="controls"> <div class="controls">
{{input value=api.clientId}} {{input value=api.clientId}}
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.client_secret'}}</label> <label>{{i18n "admin.wizard.api.auth.client_secret"}}</label>
<div class="controls"> <div class="controls">
{{input value=api.clientSecret}} {{input value=api.clientSecret}}
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.params.label'}}</label> <label>{{i18n "admin.wizard.api.auth.params.label"}}</label>
<div class="controls"> <div class="controls">
{{#each api.authParams as |param|}} {{#each api.authParams as |param|}}
<div class="param"> <div class="param">
{{input value=param.key placeholder=(i18n 'admin.wizard.key')}} {{input value=param.key placeholder=(i18n "admin.wizard.key")}}
{{input value=param.value placeholder=(i18n 'admin.wizard.value')}} {{input value=param.value placeholder=(i18n "admin.wizard.value")}}
{{d-button action=(action "removeParam") actionParam=param icon='times'}} {{d-button action=(action "removeParam") actionParam=param icon="times"}}
</div> </div>
{{/each}} {{/each}}
{{d-button label='admin.wizard.api.auth.params.new' icon='plus' action=(action "addParam")}} {{d-button label="admin.wizard.api.auth.params.new" icon="plus" action=(action "addParam")}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
{{#if isBasicAuth}} {{#if isBasicAuth}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.username'}}</label> <label>{{i18n "admin.wizard.api.auth.username"}}</label>
<div class="controls"> <div class="controls">
{{input value=api.username}} {{input value=api.username}}
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.auth.password'}}</label> <label>{{i18n "admin.wizard.api.auth.password"}}</label>
<div class="controls"> <div class="controls">
{{input value=api.password}} {{input value=api.password}}
</div> </div>
@ -175,12 +175,12 @@
</div> </div>
<div class="wizard-header medium"> <div class="wizard-header medium">
{{i18n 'admin.wizard.api.status.label'}} {{i18n "admin.wizard.api.status.label"}}
</div> </div>
{{#if threeLeggedOauth}} {{#if threeLeggedOauth}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.status.code'}}</label> <label>{{i18n "admin.wizard.api.status.code"}}</label>
<div class="controls"> <div class="controls">
{{api.code}} {{api.code}}
</div> </div>
@ -188,7 +188,7 @@
{{/if}} {{/if}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.status.access_token'}}</label> <label>{{i18n "admin.wizard.api.status.access_token"}}</label>
<div class="controls"> <div class="controls">
{{api.accessToken}} {{api.accessToken}}
</div> </div>
@ -196,7 +196,7 @@
{{#if threeLeggedOauth}} {{#if threeLeggedOauth}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.status.refresh_token'}}</label> <label>{{i18n "admin.wizard.api.status.refresh_token"}}</label>
<div class="controls"> <div class="controls">
{{api.refreshToken}} {{api.refreshToken}}
</div> </div>
@ -204,14 +204,14 @@
{{/if}} {{/if}}
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.status.expires_at'}}</label> <label>{{i18n "admin.wizard.api.status.expires_at"}}</label>
<div class="controls"> <div class="controls">
{{api.tokenExpiresAt}} {{api.tokenExpiresAt}}
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label>{{i18n 'admin.wizard.api.status.refresh_at'}}</label> <label>{{i18n "admin.wizard.api.status.refresh_at"}}</label>
<div class="controls"> <div class="controls">
{{api.tokenRefreshAt}} {{api.tokenRefreshAt}}
</div> </div>
@ -221,11 +221,11 @@
</div> </div>
<div class="wizard-header"> <div class="wizard-header">
{{i18n 'admin.wizard.api.endpoint.label'}} {{i18n "admin.wizard.api.endpoint.label"}}
</div> </div>
<div class="wizard-api-endpoints"> <div class="wizard-api-endpoints">
{{d-button action=(action "addEndpoint") label='admin.wizard.api.endpoint.add' icon='plus'}} {{d-button action=(action "addEndpoint") label="admin.wizard.api.endpoint.add" icon="plus"}}
{{#if api.endpoints}} {{#if api.endpoints}}
<div class="endpoint-list"> <div class="endpoint-list">
@ -236,14 +236,14 @@
<div class="endpoint-"> <div class="endpoint-">
<div class="top"> <div class="top">
{{input value=endpoint.name {{input value=endpoint.name
placeholder=(i18n 'admin.wizard.api.endpoint.name')}} placeholder=(i18n "admin.wizard.api.endpoint.name")}}
{{input value=endpoint.url {{input value=endpoint.url
placeholder=(i18n 'admin.wizard.api.endpoint.url') placeholder=(i18n "admin.wizard.api.endpoint.url")
class='endpoint-url'}} class="endpoint-url"}}
{{d-button action=(action "removeEndpoint") {{d-button action=(action "removeEndpoint")
actionParam=endpoint actionParam=endpoint
icon='times' icon="times"
class='remove-endpoint'}} class="remove-endpoint"}}
</div> </div>
<div class="bottom"> <div class="bottom">
{{combo-box {{combo-box
@ -278,33 +278,37 @@
</div> </div>
<div class="wizard-header"> <div class="wizard-header">
{{i18n 'admin.wizard.api.log.label'}} {{i18n "admin.wizard.api.log.label"}}
{{d-button action=(action "clearLogs") {{d-button action=(action "clearLogs")
icon='trash-alt' icon="trash-alt"
class='clear-logs'}} class="clear-logs"}}
</div> </div>
<div class="wizard-api-log"> <div class="wizard-api-log">
<div class="log-list"> <div class="log-list">
<table class="wizard-api-log-table"> <table class="wizard-api-log-table">
<th>Datetime</th> <thead>
<th>User</th> <th>Datetime</th>
<th>Status</th> <th>User</th>
<th>URL</th> <th>Status</th>
<th>Error</th> <th>URL</th>
{{#each api.log as |logentry|}} <th>Error</th>
<tr> </thead>
<td>{{logentry.time}}</td> <tbody>
<td class="user-image"> {{#each api.log as |logentry|}}
<div class="user-image-inner"> <tr>
<a href="{{unbound logentry.userpath}}" data-user-card="{{unbound logentry.username}}">{{avatar logentry imageSize="large"}}</a> <td>{{logentry.time}}</td>
</div> <td class="user-image">
</td> <div class="user-image-inner">
<td>{{logentry.status}}</td> <a href={{logentry.userpath}} data-user-card={{logentry.username}}>{{avatar logentry imageSize="large"}}</a>
<td>{{logentry.url}}</td> </div>
<td>{{logentry.error}}</td> </td>
</tr> <td>{{logentry.status}}</td>
{{/each}} <td>{{logentry.url}}</td>
<td>{{logentry.error}}</td>
</tr>
{{/each}}
</tbody>
</table> </table>
</div> </div>
</div> </div>

Datei anzeigen

@ -2,9 +2,9 @@
{{combo-box {{combo-box
value=apiName value=apiName
content=apiList content=apiList
onChange=(route-action 'changeApi') onChange=(route-action "changeApi")
options=(hash options=(hash
none='admin.wizard.api.select' none="admin.wizard.api.select"
)}} )}}
{{d-button {{d-button

Datei anzeigen

@ -1,5 +1,5 @@
<div class="admin-wizard-controls"> <div class="admin-wizard-controls">
<h3>{{i18n 'admin.wizard.custom_field.nav_label'}}</h3> <h3>{{i18n "admin.wizard.custom_field.nav_label"}}</h3>
<div class="buttons"> <div class="buttons">
{{d-button {{d-button
@ -14,23 +14,27 @@
opts=messageOpts opts=messageOpts
type=messageType type=messageType
url=documentationUrl url=documentationUrl
component='custom_fields'}} component="custom_fields"}}
<div class="admin-wizard-container"> <div class="admin-wizard-container">
{{#if customFields}} {{#if customFields}}
<table> <table>
<tr> <thead>
{{#each fieldKeys as |key|}} <tr>
<th>{{i18n (concat "admin.wizard.custom_field." key ".label")}}</th> {{#each fieldKeys as |key|}}
<th>{{i18n (concat "admin.wizard.custom_field." key ".label")}}</th>
{{/each}}
<th></th>
</tr>
</thead>
<tbody>
{{#each customFields as |field|}}
{{custom-field-input
field=field
removeField=(action "removeField")
saveField=(action "saveField")}}
{{/each}} {{/each}}
<th></th> </tbody>
</tr>
{{#each customFields as |field|}}
{{custom-field-input
field=field
removeField=(action 'removeField')
saveField=(action 'saveField')}}
{{/each}}
</table> </table>
{{/if}} {{/if}}
</div> </div>

Datei anzeigen

@ -1,5 +1,5 @@
<div class="admin-wizard-controls"> <div class="admin-wizard-controls">
<h3>{{i18n 'admin.wizard.log.nav_label'}}</h3> <h3>{{i18n "admin.wizard.log.nav_label"}}</h3>
{{d-button {{d-button
label="refresh" label="refresh"
@ -10,7 +10,7 @@
{{#load-more selector=".log-list tr" action=(action "loadMore") class="wizard-logs"}} {{#load-more selector=".log-list tr" action=(action "loadMore") class="wizard-logs"}}
{{#if noResults}} {{#if noResults}}
<p>{{i18n 'search.no_results'}}</p> <p>{{i18n "search.no_results"}}</p>
{{else}} {{else}}
<table class="table grid"> <table class="table grid">
<thead> <thead>

Datei anzeigen

@ -1,18 +1,18 @@
<div class="admin-wizard-controls"> <div class="admin-wizard-controls">
<h3>{{i18n 'admin.wizard.manager.title'}}</h3> <h3>{{i18n "admin.wizard.manager.title"}}</h3>
<div class="buttons"> <div class="buttons">
{{#if filename}} {{#if filename}}
<div class="filename"> <div class="filename">
<a {{action 'clearFile'}}> <a role="button" {{action "clearFile"}}>
{{d-icon 'times'}} {{d-icon "times"}}
</a> </a>
<span>{{filename}}</span> <span>{{filename}}</span>
</div> </div>
{{/if}} {{/if}}
{{input {{input
id='file-upload' id="file-upload"
type="file" type="file"
accept="application/json" accept="application/json"
change=(action "setFile")}} change=(action "setFile")}}
@ -45,15 +45,15 @@
opts=messageOpts opts=messageOpts
items=messageItems items=messageItems
loading=loading loading=loading
component='manager'}} component="manager"}}
<div class="admin-wizard-container"> <div class="admin-wizard-container">
<table class="table grid"> <table class="table grid">
<thead> <thead>
<tr> <tr>
<th>{{i18n 'admin.wizard.label'}}</th> <th>{{i18n "admin.wizard.label"}}</th>
<th class="control-column">{{i18n 'admin.wizard.manager.export'}}</th> <th class="control-column">{{i18n "admin.wizard.manager.export"}}</th>
<th class="control-column">{{i18n 'admin.wizard.manager.destroy'}}</th> <th class="control-column">{{i18n "admin.wizard.manager.destroy"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -68,13 +68,13 @@
{{input {{input
type="checkbox" type="checkbox"
class="export" class="export"
change=(action 'selectWizard')}} change=(action "selectWizard")}}
</td> </td>
<td class="control-column"> <td class="control-column">
{{input {{input
type="checkbox" type="checkbox"
class="destroy" class="destroy"
change=(action 'selectWizard')}} change=(action "selectWizard")}}
</td> </td>
</tr> </tr>
{{/each}} {{/each}}

Datei anzeigen

@ -1,29 +1,33 @@
{{#if submissions}} {{#if submissions}}
<div class="wizard-header large"> <div class="wizard-header large">
<label>{{i18n 'admin.wizard.submissions.title' name=wizard.name}}</label> <label>{{i18n "admin.wizard.submissions.title" name=wizard.name}}</label>
<a class="btn btn-default download-link" href="{{downloadUrl}}" target="_blank"> <a class="btn btn-default download-link" href={{downloadUrl}} target="_blank" rel="noopener noreferrer">
{{d-icon 'download'}} {{d-icon "download"}}
<span class="d-button-label"> <span class="d-button-label">
{{i18n "admin.wizard.submissions.download"}} {{i18n "admin.wizard.submissions.download"}}
</span> </span>
</a> </a>
</div> </div>
<div class="wizard-submissions"> <div class="wizard-submissions">
<table> <table>
<tr> <thead>
{{#each fields as |f|}}
<th>{{f}}</th>
{{/each}}
</tr>
{{#each submissions as |s|}}
<tr> <tr>
{{#each-in s as |k v|}} {{#each fields as |f|}}
<td>{{v}}</td> <th>{{f}}</th>
{{/each-in}} {{/each}}
</tr> </tr>
{{/each}} </thead>
<tbody>
{{#each submissions as |s|}}
<tr>
{{#each-in s as |k v|}}
<td>{{v}}</td>
{{/each-in}}
</tr>
{{/each}}
</tbody>
</table> </table>
</div> </div>
{{/if}} {{/if}}

Datei anzeigen

@ -2,9 +2,9 @@
{{combo-box {{combo-box
value=wizardId value=wizardId
content=wizardList content=wizardList
onChange=(route-action 'changeWizard') onChange=(route-action "changeWizard")
options=(hash options=(hash
none='admin.wizard.select' none="admin.wizard.select"
)}} )}}
</div> </div>

Datei anzeigen

@ -12,7 +12,7 @@
{{else}} {{else}}
{{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}} {{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}}
{{/if}} {{/if}}
<a href="{{wizardUrl}}" target="_blank">{{wizardUrl}}</a> <a href={{wizardUrl}} target="_blank" rel="noopener noreferrer">{{wizardUrl}}</a>
{{/if}} {{/if}}
</div> </div>
</div> </div>
@ -20,7 +20,7 @@
<div class="wizard-basic-details"> <div class="wizard-basic-details">
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.background'}}</label> <label>{{i18n "admin.wizard.background"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input {{input
@ -33,95 +33,95 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.theme_id'}}</label> <label>{{i18n "admin.wizard.theme_id"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{combo-box {{combo-box
content=themes content=themes
valueProperty='id' valueProperty="id"
value=wizard.theme_id value=wizard.theme_id
onChange=(action (mut wizard.theme_id)) onChange=(action (mut wizard.theme_id))
options=(hash options=(hash
none='admin.wizard.no_theme' none="admin.wizard.no_theme"
)}} )}}
</div> </div>
</div> </div>
</div> </div>
<div class="wizard-header medium"> <div class="wizard-header medium">
{{i18n 'admin.wizard.label'}} {{i18n "admin.wizard.label"}}
</div> </div>
<div class="wizard-settings"> <div class="wizard-settings">
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.required'}}</label> <label>{{i18n "admin.wizard.required"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.required}} {{input type="checkbox" checked=wizard.required}}
<span>{{i18n 'admin.wizard.required_label'}}</span> <span>{{i18n "admin.wizard.required_label"}}</span>
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.after_signup'}}</label> <label>{{i18n "admin.wizard.after_signup"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.after_signup}} {{input type="checkbox" checked=wizard.after_signup}}
<span>{{i18n 'admin.wizard.after_signup_label'}}</span> <span>{{i18n "admin.wizard.after_signup_label"}}</span>
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.multiple_submissions'}}</label> <label>{{i18n "admin.wizard.multiple_submissions"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.multiple_submissions}} {{input type="checkbox" checked=wizard.multiple_submissions}}
<span>{{i18n 'admin.wizard.multiple_submissions_label'}}</span> <span>{{i18n "admin.wizard.multiple_submissions_label"}}</span>
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.prompt_completion'}}</label> <label>{{i18n "admin.wizard.prompt_completion"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.prompt_completion}} {{input type="checkbox" checked=wizard.prompt_completion}}
<span>{{i18n 'admin.wizard.prompt_completion_label'}}</span> <span>{{i18n "admin.wizard.prompt_completion_label"}}</span>
</div> </div>
</div> </div>
<div class="setting full-inline"> <div class="setting full-inline">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.after_time'}}</label> <label>{{i18n "admin.wizard.after_time"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.after_time}} {{input type="checkbox" checked=wizard.after_time}}
<span>{{i18n 'admin.wizard.after_time_label'}}</span> <span>{{i18n "admin.wizard.after_time_label"}}</span>
{{d-button {{d-button
action='setNextSessionScheduled' action="setNextSessionScheduled"
translatedLabel=nextSessionScheduledLabel translatedLabel=nextSessionScheduledLabel
class="btn-after-time" class="btn-after-time"
icon='far-calendar'}} icon="far-calendar"}}
</div> </div>
</div> </div>
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.permitted'}}</label> <label>{{i18n "admin.wizard.permitted"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=wizard.permitted inputs=wizard.permitted
options=(hash options=(hash
context='wizard' context="wizard"
inputTypes='assignment,validation' inputTypes="assignment,validation"
groupSelection='output' groupSelection="output"
userFieldSelection='key' userFieldSelection="key"
textSelection='value' textSelection="value"
inputConnector='and' inputConnector="and"
)}} )}}
</div> </div>
</div> </div>
@ -133,21 +133,21 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.save_submissions'}}</label> <label>{{i18n "admin.wizard.save_submissions"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.save_submissions}} {{input type="checkbox" checked=wizard.save_submissions}}
<span>{{i18n 'admin.wizard.save_submissions_label'}}</span> <span>{{i18n "admin.wizard.save_submissions_label"}}</span>
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.restart_on_revisit'}}</label> <label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=wizard.restart_on_revisit}} {{input type="checkbox" checked=wizard.restart_on_revisit}}
<span>{{i18n 'admin.wizard.restart_on_revisit_label'}}</span> <span>{{i18n "admin.wizard.restart_on_revisit_label"}}</span>
</div> </div>
</div> </div>
@ -185,18 +185,18 @@
wizardFields=wizardFields}} wizardFields=wizardFields}}
{{/each}} {{/each}}
<div class='admin-wizard-buttons'> <div class="admin-wizard-buttons">
<button {{action "save"}} disabled={{disableSave}} class='btn btn-primary'> <button {{action "save"}} disabled={{disableSave}} class="btn btn-primary" type="button">
{{i18n 'admin.wizard.save'}} {{i18n "admin.wizard.save"}}
</button> </button>
{{#unless creating}} {{#unless creating}}
<button {{action "remove"}} class='btn btn-danger remove'> <button {{action "remove"}} class="btn btn-danger remove" type="button">
{{d-icon "far-trash-alt"}}{{i18n 'admin.wizard.remove'}} {{d-icon "far-trash-alt"}}{{i18n "admin.wizard.remove"}}
</button> </button>
{{/unless}} {{/unless}}
{{conditional-loading-spinner condition=saving size='small'}} {{conditional-loading-spinner condition=saving size="small"}}
{{#if error}} {{#if error}}
<span class="error">{{d-icon "times"}}{{error}}</span> <span class="error">{{d-icon "times"}}{{error}}</span>

Datei anzeigen

@ -2,9 +2,9 @@
{{combo-box {{combo-box
value=wizardListVal value=wizardListVal
content=wizardList content=wizardList
onChange=(route-action 'changeWizard') onChange=(route-action "changeWizard")
options=(hash options=(hash
none='admin.wizard.select' none="admin.wizard.select"
)}} )}}
{{d-button {{d-button
@ -16,7 +16,7 @@
{{wizard-message {{wizard-message
key=messageKey key=messageKey
url=messageUrl url=messageUrl
component='wizard'}} component="wizard"}}
<div class="admin-wizard-container settings"> <div class="admin-wizard-container settings">
{{outlet}} {{outlet}}

Datei anzeigen

@ -1,12 +1,12 @@
{{#admin-nav}} {{#admin-nav}}
{{nav-item route='adminWizardsWizard' label='admin.wizard.nav_label'}} {{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
{{nav-item route='adminWizardsCustomFields' label='admin.wizard.custom_field.nav_label'}} {{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}}
{{nav-item route='adminWizardsSubmissions' label='admin.wizard.submissions.nav_label'}} {{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}}
{{#if siteSettings.wizard_apis_enabled}} {{#if siteSettings.wizard_apis_enabled}}
{{nav-item route='adminWizardsApi' label='admin.wizard.api.nav_label'}} {{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
{{/if}} {{/if}}
{{nav-item route='adminWizardsLogs' label='admin.wizard.log.nav_label'}} {{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}
{{nav-item route='adminWizardsManager' label='admin.wizard.manager.nav_label'}} {{nav-item route="adminWizardsManager" label="admin.wizard.manager.nav_label"}}
{{/admin-nav}} {{/admin-nav}}
<div class="admin-container"> <div class="admin-container">

Datei anzeigen

@ -1,4 +1,4 @@
{{d-button {{d-button
action="toggleAdvanced" action="toggleAdvanced"
label='admin.wizard.advanced' label="admin.wizard.advanced"
class=toggleClass}} class=toggleClass}}

Datei anzeigen

@ -38,7 +38,7 @@
{{wizard-message {{wizard-message
key=messageKey key=messageKey
url=messageUrl url=messageUrl
component='action'}} component="action"}}
{{#if basicTopicFields}} {{#if basicTopicFields}}
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
@ -49,12 +49,12 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.title inputs=action.title
property='title' property="title"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -68,16 +68,16 @@
{{combo-box {{combo-box
value=action.post value=action.post
content=wizardFields content=wizardFields
nameProperty='label' nameProperty="label"
onChange=(action (mut action.post)) onChange=(action (mut action.post))
options=(hash options=(hash
none='admin.wizard.selector.placeholder.wizard_field' none="admin.wizard.selector.placeholder.wizard_field"
isDisabled=showPostBuilder isDisabled=showPostBuilder
)}} )}}
<div class="setting-gutter"> <div class="setting-gutter">
{{input type='checkbox' checked=action.post_builder}} {{input type="checkbox" checked=action.post_builder}}
<span>{{i18n 'admin.wizard.action.post_builder.checkbox'}}</span> <span>{{i18n "admin.wizard.action.post_builder.checkbox"}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -85,7 +85,7 @@
{{#if action.post_builder}} {{#if action.post_builder}}
<div class="setting full"> <div class="setting full">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.action.post_builder.label'}}</label> <label>{{i18n "admin.wizard.action.post_builder.label"}}</label>
</div> </div>
<div class="setting-value editor"> <div class="setting-value editor">
@ -106,16 +106,16 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.category inputs=action.category
property='category' property="category"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='key,value' textSelection="key,value"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
categorySelection='output' categorySelection="output"
wizardActionSelection='output' wizardActionSelection="output"
outputDefaultSelection='category' outputDefaultSelection="category"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -128,15 +128,15 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.tags inputs=action.tags
property='tags' property="tags"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
tagSelection='output' tagSelection="output"
outputDefaultSelection='tag' outputDefaultSelection="tag"
listSelection='output' listSelection="output"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -149,12 +149,12 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.visible inputs=action.visible
property='visible' property="visible"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -169,16 +169,16 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.recipient inputs=action.recipient
property='recipient' property="recipient"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='value,output' textSelection="value,output"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
groupSelection='key,value' groupSelection="key,value"
userSelection='output' userSelection="output"
outputDefaultSelection='user' outputDefaultSelection="user"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -187,21 +187,21 @@
{{#if updateProfile}} {{#if updateProfile}}
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.action.update_profile.setting'}}</label> <label>{{i18n "admin.wizard.action.update_profile.setting"}}</label>
</div> </div>
{{wizard-mapper {{wizard-mapper
inputs=action.profile_updates inputs=action.profile_updates
property='profile_updates' property="profile_updates"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
inputTypes='association' inputTypes="association"
textSelection='value' textSelection="value"
userFieldSelection='key' userFieldSelection="key"
wizardFieldSelection='value' wizardFieldSelection="value"
wizardActionSelection='value' wizardActionSelection="value"
keyDefaultSelection='userField' keyDefaultSelection="userField"
context='action' context="action"
)}} )}}
</div> </div>
{{/if}} {{/if}}
@ -219,7 +219,7 @@
onChange=(action (mut action.api)) onChange=(action (mut action.api))
options=(hash options=(hash
isDisabled=action.custom_title_enabled isDisabled=action.custom_title_enabled
none='admin.wizard.action.send_to_api.select_an_api' none="admin.wizard.action.send_to_api.select_an_api"
)}} )}}
</div> </div>
</div> </div>
@ -236,7 +236,7 @@
onChange=(action (mut action.api_endpoint)) onChange=(action (mut action.api_endpoint))
options=(hash options=(hash
isDisabled=apiEmpty isDisabled=apiEmpty
none='admin.wizard.action.send_to_api.select_an_endpoint' none="admin.wizard.action.send_to_api.select_an_endpoint"
)}} )}}
</div> </div>
</div> </div>
@ -252,7 +252,7 @@
previewEnabled=false previewEnabled=false
barEnabled=false barEnabled=false
wizardFields=wizardFields wizardFields=wizardFields
placeholder='admin.wizard.action.send_to_api.body_placeholder'}} placeholder="admin.wizard.action.send_to_api.body_placeholder"}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
@ -266,16 +266,16 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.group inputs=action.group
property='group' property="group"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='value,output' textSelection="value,output"
wizardFieldSelection='key,value,assignment' wizardFieldSelection="key,value,assignment"
userFieldSelection='key,value,assignment' userFieldSelection="key,value,assignment"
wizardActionSelection=true wizardActionSelection=true
groupSelection='value,output' groupSelection="value,output"
outputDefaultSelection='group' outputDefaultSelection="group"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -290,15 +290,15 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.url inputs=action.url
property='url' property="url"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
context='action' context="action"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
groupSelection='key,value' groupSelection="key,value"
categorySelection='key,value' categorySelection="key,value"
userSelection='key,value' userSelection="key,value"
)}} )}}
</div> </div>
</div> </div>
@ -313,15 +313,15 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.categories inputs=action.categories
property='categories' property="categories"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='key,value' textSelection="key,value"
wizardFieldSelection=true wizardFieldSelection=true
wizardActionSelection=true wizardActionSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
categorySelection='output' categorySelection="output"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -334,12 +334,12 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.mute_remainder inputs=action.mute_remainder
property='mute_remainder' property="mute_remainder"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
context='action' context="action"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
)}} )}}
</div> </div>
</div> </div>
@ -356,7 +356,7 @@
onChange=(action (mut action.notification_level)) onChange=(action (mut action.notification_level))
options=(hash options=(hash
isDisabled=action.custom_title_enabled isDisabled=action.custom_title_enabled
none='admin.wizard.action.watch_categories.select_a_notification_level' none="admin.wizard.action.watch_categories.select_a_notification_level"
)}} )}}
</div> </div>
</div> </div>
@ -379,13 +379,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.usernames inputs=action.usernames
property='usernames' property="usernames"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
context='action' context="action"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
userSelection='output' userSelection="output"
)}} )}}
</div> </div>
</div> </div>
@ -400,13 +400,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.name inputs=action.name
property='name' property="name"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -418,13 +418,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.full_name inputs=action.full_name
property='full_name' property="full_name"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -436,13 +436,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.title inputs=action.title
property='title' property="title"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -454,13 +454,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.bio_raw inputs=action.bio_raw
property='bio_raw' property="bio_raw"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -472,14 +472,14 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.owner_usernames inputs=action.owner_usernames
property='owner_usernames' property="owner_usernames"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
userSelection='output' userSelection="output"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -491,14 +491,14 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.usernames inputs=action.usernames
property='usernames' property="usernames"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
userSelection='output' userSelection="output"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -510,13 +510,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.grant_trust_level inputs=action.grant_trust_level
property='grant_trust_level' property="grant_trust_level"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -528,13 +528,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.mentionable_level inputs=action.mentionable_level
property='mentionable_level' property="mentionable_level"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -546,13 +546,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.messageable_level inputs=action.messageable_level
property='messageable_level' property="messageable_level"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -564,13 +564,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.visibility_level inputs=action.visibility_level
property='visibility_level' property="visibility_level"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -582,13 +582,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.members_visibility_level inputs=action.members_visibility_level
property='members_visibility_level' property="members_visibility_level"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -603,13 +603,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.name inputs=action.name
property='name' property="name"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='key,value' textSelection="key,value"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -622,13 +622,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.slug inputs=action.slug
property='slug' property="slug"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -641,13 +641,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.color inputs=action.color
property='color' property="color"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -660,13 +660,13 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.text_color inputs=action.text_color
property='text_color' property="text_color"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -679,14 +679,14 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.parent_category_id inputs=action.parent_category_id
property='parent_category_id' property="parent_category_id"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='key,value' textSelection="key,value"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection='key,value' userFieldSelection="key,value"
categorySelection='output' categorySelection="output"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -699,16 +699,16 @@
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.permissions inputs=action.permissions
property='permissions' property="permissions"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
inputTypes='association' inputTypes="association"
textSelection=true textSelection=true
wizardFieldSelection=true wizardFieldSelection=true
wizardActionSelection='key' wizardActionSelection="key"
userFieldSelection=true userFieldSelection=true
groupSelection='key' groupSelection="key"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -723,22 +723,22 @@
{{#if hasCustomFields}} {{#if hasCustomFields}}
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.action.custom_fields.label'}}</label> <label>{{i18n "admin.wizard.action.custom_fields.label"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.custom_fields inputs=action.custom_fields
property='custom_fields' property="custom_fields"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
inputTypes='association' inputTypes="association"
customFieldSelection='key' customFieldSelection="key"
wizardFieldSelection='value' wizardFieldSelection="value"
wizardActionSelection='value' wizardActionSelection="value"
userFieldSelection='value' userFieldSelection="value"
keyPlaceholder='admin.wizard.action.custom_fields.key' keyPlaceholder="admin.wizard.action.custom_fields.key"
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -747,20 +747,20 @@
{{#if sendMessage}} {{#if sendMessage}}
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.required'}}</label> <label>{{i18n "admin.wizard.required"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=action.required inputs=action.required
property='required' property="required"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=(hash options=(hash
textSelection='value' textSelection="value"
wizardFieldSelection=true wizardFieldSelection=true
userFieldSelection=true userFieldSelection=true
groupSelection=true groupSelection=true
context='action' context="action"
)}} )}}
</div> </div>
</div> </div>
@ -773,10 +773,10 @@
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=action.skip_redirect}} {{input type="checkbox" checked=action.skip_redirect}}
<span> <span>
{{i18n 'admin.wizard.action.skip_redirect.description' type='topic'}} {{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
</span> </span>
</div> </div>
</div> </div>
@ -787,10 +787,10 @@
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type='checkbox' checked=action.suppress_notifications}} {{input type="checkbox" checked=action.suppress_notifications}}
<span> <span>
{{i18n 'admin.wizard.action.suppress_notifications.description' type='topic'}} {{i18n "admin.wizard.action.suppress_notifications.description" type="topic"}}
</span> </span>
</div> </div>
</div> </div>

Datei anzeigen

@ -8,7 +8,7 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.label'}}</label> <label>{{i18n "admin.wizard.field.label"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input name="label" value=field.label}} {{input name="label" value=field.label}}
@ -17,18 +17,18 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.required'}}</label> <label>{{i18n "admin.wizard.field.required"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
<span>{{i18n 'admin.wizard.field.required_label'}}</span> <span>{{i18n "admin.wizard.field.required_label"}}</span>
{{input type='checkbox' checked=field.required}} {{input type="checkbox" checked=field.required}}
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.description'}}</label> <label>{{i18n "admin.wizard.field.description"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{textarea name="description" value=field.description}} {{textarea name="description" value=field.description}}
@ -37,7 +37,7 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.image'}}</label> <label>{{i18n "admin.wizard.field.image"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{image-uploader {{image-uploader
@ -51,7 +51,7 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.type'}}</label> <label>{{i18n "admin.wizard.type"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
@ -68,12 +68,12 @@
{{wizard-message {{wizard-message
key=messageKey key=messageKey
url=messageUrl url=messageUrl
component='field'}} component="field"}}
{{#if isTextType}} {{#if isTextType}}
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.min_length'}}</label> <label>{{i18n "admin.wizard.field.min_length"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
@ -87,7 +87,7 @@
<div class="setting full"> <div class="setting full">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.max_length'}}</label> <label>{{i18n "admin.wizard.field.max_length"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
@ -101,11 +101,11 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.char_counter'}}</label> <label>{{i18n "admin.wizard.field.char_counter"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
<span>{{i18n 'admin.wizard.field.char_counter_placeholder'}}</span> <span>{{i18n "admin.wizard.field.char_counter_placeholder"}}</span>
{{input {{input
type="checkbox" type="checkbox"
checked=field.char_counter}} checked=field.char_counter}}
@ -116,7 +116,7 @@
{{#if isUpload}} {{#if isUpload}}
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.file_types'}}</label> <label>{{i18n "admin.wizard.field.file_types"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
@ -128,7 +128,7 @@
{{#if showLimit}} {{#if showLimit}}
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.limit'}}</label> <label>{{i18n "admin.wizard.field.limit"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
@ -140,12 +140,12 @@
{{#if isDateTime}} {{#if isDateTime}}
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{{i18n 'admin.wizard.field.date_time_format.label'}}}</label> <label>{{html-safe (i18n "admin.wizard.field.date_time_format.label")}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input value=field.format class="medium"}} {{input value=field.format class="medium"}}
<label>{{{i18n 'admin.wizard.field.date_time_format.instructions'}}}</label> <label>{{html-safe (i18n "admin.wizard.field.date_time_format.instructions")}}</label>
</div> </div>
</div> </div>
{{/if}} {{/if}}
@ -153,14 +153,14 @@
{{#if showPrefill}} {{#if showPrefill}}
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.prefill'}}</label> <label>{{i18n "admin.wizard.field.prefill"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=field.prefill inputs=field.prefill
property='prefill' property="prefill"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=prefillOptions}} options=prefillOptions}}
</div> </div>
</div> </div>
@ -169,14 +169,14 @@
{{#if showContent}} {{#if showContent}}
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.content'}}</label> <label>{{i18n "admin.wizard.field.content"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=field.content inputs=field.content
property='content' property="content"
onUpdate=(action 'mappedFieldUpdated') onUpdate=(action "mappedFieldUpdated")
options=contentOptions}} options=contentOptions}}
</div> </div>
</div> </div>
@ -191,7 +191,7 @@
{{#if isCategory}} {{#if isCategory}}
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.property'}}</label> <label>{{i18n "admin.wizard.field.property"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
@ -200,7 +200,7 @@
content=categoryPropertyTypes content=categoryPropertyTypes
onChange=(action (mut field.property)) onChange=(action (mut field.property))
options=(hash options=(hash
none='admin.wizard.selector.placeholder.property' none="admin.wizard.selector.placeholder.property"
)}} )}}
</div> </div>
</div> </div>
@ -208,7 +208,7 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.translation'}}</label> <label>{{i18n "admin.wizard.translation"}}</label>
</div> </div>
<div class="setting-value medium"> <div class="setting-value medium">
{{input {{input

Datei anzeigen

@ -1,6 +1,6 @@
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.step.title'}}</label> <label>{{i18n "admin.wizard.step.title"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input {{input
@ -11,7 +11,7 @@
<div class="setting full"> <div class="setting full">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.step.banner'}}</label> <label>{{i18n "admin.wizard.step.banner"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{image-uploader {{image-uploader
@ -25,7 +25,7 @@
<div class="setting full"> <div class="setting full">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.step.description'}}</label> <label>{{i18n "admin.wizard.step.description"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-text-editor {{wizard-text-editor
@ -40,23 +40,23 @@
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.step.required_data.label'}}</label> <label>{{i18n "admin.wizard.step.required_data.label"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=step.required_data inputs=step.required_data
options=(hash options=(hash
inputTypes='validation' inputTypes="validation"
inputConnector='and' inputConnector="and"
wizardFieldSelection='value' wizardFieldSelection="value"
userFieldSelection='value' userFieldSelection="value"
keyPlaceholder="admin.wizard.submission_key" keyPlaceholder="admin.wizard.submission_key"
context='step' context="step"
)}} )}}
{{#if step.required_data}} {{#if step.required_data}}
<div class="required-data-message"> <div class="required-data-message">
<div class="label"> <div class="label">
{{i18n 'admin.wizard.step.required_data.not_permitted_message'}} {{i18n "admin.wizard.step.required_data.not_permitted_message"}}
</div> </div>
{{input value=step.required_data_message}} {{input value=step.required_data_message}}
</div> </div>
@ -66,24 +66,24 @@
<div class="setting full field-mapper-setting"> <div class="setting full field-mapper-setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.step.permitted_params.label'}}</label> <label>{{i18n "admin.wizard.step.permitted_params.label"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{wizard-mapper {{wizard-mapper
inputs=step.permitted_params inputs=step.permitted_params
options=(hash options=(hash
pairConnector='set' pairConnector="set"
inputTypes='association' inputTypes="association"
keyPlaceholder='admin.wizard.param_key' keyPlaceholder="admin.wizard.param_key"
valuePlaceholder='admin.wizard.submission_key' valuePlaceholder="admin.wizard.submission_key"
context='step' context="step"
)}} )}}
</div> </div>
</div> </div>
<div class="setting"> <div class="setting">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.translation'}}</label> <label>{{i18n "admin.wizard.translation"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input {{input

Datei anzeigen

@ -1,14 +1,14 @@
<div class="wizard-header medium">{{{i18n header}}}</div> <div class="wizard-header medium">{{html-safe (i18n header)}}</div>
<div class="link-list"> <div class="link-list">
{{#if anyLinks}} {{#if anyLinks}}
{{#each links as |l|}} {{#each links as |l|}}
<div data-id='{{l.id}}'> <div data-id={{l.id}}>
{{d-button action="change" actionParam=l.id translatedLabel=l.label class=l.classes}} {{d-button action="change" actionParam=l.id translatedLabel=l.label class=l.classes}}
{{d-button action='remove' actionParam=l.id icon='times' class='remove'}} {{d-button action="remove" actionParam=l.id icon="times" class="remove"}}
</div> </div>
{{/each}} {{/each}}
{{/if}} {{/if}}
{{d-button action='add' label='admin.wizard.add' icon='plus'}} {{d-button action="add" label="admin.wizard.add" icon="plus"}}
</div> </div>

Datei anzeigen

@ -15,13 +15,13 @@
last=pair.last last=pair.last
inputType=inputType inputType=inputType
options=options options=options
removePair=(action 'removePair') removePair=(action "removePair")
onUpdate=onUpdate}} onUpdate=onUpdate}}
{{/each}} {{/each}}
{{#if canAddPair}} {{#if canAddPair}}
<a {{action 'addPair'}} class="add-pair"> <a role="button" {{action "addPair"}} class="add-pair">
{{d-icon 'plus'}} {{d-icon "plus"}}
</a> </a>
{{/if}} {{/if}}
</div> </div>
@ -40,7 +40,7 @@
<div class="output mapper-block"> <div class="output mapper-block">
{{wizard-mapper-selector {{wizard-mapper-selector
selectorType='output' selectorType="output"
inputType=input.type inputType=input.type
value=input.output value=input.output
activeType=input.output_type activeType=input.output_type
@ -49,6 +49,6 @@
</div> </div>
{{/if}} {{/if}}
<a class="remove-input" {{action remove input}}> <a role="button" class="remove-input" {{action remove input}}>
{{d-icon 'times'}} {{d-icon "times"}}
</a> </a>

Datei anzeigen

@ -1,6 +1,6 @@
<div class="key mapper-block"> <div class="key mapper-block">
{{wizard-mapper-selector {{wizard-mapper-selector
selectorType='key' selectorType="key"
inputType=inputType inputType=inputType
value=pair.key value=pair.key
activeType=pair.key_type activeType=pair.key_type
@ -18,7 +18,7 @@
<div class="value mapper-block"> <div class="value mapper-block">
{{wizard-mapper-selector {{wizard-mapper-selector
selectorType='value' selectorType="value"
inputType=inputType inputType=inputType
value=pair.value value=pair.value
activeType=pair.value_type activeType=pair.value_type
@ -31,5 +31,5 @@
{{/if}} {{/if}}
{{#if showRemove}} {{#if showRemove}}
<a {{action removePair pair}} class="remove-pair">{{d-icon 'times'}}</a> <a role="button" {{action removePair pair}} class="remove-pair">{{d-icon "times"}}</a>
{{/if}} {{/if}}

Datei anzeigen

@ -1,6 +1,6 @@
<div class="type-selector"> <div class="type-selector">
{{#if hasTypes}} {{#if hasTypes}}
<a {{action "toggleTypes"}} class="active"> <a role="button" {{action "toggleTypes"}} class="active">
{{activeTypeLabel}} {{activeTypeLabel}}
</a> </a>
@ -10,7 +10,7 @@
{{wizard-mapper-selector-type {{wizard-mapper-selector-type
activeType=activeType activeType=activeType
item=item item=item
toggle=(action 'toggleType')}} toggle=(action "toggleType")}}
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}
@ -66,7 +66,7 @@
{{#if showUser}} {{#if showUser}}
{{user-selector {{user-selector
includeMessageableGroups='true' includeMessageableGroups="true"
placeholderKey=placeholderKey placeholderKey=placeholderKey
usernames=value usernames=value
autocomplete="discourse" autocomplete="discourse"

Datei anzeigen

@ -3,18 +3,18 @@
{{wizard-mapper-connector {{wizard-mapper-connector
connector=input.connector connector=input.connector
connectorType="input" connectorType="input"
onUpdate=(action 'inputUpdated')}} onUpdate=(action "inputUpdated")}}
{{/if}} {{/if}}
{{wizard-mapper-input {{wizard-mapper-input
input=input input=input
options=inputOptions options=inputOptions
remove=(action 'remove') remove=(action "remove")
onUpdate=(action 'inputUpdated')}} onUpdate=(action "inputUpdated")}}
{{/each}} {{/each}}
{{#if canAdd}} {{#if canAdd}}
<span class="add-mapper-input"> <span class="add-mapper-input">
{{d-button action='add' label='admin.wizard.add' icon='plus'}} {{d-button action="add" label="admin.wizard.add" icon="plus"}}
</span> </span>
{{/if}} {{/if}}

Datei anzeigen

@ -2,13 +2,13 @@
{{#if showIcon}} {{#if showIcon}}
{{d-icon icon}} {{d-icon icon}}
{{/if}} {{/if}}
<span class="message-content">{{{message}}}</span> <span class="message-content">{{html-safe message}}</span>
{{#if hasItems}} {{#if hasItems}}
<ul> <ul>
{{#each items as |item|}} {{#each items as |item|}}
<li> <li>
<span>{{d-icon item.icon}}</span> <span>{{d-icon item.icon}}</span>
<span>{{{item.html}}}</span> <span>{{html-safe item.html}}</span>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
@ -17,9 +17,9 @@
{{#if showDocumentation}} {{#if showDocumentation}}
<div class="message-block"> <div class="message-block">
{{d-icon 'question-circle'}} {{d-icon "question-circle"}}
<a href={{url}} target="_blank"> <a href={{url}} target="_blank" rel="noopener noreferrer">
{{documentation}} {{documentation}}
</a> </a>
</div> </div>

Datei anzeigen

@ -1,28 +1,28 @@
<h3>{{i18n 'admin.wizard.field.validations.header'}}</h3> <h3>{{i18n "admin.wizard.field.validations.header"}}</h3>
<ul> <ul>
{{#each-in field.validations as |type props|}} {{#each-in field.validations as |type props|}}
<li> <li>
<span class="setting-title"> <span class="setting-title">
<h4>{{i18n (concat 'admin.wizard.field.validations.' type)}}</h4> <h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
{{input type="checkbox" checked=props.status}} {{input type="checkbox" checked=props.status}}
{{i18n 'admin.wizard.field.validations.enabled'}} {{i18n "admin.wizard.field.validations.enabled"}}
</span> </span>
<div class="validation-container"> <div class="validation-container">
<div class="validation-section"> <div class="validation-section">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.validations.categories'}}</label> <label>{{i18n "admin.wizard.field.validations.categories"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{category-selector {{category-selector
categories=(get this (concat 'validationBuffer.' type '.categories')) categories=(get this (concat "validationBuffer." type ".categories"))
onChange=(action 'updateValidationCategories' type props) onChange=(action "updateValidationCategories" type props)
class="wizard"}} class="wizard"}}
</div> </div>
</div> </div>
<div class="validation-section"> <div class="validation-section">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.validations.max_topic_age'}}</label> <label>{{i18n "admin.wizard.field.validations.max_topic_age"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{input type="number" class="time-n-value" value=props.time_n_value}} {{input type="number" class="time-n-value" value=props.time_n_value}}
@ -35,13 +35,13 @@
</div> </div>
<div class="validation-section"> <div class="validation-section">
<div class="setting-label"> <div class="setting-label">
<label>{{i18n 'admin.wizard.field.validations.position'}}</label> <label>{{i18n "admin.wizard.field.validations.position"}}</label>
</div> </div>
<div class="setting-value"> <div class="setting-value">
{{radio-button name=(concat type field.id) value="above" selection=props.position}} {{radio-button name=(concat type field.id) value="above" selection=props.position}}
{{i18n 'admin.wizard.field.validations.above'}} {{i18n "admin.wizard.field.validations.above"}}
{{radio-button name=(concat type field.id) value="below" selection=props.position}} {{radio-button name=(concat type field.id) value="below" selection=props.position}}
{{i18n 'admin.wizard.field.validations.below'}} {{i18n "admin.wizard.field.validations.below"}}
</div> </div>
</div> </div>
</div> </div>

Datei anzeigen

@ -18,20 +18,20 @@
{{#if showPopover}} {{#if showPopover}}
<div class="wizard-editor-gutter-popover"> <div class="wizard-editor-gutter-popover">
<label> <label>
{{i18n 'admin.wizard.action.post_builder.user_properties'}} {{i18n "admin.wizard.action.post_builder.user_properties"}}
{{userPropertyList}} {{userPropertyList}}
</label> </label>
{{#if hasWizardFields}} {{#if hasWizardFields}}
<label> <label>
{{i18n 'admin.wizard.action.post_builder.wizard_fields'}} {{i18n "admin.wizard.action.post_builder.wizard_fields"}}
{{wizardFieldList}} {{wizardFieldList}}
</label> </label>
{{/if}} {{/if}}
{{#if hasWizardActions}} {{#if hasWizardActions}}
<label> <label>
{{i18n 'admin.wizard.action.post_builder.wizard_actions'}} {{i18n "admin.wizard.action.post_builder.wizard_actions"}}
{{wizardActionList}} {{wizardActionList}}
</label> </label>
{{/if}} {{/if}}

Datei anzeigen

@ -3,7 +3,7 @@
{{component validation.component field=field type=type validation=validation}} {{component validation.component field=field type=type validation=validation}}
{{/each-in}} {{/each-in}}
{{yield (hash perform=(action 'perform') autocomplete="off")}} {{yield (hash perform=(action "perform") autocomplete="off")}}
{{#each-in field.validations.below as |type validation|}} {{#each-in field.validations.below as |type validation|}}
{{component validation.component field=field type=type validation=validation}} {{component validation.component field=field type=type validation=validation}}

Datei anzeigen

@ -25,8 +25,8 @@
{{#if showHyperlinkBox}} {{#if showHyperlinkBox}}
{{wizard-composer-hyperlink {{wizard-composer-hyperlink
addLink=(action 'addLink') addLink=(action "addLink")
hideBox=(action 'hideBox')}} hideBox=(action "hideBox")}}
{{/if}} {{/if}}
{{#if isUploading}} {{#if isUploading}}

Datei anzeigen

@ -2,20 +2,20 @@
<h3>{{wizard-i18n "composer.link_dialog_title"}}</h3> <h3>{{wizard-i18n "composer.link_dialog_title"}}</h3>
{{input {{input
class="composer-link-name" class="composer-link-name"
placeholder=(wizard-i18n 'composer.link_optional_text') placeholder=(wizard-i18n "composer.link_optional_text")
type="text" type="text"
value=linkName}} value=linkName}}
{{input {{input
class="composer-link-url" class="composer-link-url"
placeholder=(wizard-i18n 'composer.link_url_placeholder') placeholder=(wizard-i18n "composer.link_url_placeholder")
type="text" type="text"
value=linkUrl}} value=linkUrl}}
{{d-button {{d-button
label="wizard_composer.modal_ok" label="wizard_composer.modal_ok"
class="add-link btn-primary" class="add-link btn-primary"
click=(action 'addLink')}} click=(action "addLink")}}
{{d-button {{d-button
label="wizard_composer.modal_cancel" label="wizard_composer.modal_cancel"
class="hide-hyperlink-box btn-danger" class="hide-hyperlink-box btn-danger"
click=(action 'hideBox')}} click=(action "hideBox")}}
</div> </div>

Datei anzeigen

@ -1,15 +1,15 @@
<div class='d-editor-overlay hidden'></div> <div class="d-editor-overlay hidden"></div>
<div class='d-editor-container'> <div class="d-editor-container">
{{#if showPreview}} {{#if showPreview}}
<div class="d-editor-preview-wrapper {{if forcePreview 'force-preview'}}"> <div class="d-editor-preview-wrapper {{if forcePreview "force-preview"}}">
<div class="d-editor-preview"> <div class="d-editor-preview">
{{{preview}}} {{html-safe preview}}
</div> </div>
</div> </div>
{{else}} {{else}}
<div class="d-editor-textarea-wrapper"> <div class="d-editor-textarea-wrapper">
<div class='d-editor-button-bar'> <div class="d-editor-button-bar">
{{#each toolbar.groups as |group|}} {{#each toolbar.groups as |group|}}
{{#each group.buttons as |b|}} {{#each group.buttons as |b|}}
{{#if b.popupMenu}} {{#if b.popupMenu}}
@ -24,7 +24,7 @@
)}} )}}
{{else}} {{else}}
<div>{{d.icon}}</div> <div>{{d.icon}}</div>
<button class='wizard-btn {{b.className}}' {{action b.action b}} title="{{b.title}}"> <button class="wizard-btn {{b.className}}" {{action b.action b}} title={{b.title}} type="button">
{{d-icon b.icon}} {{d-icon b.icon}}
{{#if b.label}} {{#if b.label}}
<span class="d-button-label">{{wizard-i18n b.label}}</span> <span class="d-button-label">{{wizard-i18n b.label}}</span>
@ -34,7 +34,7 @@
{{/each}} {{/each}}
{{#unless group.lastGroup}} {{#unless group.lastGroup}}
<div class='d-editor-spacer'></div> <div class="d-editor-spacer"></div>
{{/unless}} {{/unless}}
{{/each}} {{/each}}
</div> </div>

Datei anzeigen

@ -1 +1 @@
{{input type='checkbox' id=field.id checked=field.value tabindex=field.tabindex}} {{input type="checkbox" id=field.id checked=field.value tabindex=field.tabindex}}

Datei anzeigen

@ -8,11 +8,11 @@
afterRefresh=(action "afterRefresh")}} afterRefresh=(action "afterRefresh")}}
<div class="bottom-bar"> <div class="bottom-bar">
<button class='wizard-btn toggle-preview' {{action 'togglePreview'}}> <button class="wizard-btn toggle-preview" {{action "togglePreview"}} type="button">
<span class="d-button-label">{{wizard-i18n togglePreviewLabel}}</span> <span class="d-button-label">{{wizard-i18n togglePreviewLabel}}</span>
</button> </button>
{{#if field.char_counter}} {{#if field.char_counter}}
{{char-counter field.value field.max_length}} {{char-counter field.value field.max_length}}
{{/if}} {{/if}}
</div> </div>

Datei anzeigen

@ -6,5 +6,5 @@
tabindex=field.tabindex tabindex=field.tabindex
onChange=(action (mut field.value)) onChange=(action (mut field.value))
options=(hash options=(hash
none='group.select' none="group.select"
)}} )}}

Datei anzeigen

@ -1 +1 @@
{{input type='number' step='0.01' id=field.id value=field.value tabindex=field.tabindex}} {{input type="number" step="0.01" id=field.id value=field.value tabindex=field.tabindex}}

Datei anzeigen

@ -1,4 +1,4 @@
<label class="wizard-btn wizard-btn-upload-file {{if uploading 'disabled'}}" tabindex="{{field.tabindex}}"> <label class="wizard-btn wizard-btn-upload-file {{if uploading "disabled"}}" tabindex={{field.tabindex}}>
{{#if uploading}} {{#if uploading}}
{{wizard-i18n "wizard.uploading"}} {{wizard-i18n "wizard.uploading"}}
{{else}} {{else}}
@ -6,13 +6,13 @@
{{d-icon "upload"}} {{d-icon "upload"}}
{{/if}} {{/if}}
<input disabled={{uploading}} type="file" accept="{{field.file_types}}" style="visibility: hidden; position: absolute;" /> <input disabled={{uploading}} type="file" accept={{field.file_types}} style="visibility: hidden; position: absolute;" >
</label> </label>
{{#if field.value}} {{#if field.value}}
{{#unless isImage}} {{#if isImage}}
{{field.value.original_filename}}
{{else}}
<img src={{field.value.url}} class="wizard-image-preview"> <img src={{field.value.url}} class="wizard-image-preview">
{{/unless}} {{else}}
{{field.value.original_filename}}
{{/if}}
{{/if}} {{/if}}

Datei anzeigen

@ -1 +1 @@
{{input type='text' id=field.id value=field.value tabindex=field.tabindex}} {{input type="text" id=field.id value=field.value tabindex=field.tabindex}}

Datei anzeigen

@ -1,18 +1,18 @@
<label for={{field.id}} class="field-label"> <label for={{field.id}} class="field-label">
{{{field.label}}} {{html-safe field.label}}
</label> </label>
{{#if field.image}} {{#if field.image}}
<div class="field-image"><img src="{{field.image}}"></div> <div class="field-image"><img src={{field.image}}></div>
{{/if}} {{/if}}
{{#if field.description}} {{#if field.description}}
<div class='field-description'>{{cookedDescription}}</div> <div class="field-description">{{cookedDescription}}</div>
{{/if}} {{/if}}
{{#field-validators field=field as |validators|}} {{#field-validators field=field as |validators|}}
{{#if inputComponentName}} {{#if inputComponentName}}
<div class='input-area'> <div class="input-area">
{{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard autocomplete=validators.autocomplete}} {{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard autocomplete=validators.autocomplete}}
</div> </div>
{{/if}} {{/if}}
@ -25,5 +25,5 @@
{{/if}} {{/if}}
{{#if field.errorDescription}} {{#if field.errorDescription}}
<div class='field-error-description'>{{{field.errorDescription}}}</div> <div class="field-error-description">{{html-safe field.errorDescription}}</div>
{{/if}} {{/if}}

Datei anzeigen

@ -1,7 +1,7 @@
<div>{{text}}</div> <div>{{text}}</div>
<div class="no-access-gutter"> <div class="no-access-gutter">
<button class='wizard-btn primary return-to-site' {{action 'skip'}}> <button class="wizard-btn primary return-to-site" {{action "skip"}} type="button">
{{wizard-i18n 'wizard.return_to_site' siteName=siteName}} {{wizard-i18n "wizard.return_to_site" siteName=siteName}}
{{d-icon "sign-out-alt"}} {{d-icon "sign-out-alt"}}
</button> </button>
</div> </div>

Datei anzeigen

@ -1,4 +1,4 @@
<a href="{{topic.url}}" target="_blank"> <a href={{topic.url}} target="_blank" rel="noopener noreferrer">
<span class="title">{{html-safe topic.fancy_title}}</span> <span class="title">{{html-safe topic.fancy_title}}</span>
<div class="blurb">{{date-node topic.created_at}} - {{html-safe topic.blurb}}</div> <div class="blurb">{{date-node topic.created_at}} - {{html-safe topic.blurb}}</div>
</a> </a>

Datei anzeigen

@ -5,7 +5,7 @@
{{/each}} {{/each}}
</ul> </ul>
{{else}} {{else}}
<a class="show-topics" {{action "toggleShowTopics"}}> <a role="button" class="show-topics" {{action "toggleShowTopics"}}>
{{wizard-i18n 'realtime_validations.similar_topics.show'}} {{wizard-i18n "realtime_validations.similar_topics.show"}}
</a> </a>
{{/if}} {{/if}}

Datei anzeigen

@ -1,6 +1,6 @@
<div class='wizard-step-contents'> <div class="wizard-step-contents">
{{#if step.title}} {{#if step.title}}
<h1 class='wizard-step-title'>{{cookedTitle}}</h1> <h1 class="wizard-step-title">{{cookedTitle}}</h1>
{{/if}} {{/if}}
{{#if bannerImage}} {{#if bannerImage}}
@ -10,46 +10,46 @@
{{/if}} {{/if}}
{{#if step.description}} {{#if step.description}}
<div class='wizard-step-description'>{{cookedDescription}}</div> <div class="wizard-step-description">{{cookedDescription}}</div>
{{/if}} {{/if}}
{{#wizard-step-form step=step}} {{#wizard-step-form step=step}}
{{#each step.fields as |field index|}} {{#each step.fields as |field|}}
{{wizard-field field=field step=step wizard=wizard}} {{wizard-field field=field step=step wizard=wizard}}
{{/each}} {{/each}}
{{/wizard-step-form}} {{/wizard-step-form}}
</div> </div>
<div class='wizard-step-footer'> <div class="wizard-step-footer">
<div class='wizard-progress'> <div class="wizard-progress">
<div class='white'></div> <div class="white"></div>
<div class='black' style={{barStyle}}></div> <div class="black" style={{barStyle}}></div>
<div class='screen'></div> <div class="screen"></div>
<span>{{wizard-i18n "wizard.step" current=step.displayIndex total=wizard.totalSteps}}</span> <span>{{wizard-i18n "wizard.step" current=step.displayIndex total=wizard.totalSteps}}</span>
</div> </div>
<div class='wizard-buttons'> <div class="wizard-buttons">
{{#if saving}} {{#if saving}}
{{loading-spinner size='small'}} {{loading-spinner size="small"}}
{{else}} {{else}}
{{#if showQuitButton}} {{#if showQuitButton}}
<a href {{action "quit"}} class='action-link quit' tabindex="{{secondaryButtonIndex}}">{{wizard-i18n "wizard.quit"}}</a> <a href {{action "quit"}} class="action-link quit" tabindex={{secondaryButtonIndex}}>{{wizard-i18n "wizard.quit"}}</a>
{{/if}} {{/if}}
{{#if showBackButton}} {{#if showBackButton}}
<a href {{action "backStep"}} class='action-link back' tabindex="{{secondaryButtonIndex}}">{{wizard-i18n "wizard.back"}}</a> <a href {{action "backStep"}} class="action-link back" tabindex={{secondaryButtonIndex}}>{{wizard-i18n "wizard.back"}}</a>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if showNextButton}} {{#if showNextButton}}
<button class='wizard-btn next primary' {{action "nextStep"}} disabled={{saving}} tabindex="{{primaryButtonIndex}}"> <button type="button" class="wizard-btn next primary" {{action "nextStep"}} disabled={{saving}} tabindex={{primaryButtonIndex}}>
{{wizard-i18n "wizard.next"}} {{wizard-i18n "wizard.next"}}
{{d-icon "chevron-right"}} {{d-icon "chevron-right"}}
</button> </button>
{{/if}} {{/if}}
{{#if showDoneButton}} {{#if showDoneButton}}
<button class='wizard-btn done' {{action "done"}} disabled={{saving}} tabindex="{{primaryButtonIndex}}"> <button type="button" class="wizard-btn done" {{action "done"}} disabled={{saving}} tabindex={{primaryButtonIndex}}>
{{wizard-i18n "wizard.done"}} {{wizard-i18n "wizard.done"}}
</button> </button>
{{/if}} {{/if}}

Datei anzeigen

@ -2,15 +2,15 @@
{{wizard-canvas}} {{wizard-canvas}}
{{/if}} {{/if}}
<div class='wizard-column'> <div class="wizard-column">
<div class='wizard-column-contents'> <div class="wizard-column-contents">
{{outlet}} {{outlet}}
</div> </div>
<div class='wizard-footer'> <div class="wizard-footer">
{{#if customWizard}} {{#if customWizard}}
<img src="{{logoUrl}}" style="background-image: initial; width: 33px; height: 33px;"/> <img src={{logoUrl}} style="background-image: initial; width: 33px; height: 33px;" >
{{else}} {{else}}
<div class='discourse-logo'></div> <div class="discourse-logo"></div>
{{/if}} {{/if}}
</div> </div>
</div> </div>

Datei anzeigen

@ -1,14 +1,14 @@
{{#if noWizard}} {{#if noWizard}}
{{wizard-no-access text=(wizard-i18n 'wizard.none') wizardId=wizardId}} {{wizard-no-access text=(wizard-i18n "wizard.none") wizardId=wizardId}}
{{else}} {{else}}
{{#if requiresLogin}} {{#if requiresLogin}}
{{wizard-no-access text=(wizard-i18n 'wizard.requires_login') wizardId=wizardId}} {{wizard-no-access text=(wizard-i18n "wizard.requires_login") wizardId=wizardId}}
{{else}} {{else}}
{{#if notPermitted}} {{#if notPermitted}}
{{wizard-no-access text=(wizard-i18n 'wizard.not_permitted') wizardId=wizardId}} {{wizard-no-access text=(wizard-i18n "wizard.not_permitted") wizardId=wizardId}}
{{else}} {{else}}
{{#if completed}} {{#if completed}}
{{wizard-no-access text=(wizard-i18n 'wizard.completed') wizardId=wizardId}} {{wizard-no-access text=(wizard-i18n "wizard.completed") wizardId=wizardId}}
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/if}} {{/if}}

Datei anzeigen

@ -4,8 +4,8 @@
{{stepMessage.text}} {{stepMessage.text}}
</div> </div>
{{#if showReset}} {{#if showReset}}
<a class="reset-wizard" {{action "resetWizard"}}> <a role="button" class="reset-wizard" {{action "resetWizard"}}>
{{wizard-i18n 'wizard.reset'}} {{wizard-i18n "wizard.reset"}}
</a> </a>
{{/if}} {{/if}}
</div> </div>

Datei anzeigen

@ -46,7 +46,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
& > .input-area { .input-area {
order: 0; order: 0;
margin: 15px 20px !important; margin: 15px 20px !important;

Datei anzeigen

@ -309,15 +309,15 @@ class CustomWizard::Action
return return
end end
groups = group_map.reduce([]) do |groups, g| groups = group_map.reduce([]) do |result, g|
begin begin
groups.push(Integer(g)) result.push(Integer(g))
rescue ArgumentError rescue ArgumentError
group = Group.find_by(name: g) group = Group.find_by(name: g)
groups.push(group.id) if group result.push(group.id) if group
end end
groups result
end end
result = nil result = nil

Datei anzeigen

@ -74,7 +74,7 @@ class CustomWizard::Api::Endpoint
headers["Authorization"] = auth_string if auth_string headers["Authorization"] = auth_string if auth_string
headers["Content-Type"] = content_type if content_type headers["Content-Type"] = content_type if content_type
connection = Excon.new(URI.parse(URI.encode(endpoint.url)).to_s, headers: headers) connection = Excon.new(UrlHelper.encode_and_parse(endpoint.url), headers: headers)
params = { method: endpoint.method } params = { method: endpoint.method }

10
package.json Normale Datei
Datei anzeigen

@ -0,0 +1,10 @@
{
"name": "discourse-custom-wizard",
"version": "1.0.0",
"repository": "git@github.com:paviliondev/discourse-custom-wizard.git",
"author": "Discourse",
"license": "MIT",
"devDependencies": {
"eslint-config-discourse": "^1.1.8"
}
}

Datei anzeigen

@ -1,3 +1,4 @@
# frozen_string_literal: true
require_relative '../../plugin_helper' require_relative '../../plugin_helper'
describe CustomWizard::Action do describe CustomWizard::Action do
@ -147,8 +148,8 @@ describe CustomWizard::Action do
end end
it 'encodes special characters in the title and body' do it 'encodes special characters in the title and body' do
open_composer['title'][0]['output'] = "Title that's special $" open_composer['title'][0]['output'] = "Title that's special $".dup
open_composer['post_template'] = "Body & more body & more body" open_composer['post_template'] = "Body & more body & more body".dup
wizard = CustomWizard::Wizard.new(@template, user) wizard = CustomWizard::Wizard.new(@template, user)

Datei anzeigen

@ -1,3 +1,4 @@
# frozen_string_literal: true
require_relative '../../plugin_helper' require_relative '../../plugin_helper'
describe CustomWizard::Builder do describe CustomWizard::Builder do

Datei anzeigen

@ -5,7 +5,6 @@ require_relative '../../../plugin_helper'
describe ::CustomWizard::RealtimeValidation::SimilarTopics do describe ::CustomWizard::RealtimeValidation::SimilarTopics do
let(:post) { create_post(title: "matching similar topic") } let(:post) { create_post(title: "matching similar topic") }
let(:topic) { post.topic } let(:topic) { post.topic }
let(:user) { post.user }
let(:category) { Fabricate(:category) } let(:category) { Fabricate(:category) }
let(:cat_post) { create_post(title: "matching similar topic slightly different", category: category) } let(:cat_post) { create_post(title: "matching similar topic slightly different", category: category) }

Datei anzeigen

@ -185,7 +185,7 @@ describe CustomWizard::Wizard do
).to eq('I am a user submission') ).to eq('I am a user submission')
end end
context do context "class methods" do
before do before do
CustomWizard::Template.save(@permitted_template, skip_jobs: true) CustomWizard::Template.save(@permitted_template, skip_jobs: true)

Datei anzeigen

@ -19,6 +19,6 @@ describe InvitesControllerCustomWizard, type: :request do
template['after_signup'] = true template['after_signup'] = true
CustomWizard::Template.save(template, skip_jobs: true) CustomWizard::Template.save(template, skip_jobs: true)
put "/invites/show/#{invite.invite_key}.json" put "/invites/show/#{invite.invite_key}.json"
expect(response.parsed_body["redirect_to"]).to eq("/w/super-mega-fun-wizard") expect(cookies[:destination_url]).to eq("/w/super-mega-fun-wizard")
end end
end end