Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#153 add option to indicate mandatory/optional for additional fields #198

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/main/webapp/WEB-INF/templates/event/assign-ticket-form.ms
Original file line number Diff line number Diff line change
Expand Up @@ -85,32 +85,40 @@
<div {{#displayAssignForm}}class="collapsible"{{/displayAssignForm}}>
{{#ticketFieldConfiguration}}
<div class="form-group">
<label class="col-sm-3 control-label" for="{{key.name}}-title-{{uuid}}">{{key.labelDescription}}</label>
<label class="col-sm-3 control-label" for="{{key.name}}-title-{{uuid}}">{{key.labelDescription}}
{{#key.isRequired}}*{{/key.isRequired}}
</label>
<div class="col-sm-9">
{{#key.inputField}}
<input type="{{key.inputType}}" name="additional['{{key.name}}']" value="{{value}}" id="{{key.name}}-title-{{uuid}}" class="form-control"
{{#key.placeholderDescriptionDefined}}placeholder="{{key.placeholderDescription}}"{{/key.placeholderDescriptionDefined}}
{{#key.maxLengthDefined}}maxlength="{{key.maxLength}}"{{/key.maxLengthDefined}}
{{#key.minLengthDefined}}minlength="{{key.minLength}}"{{/key.minLengthDefined}}
{{#key.isRequired}}required{{/key.isRequired}}
>
{{/key.inputField}}
{{#key.textareaField}}
<textarea name="additional['{{key.name}}']" id="{{key.name}}-{{uuid}}" class="form-control"
{{#key.placeholderDescriptionDefined}}placeholder="{{key.placeholderDescription}}"{{/key.placeholderDescriptionDefined}}
{{#key.maxLengthDefined}}maxlength="{{key.maxLength}}"{{/key.maxLengthDefined}}
{{#key.minLengthDefined}}minlength="{{key.minLength}}"{{/key.minLengthDefined}}
>{{value}}</textarea>
{{#key.isRequired}}required{{/key.isRequired}}
>{{value}}</textarea>
{{/key.textareaField}}
{{#key.countryField}}
<select name="additional['{{key.name}}']" value="{{value}}" id="{{key.name}}-{{uuid}}" class="form-control">
<select name="additional['{{key.name}}']" value="{{value}}" id="{{key.name}}-{{uuid}}" class="form-control"
{{#key.isRequired}}required{{/key.isRequired}}
>
<option value=""></option>
{{#countries}}
<option value="{{left}}">{{right}}</option>
{{/countries}}
</select>
{{/key.countryField}}
{{#key.selectField}}
<select name="additional['{{key.name}}']" value="{{value}}" id="{{key.name}}-{{uuid}}" class="form-control">
<select name="additional['{{key.name}}']" value="{{value}}" id="{{key.name}}-{{uuid}}" class="form-control"
{{#key.isRequired}}required{{/key.isRequired}}
>
<option value=""></option>
{{#key.translatedRestrictedValue}}<option value="{{key}}">{{value}}</option>{{/key.translatedRestrictedValue}}
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ <h5 class="text-muted">Here are the additional fields defined</h5>
<div ng-if="!edit">{{field.description[lang.locale].description.placeholder}}</div>
<input ng-if="edit" type="text" class="form-control" ng-model="toEdit.description[lang.locale].description.placeholder">
</div>
</div>
<div class="form-group">
<label>Required</label>
<div>{{field.required}}</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ <h5 class="text-muted">Here you can add/remove additional fields</h5>
<label>Placeholder {{lang.displayLanguage}}</label>
<input ng-model="field.description[lang.locale].placeholder" type="text" placeholder="placeholder" class="form-control">
</div>
</div>
<div class="form-group">
<label>Required</label>
<input type="checkbox" data-ng-model="field.required" name="fieldRequired" id="fieldRequired">
</div>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ <h3>Add field</h3>
<label>Placeholder {{lang.displayLanguage}}</label>
<input ng-model="field.description[lang.locale].placeholder" type="text" placeholder="placeholder" class="form-control">
</div>
<div class="form-group">
<label>Required</label>
<input type="checkbox" data-ng-model="field.required" name="fieldRequired" id="fieldRequired">
</div>
</div>
</div>
</div>
Expand Down