mailtrain/server/views/subscription/partials/subscription-custom-fields.hbs

155 lines
5.5 KiB
Handlebars
Raw Normal View History

2017-03-19 12:36:57 +00:00
{{#each customFields}}
{{#if typeSubscriptionEmail}}
2017-03-19 12:36:57 +00:00
<div class="form-group email">
<label for="EMAIL">Email Address</label>
2017-03-19 12:36:57 +00:00
{{#if ../isManagePreferences}}
<div class="input-group">
<input type="email" name="EMAIL" id="email" placeholder="" value="{{../email}}" readonly>
<div class="input-group-addon"><a href="/subscription/{{../lcid}}/manage-address/{{../cid}}">want to change it?</a></div>
2017-03-19 12:36:57 +00:00
</div>
{{else}}
<input type="email" name="EMAIL" id="email" placeholder="" value="{{../email}}" required>
2017-03-19 12:36:57 +00:00
{{/if}}
</div>
{{/if}}
{{#if typeText}}
<div class="form-group text {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="text" name="{{key}}" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeNumber}}
<div class="form-group number {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="number" name="{{key}}" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeWebsite}}
<div class="form-group url {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="url" name="{{key}}" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeLongtext}}
<div class="form-group longtext {{key}}">
<label for="{{key}}">{{name}}</label>
<textarea rows="3" name="{{key}}">{{value}}</textarea>
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeJson}}
<div class="form-group json {{key}}">
<label for="{{key}}">{{name}}</label>
<textarea class="gpg-text" rows="3" name="{{key}}" placeholder="{&quot;data&quot;:&quot;value&quot;}">{{value}}</textarea>
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeGpg}}
<div class="form-group gpg {{key}}">
<label for="{{key}}">{{name}}</label>
2017-03-19 12:36:57 +00:00
{{#if ../hasPubkey}}
<button class="btn-download-pubkey" type="submit" form="download-pubkey">Download signature verification key</button>
2017-03-19 12:36:57 +00:00
{{/if}}
<textarea class="form-control gpg-text" rows="4" name="{{key}}" placeholder="Begins with &#39;-----BEGIN PGP PUBLIC KEY BLOCK-----&#39;">{{value}}</textarea>
2017-03-19 12:36:57 +00:00
<span class="help-block">
Insert your GPG public key here to encrypt messages sent to your address <em>(optional)</em>
2017-03-19 12:36:57 +00:00
</span>
</div>
{{/if}}
{{#if typeDateUs}}
<div class="form-group date fm-date-us {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="text" name="{{key}}" placeholder="MM/DD/YYYY" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeDateEur}}
<div class="form-group date fm-date-eur {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="text" name="{{key}}" placeholder="DD/MM/YYYY" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeBirthdayUs}}
<div class="form-group date fm-birthday-us {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="text" name="{{key}}" placeholder="MM/DD" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeBirthdayEur}}
<div class="form-group date fm-birthday-eur {{key}}">
<label for="{{key}}">{{name}}</label>
<input type="text" name="{{key}}" placeholder="DD/MM" value="{{value}}">
2017-03-19 12:36:57 +00:00
</div>
{{/if}}
{{#if typeDropdownGrouped }}
2017-03-19 12:36:57 +00:00
<div class="form-group dropdown {{key}}">
<label for="{{key}}">{{name}}</label>
<select name="{{key}}" class="form-control">
<option value="">
Select
2017-03-19 12:36:57 +00:00
</option>
{{#each options}}
<option value="{{key}}" {{#if value}} selected {{/if}}>{{name}}</option>
2017-03-19 12:36:57 +00:00
{{/each}}
</select>
</div>
{{/if}}
{{#if typeRadioGrouped}}
2017-03-19 12:36:57 +00:00
<div class="form-group radio {{key}}">
<label for="{{key}}">{{name}}</label>
{{#each options}}
<label class="label-radio">
<input type="radio" name="{{../key}}" value="{{key}}" {{#if value}} checked {{/if}}> {{name}}
2017-03-19 12:36:57 +00:00
</label>
{{/each}}
</div>
{{/if}}
{{#if typeCheckboxGrouped}}
2017-03-19 12:36:57 +00:00
<div class="form-group checkbox">
<label>{{name}}</label>
{{#each options}}
<label class="label-checkbox">
<input type="checkbox" name="{{key}}" value="1" {{#if value}} checked {{/if}}> {{name}}
</label>
{{/each}}
</div>
{{/if}}
{{#if typeDropdownEnum }}
<div class="form-group dropdown {{key}}">
<label for="{{key}}">{{name}}</label>
<select name="{{key}}" class="form-control">
<option value="">
Select
</option>
{{#each options}}
<option value="{{key}}" {{#if value}} selected {{/if}}>{{name}}</option>
{{/each}}
</select>
</div>
{{/if}}
{{#if typeRadioEnum}}
<div class="form-group radio {{key}}">
<label for="{{key}}">{{name}}</label>
{{#each options}}
<label class="label-radio">
<input type="radio" name="{{../key}}" value="{{key}}" {{#if value}} checked {{/if}}> {{name}}
2017-03-19 12:36:57 +00:00
</label>
{{/each}}
</div>
{{/if}}
{{/each}}