Merge pull request #953 from elitzer2/required-custom-fields
(v2) Required custom fields (client side validation only)
This commit is contained in:
commit
c3b968aa10
14 changed files with 52 additions and 30 deletions
|
@ -173,7 +173,7 @@ export default class CUD extends Component {
|
||||||
data.orderManageBefore = Number.parseInt(data.orderManageBefore) || data.orderManageBefore;
|
data.orderManageBefore = Number.parseInt(data.orderManageBefore) || data.orderManageBefore;
|
||||||
}
|
}
|
||||||
|
|
||||||
return filterData(data, ['name', 'help', 'key', 'default_value', 'type', 'group', 'settings',
|
return filterData(data, ['name', 'help', 'key', 'default_value', 'required', 'type', 'group', 'settings',
|
||||||
'orderListBefore', 'orderSubscribeBefore', 'orderManageBefore']);
|
'orderListBefore', 'orderSubscribeBefore', 'orderManageBefore']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,6 +187,7 @@ export default class CUD extends Component {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
key: '',
|
key: '',
|
||||||
default_value: '',
|
default_value: '',
|
||||||
|
required: false,
|
||||||
help: '',
|
help: '',
|
||||||
group: null,
|
group: null,
|
||||||
isInGroup: false,
|
isInGroup: false,
|
||||||
|
@ -513,6 +514,8 @@ export default class CUD extends Component {
|
||||||
|
|
||||||
<TextArea id="help" label={t('helpText')}/>
|
<TextArea id="help" label={t('helpText')}/>
|
||||||
|
|
||||||
|
<CheckBox id="required" label={t('requiredClientSideValidation')}/>
|
||||||
|
|
||||||
{fieldSettings}
|
{fieldSettings}
|
||||||
|
|
||||||
{type !== 'option' &&
|
{type !== 'option' &&
|
||||||
|
|
|
@ -44,6 +44,16 @@ label {
|
||||||
margin-left: .3em;
|
margin-left: .3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form button {
|
||||||
|
background: #2D3E4F;
|
||||||
|
color: white;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: normal;
|
||||||
|
padding: 16px 24px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
/* --- Inputs ------------- */
|
/* --- Inputs ------------- */
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"yourPersonalAccessToken": "Persönlicher Zugriffs-Token",
|
"yourPersonalAccessToken": "Persönlicher Zugriffs-Token",
|
||||||
"subscribersEmailAddress": "Abonnenten E-Mail-Adresse",
|
"subscribersEmailAddress": "Abonnenten E-Mail-Adresse",
|
||||||
"required": "benötigt",
|
"required": "benötigt",
|
||||||
|
"requiredClientSideValidation": "Erforderlich (nur clientseitige Validierung)",
|
||||||
"subscribersFirstName": "Abonnenten Vorname",
|
"subscribersFirstName": "Abonnenten Vorname",
|
||||||
"subscribersLastName": "Abonnenten Familienname",
|
"subscribersLastName": "Abonnenten Familienname",
|
||||||
"subscribersTimezoneEgEuropeTallinnPstOr": "Abonnenten Zeitzone (bsp. \"Europe/Tallinn\", \"PST\" oder \"UTC\"). Standardwert \"UTC\"",
|
"subscribersTimezoneEgEuropeTallinnPstOr": "Abonnenten Zeitzone (bsp. \"Europe/Tallinn\", \"PST\" oder \"UTC\"). Standardwert \"UTC\"",
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"yourPersonalAccessToken": "your personal access token",
|
"yourPersonalAccessToken": "your personal access token",
|
||||||
"subscribersEmailAddress": "subscriber's email address",
|
"subscribersEmailAddress": "subscriber's email address",
|
||||||
"required": "required",
|
"required": "required",
|
||||||
|
"requiredClientSideValidation": "Required (client-side validation only)",
|
||||||
"subscribersFirstName": "subscriber's first name",
|
"subscribersFirstName": "subscriber's first name",
|
||||||
"subscribersLastName": "subscriber's last name",
|
"subscribersLastName": "subscriber's last name",
|
||||||
"subscribersTimezoneEgEuropeTallinnPstOr": "subscriber's timezone (eg. \"Europe/Tallinn\", \"PST\" or \"UTC\"). If not set defaults to \"UTC\"",
|
"subscribersTimezoneEgEuropeTallinnPstOr": "subscriber's timezone (eg. \"Europe/Tallinn\", \"PST\" or \"UTC\"). If not set defaults to \"UTC\"",
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"yourPersonalAccessToken": "tu token de acceso personal",
|
"yourPersonalAccessToken": "tu token de acceso personal",
|
||||||
"subscribersEmailAddress": "email del suscriptor",
|
"subscribersEmailAddress": "email del suscriptor",
|
||||||
"required": "requerido",
|
"required": "requerido",
|
||||||
|
"requiredClientSideValidation": "Obligatorio (solo validación del lado del cliente)",
|
||||||
"subscribersFirstName": "nombre del suscriptor",
|
"subscribersFirstName": "nombre del suscriptor",
|
||||||
"subscribersLastName": "apellidos del suscriptor",
|
"subscribersLastName": "apellidos del suscriptor",
|
||||||
"subscribersTimezoneEgEuropeTallinnPstOr": "zona horaria del suscriptor (eg. \"Europe/Tallinn\", \"PST\" or \"UTC\"). Si no, asigna por defecto a \"UTC\"",
|
"subscribersTimezoneEgEuropeTallinnPstOr": "zona horaria del suscriptor (eg. \"Europe/Tallinn\", \"PST\" or \"UTC\"). Si no, asigna por defecto a \"UTC\"",
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"yourPersonalAccessToken": "votre jeton d'accès personnel",
|
"yourPersonalAccessToken": "votre jeton d'accès personnel",
|
||||||
"subscribersEmailAddress": "adresse e-mail de l'abonné",
|
"subscribersEmailAddress": "adresse e-mail de l'abonné",
|
||||||
"required": "obligatoire",
|
"required": "obligatoire",
|
||||||
|
"requiredClientSideValidation": "Obligatoire (validation côté client uniquement)",
|
||||||
"subscribersFirstName": "prénom de l'abonné",
|
"subscribersFirstName": "prénom de l'abonné",
|
||||||
"subscribersLastName": "nom de l'abonné",
|
"subscribersLastName": "nom de l'abonné",
|
||||||
"subscribersTimezoneEgEuropeTallinnPstOr": "fuseau horaire de l'abonné (par exemple. \"Europe / Tallinn\", \"PST\" ou \"UTC\"). S'il n'est pas défini par défaut sur \"UTC\"",
|
"subscribersTimezoneEgEuropeTallinnPstOr": "fuseau horaire de l'abonné (par exemple. \"Europe / Tallinn\", \"PST\" ou \"UTC\"). S'il n'est pas défini par défaut sur \"UTC\"",
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"yourPersonalAccessToken": "seu token de acesso pessoal",
|
"yourPersonalAccessToken": "seu token de acesso pessoal",
|
||||||
"subscribersEmailAddress": "endereço de e-mail do assinante",
|
"subscribersEmailAddress": "endereço de e-mail do assinante",
|
||||||
"required": "obrigatório",
|
"required": "obrigatório",
|
||||||
|
"requiredClientSideValidation": "Obrigatório (apenas validação do lado do cliente)",
|
||||||
"subscribersFirstName": "primeiro nome do assinante",
|
"subscribersFirstName": "primeiro nome do assinante",
|
||||||
"subscribersLastName": "sobrenome do assinante",
|
"subscribersLastName": "sobrenome do assinante",
|
||||||
"subscribersTimezoneEgEuropeTallinnPstOr": "Fuso horário do assinante (por exemplo, \"Europe/Tallinn\", \"PST\"ou \"UTC\"). Se não for definido será considerado \"UTC\"",
|
"subscribersTimezoneEgEuropeTallinnPstOr": "Fuso horário do assinante (por exemplo, \"Europe/Tallinn\", \"PST\"ou \"UTC\"). Se não for definido será considerado \"UTC\"",
|
||||||
|
|
|
@ -19,9 +19,8 @@ const { getMergeTagsForBases } = require('../../shared/templates');
|
||||||
const {ListActivityType} = require('../../shared/activity-log');
|
const {ListActivityType} = require('../../shared/activity-log');
|
||||||
const activityLog = require('../lib/activity-log');
|
const activityLog = require('../lib/activity-log');
|
||||||
|
|
||||||
|
const allowedKeysCreate = new Set(['name', 'help', 'key', 'default_value', 'required', 'type', 'group', 'settings']);
|
||||||
const allowedKeysCreate = new Set(['name', 'help', 'key', 'default_value', 'type', 'group', 'settings']);
|
const allowedKeysUpdate = new Set(['name', 'help', 'key', 'default_value', 'required', 'group', 'settings']);
|
||||||
const allowedKeysUpdate = new Set(['name', 'help', 'key', 'default_value', 'group', 'settings']);
|
|
||||||
const hashKeys = allowedKeysCreate;
|
const hashKeys = allowedKeysCreate;
|
||||||
|
|
||||||
const fieldTypes = {};
|
const fieldTypes = {};
|
||||||
|
@ -304,7 +303,7 @@ async function getById(context, listId, id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function listTx(tx, listId) {
|
async function listTx(tx, listId) {
|
||||||
return await tx('custom_fields').where({list: listId}).select(['id', 'name', 'type', 'help', 'key', 'column', 'settings', 'group', 'default_value', 'order_list', 'order_subscribe', 'order_manage']).orderBy(knex.raw('-order_list'), 'desc').orderBy('id', 'asc');
|
return await tx('custom_fields').where({list: listId}).select(['id', 'name', 'type', 'help', 'key', 'column', 'settings', 'group', 'default_value', 'required', 'order_list', 'order_subscribe', 'order_manage']).orderBy(knex.raw('-order_list'), 'desc').orderBy('id', 'asc');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function list(context, listId) {
|
async function list(context, listId) {
|
||||||
|
@ -664,6 +663,7 @@ function forHbsWithFieldsGrouped(fieldsGrouped, subscription) { // assumes group
|
||||||
help: fld.help,
|
help: fld.help,
|
||||||
field: fld,
|
field: fld,
|
||||||
[type.getHbsType(fld)]: true,
|
[type.getHbsType(fld)]: true,
|
||||||
|
required: fld.required,
|
||||||
order_subscribe: fld.order_subscribe,
|
order_subscribe: fld.order_subscribe,
|
||||||
order_manage: fld.order_manage
|
order_manage: fld.order_manage
|
||||||
};
|
};
|
||||||
|
@ -690,6 +690,7 @@ function forHbsWithFieldsGrouped(fieldsGrouped, subscription) { // assumes group
|
||||||
key: opt.key,
|
key: opt.key,
|
||||||
name: opt.name,
|
name: opt.name,
|
||||||
help: opt.help,
|
help: opt.help,
|
||||||
|
required: opt.required,
|
||||||
value: isEnabled
|
value: isEnabled
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -705,7 +706,8 @@ function forHbsWithFieldsGrouped(fieldsGrouped, subscription) { // assumes group
|
||||||
key: opt.key,
|
key: opt.key,
|
||||||
name: opt.label,
|
name: opt.label,
|
||||||
help: opt.help,
|
help: opt.help,
|
||||||
value: value === opt.key
|
value: value === opt.key,
|
||||||
|
required: fld.required
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
exports.up = (knex, Promise) => (async() => {
|
||||||
|
await knex.schema.table('custom_fields', function(t) {
|
||||||
|
t.boolean('required').notNull().defaultTo(0).after('default_value');
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
|
exports.down = (knex, Promise) => (async() => {
|
||||||
|
})();
|
|
@ -18,7 +18,7 @@
|
||||||
{{#if typeText}}
|
{{#if typeText}}
|
||||||
<div class="form-group text {{key}}">
|
<div class="form-group text {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="text" name="{{key}}" value="{{value}}">
|
<input type="text" name="{{key}}" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
{{#if typeNumber}}
|
{{#if typeNumber}}
|
||||||
<div class="form-group number {{key}}">
|
<div class="form-group number {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="number" name="{{key}}" value="{{value}}">
|
<input type="number" name="{{key}}" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
{{#if typeWebsite}}
|
{{#if typeWebsite}}
|
||||||
<div class="form-group url {{key}}">
|
<div class="form-group url {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="url" name="{{key}}" value="{{value}}">
|
<input type="url" name="{{key}}" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
{{#if typeLongtext}}
|
{{#if typeLongtext}}
|
||||||
<div class="form-group longtext {{key}}">
|
<div class="form-group longtext {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<textarea rows="3" name="{{key}}">{{value}}</textarea>
|
<textarea rows="3" name="{{key}}" {{#if required}} required {{/if}}>{{value}}</textarea>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
{{#if typeJson}}
|
{{#if typeJson}}
|
||||||
<div class="form-group json {{key}}">
|
<div class="form-group json {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<textarea class="gpg-text" rows="3" name="{{key}}" placeholder="{"data":"value"}">{{value}}</textarea>
|
<textarea class="gpg-text" rows="3" name="{{key}}" placeholder="{"data":"value"}" {{#if required}} required {{/if}}>{{value}}</textarea>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<div class="form-group checkbox">
|
<div class="form-group checkbox">
|
||||||
<label>{{name}}</label>
|
<label>{{name}}</label>
|
||||||
<label class="label-checkbox">
|
<label class="label-checkbox">
|
||||||
<input type="checkbox" name="{{key}}" value="1" {{#if value}} checked {{/if}}> {{field.settings.checkedLabel}}
|
<input type="checkbox" name="{{key}}" value="1" {{#if value}} checked {{/if}} {{#if required}} required {{/if}}> {{field.settings.checkedLabel}}
|
||||||
</label>
|
</label>
|
||||||
<input type="hidden" value="0" name="{{key}}">
|
<input type="hidden" value="0" name="{{key}}">
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
{{#if ../hasPubkey}}
|
{{#if ../hasPubkey}}
|
||||||
<button class="btn-download-pubkey" type="submit" form="download-pubkey">{{#translate}}downloadSignatureVerificationKey{{/translate}}</button>
|
<button class="btn-download-pubkey" type="submit" form="download-pubkey">{{#translate}}downloadSignatureVerificationKey{{/translate}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<textarea class="form-control gpg-text" rows="4" name="{{key}}" placeholder="{{#translate}}beginsWithAnd#39BeginPgpPublicKeyBloc{{/translate}}">{{value}}</textarea>
|
<textarea class="form-control gpg-text" rows="4" name="{{key}}" placeholder="{{#translate}}beginsWithAnd#39BeginPgpPublicKeyBloc{{/translate}}" {{#if required}} required {{/if}}>{{value}}</textarea>
|
||||||
<small class="form-text text-muted">{{#translate}}insertYourGpgPublicKeyHereToEncrypt{{/translate}}</small>
|
<small class="form-text text-muted">{{#translate}}insertYourGpgPublicKeyHereToEncrypt{{/translate}}</small>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
{{#if typeDateUs}}
|
{{#if typeDateUs}}
|
||||||
<div class="form-group date fm-date-us {{key}}">
|
<div class="form-group date fm-date-us {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="text" name="{{key}}" placeholder="MM/DD/YYYY" value="{{value}}">
|
<input type="text" name="{{key}}" placeholder="MM/DD/YYYY" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
{{#if typeDateEur}}
|
{{#if typeDateEur}}
|
||||||
<div class="form-group date fm-date-eur {{key}}">
|
<div class="form-group date fm-date-eur {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="text" name="{{key}}" placeholder="DD/MM/YYYY" value="{{value}}">
|
<input type="text" name="{{key}}" placeholder="DD/MM/YYYY" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
{{#if typeBirthdayUs}}
|
{{#if typeBirthdayUs}}
|
||||||
<div class="form-group date fm-birthday-us {{key}}">
|
<div class="form-group date fm-birthday-us {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="text" name="{{key}}" placeholder="MM/DD" value="{{value}}">
|
<input type="text" name="{{key}}" placeholder="MM/DD" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
{{#if typeBirthdayEur}}
|
{{#if typeBirthdayEur}}
|
||||||
<div class="form-group date fm-birthday-eur {{key}}">
|
<div class="form-group date fm-birthday-eur {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<input type="text" name="{{key}}" placeholder="DD/MM" value="{{value}}">
|
<input type="text" name="{{key}}" placeholder="DD/MM" value="{{value}}" {{#if required}} required {{/if}}>
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
{{#if typeDropdownGrouped }}
|
{{#if typeDropdownGrouped }}
|
||||||
<div class="form-group dropdown {{key}}">
|
<div class="form-group dropdown {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<select name="{{key}}" class="form-control">
|
<select name="{{key}}" class="form-control" {{#if required}} required {{/if}}>
|
||||||
<option value="">
|
<option value="">
|
||||||
{{#translate}}––Select ––{{/translate}}
|
{{#translate}}––Select ––{{/translate}}
|
||||||
</option>
|
</option>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
{{#each options}}
|
{{#each options}}
|
||||||
<label class="label-radio">
|
<label class="label-radio">
|
||||||
<input type="radio" name="{{../key}}" value="{{key}}" {{#if value}} checked {{/if}}> {{name}}
|
<input type="radio" name="{{../key}}" value="{{key}}" {{#if value}} checked {{/if}} {{#if required}} required {{/if}}> {{name}}
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
<label>{{name}}</label>
|
<label>{{name}}</label>
|
||||||
{{#each options}}
|
{{#each options}}
|
||||||
<label class="label-checkbox">
|
<label class="label-checkbox">
|
||||||
<input type="checkbox" name="{{key}}" value="1" {{#if value}} checked {{/if}}> {{name}}
|
<input type="checkbox" name="{{key}}" value="1" {{#if value}} checked {{/if}} {{#if required}} required {{/if}}> {{name}}
|
||||||
</label>
|
</label>
|
||||||
<small class="option-help-block form-text text-muted">{{help}}</small>
|
<small class="option-help-block form-text text-muted">{{help}}</small>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
{{#if typeDropdownEnum }}
|
{{#if typeDropdownEnum }}
|
||||||
<div class="form-group dropdown {{key}}">
|
<div class="form-group dropdown {{key}}">
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
<select name="{{key}}" class="form-control">
|
<select name="{{key}}" class="form-control" {{#if required}} required {{/if}}>
|
||||||
<option value="">
|
<option value="">
|
||||||
–– Select ––
|
–– Select ––
|
||||||
</option>
|
</option>
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
<label for="{{key}}">{{name}}</label>
|
<label for="{{key}}">{{name}}</label>
|
||||||
{{#each options}}
|
{{#each options}}
|
||||||
<label class="label-radio">
|
<label class="label-radio">
|
||||||
<input type="radio" name="{{../key}}" value="{{key}}" {{#if value}} checked {{/if}}> {{name}}
|
<input type="radio" name="{{../key}}" value="{{key}}" {{#if value}} checked {{/if}} {{#if required}} required {{/if}}> {{name}}
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<small class="form-text text-muted">{{help}}</small>
|
<small class="form-text text-muted">{{help}}</small>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
{{> subscription_custom_fields}}
|
{{> subscription_custom_fields}}
|
||||||
|
|
||||||
<button type="submit" style="position: absolute; top: -9999px; left: -9999px;">{{#translate}}updateProfile{{/translate}}</button>
|
<button type="submit">{{#translate}}updateProfile{{/translate}}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script src="/moment/moment.min.js"></script>
|
<script src="/moment/moment.min.js"></script>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
{{> subscription_custom_fields}}
|
{{> subscription_custom_fields}}
|
||||||
|
|
||||||
<button type="submit" style="position: absolute; top: -9999px; left: -9999px;">{{#translate}}subscribeToList{{/translate}}</button>
|
<button type="submit">{{#translate}}subscribeToList{{/translate}}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
<mj-text>
|
<mj-text>
|
||||||
{{> subscription_manage_form}}<!-- don't indent me! -->
|
{{> subscription_manage_form}}<!-- don't indent me! -->
|
||||||
</mj-text>
|
</mj-text>
|
||||||
<mj-button mj-class="button" href="#submit">
|
|
||||||
Update Profile
|
|
||||||
</mj-button>
|
|
||||||
<mj-text mj-class="p">
|
<mj-text mj-class="p">
|
||||||
<a href="/subscription/{{lcid}}/unsubscribe/{{cid}}">Unsubscribe</a>
|
<a href="/subscription/{{lcid}}/unsubscribe/{{cid}}">Unsubscribe</a>
|
||||||
</mj-text>
|
</mj-text>
|
||||||
|
|
|
@ -6,8 +6,5 @@
|
||||||
<mj-text>
|
<mj-text>
|
||||||
{{> subscription_subscribe_form}}<!-- don't indent me! -->
|
{{> subscription_subscribe_form}}<!-- don't indent me! -->
|
||||||
</mj-text>
|
</mj-text>
|
||||||
<mj-button mj-class="button" href="#submit">
|
|
||||||
Subscribe to list
|
|
||||||
</mj-button>
|
|
||||||
</mj-column>
|
</mj-column>
|
||||||
</mj-section>
|
</mj-section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue