This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/flag.js.handlebars
2013-02-06 11:47:08 +11:00

37 lines
1.4 KiB
Handlebars

<div class="modal-body">
{{#if view.post.flagsAvailable}}
<form>
{{#each view.post.flagsAvailable}}
<div class='controls'>
<label class='radio'>
<input type='radio' id="radio_{{unbound name_key}}" {{action changePostActionType this target="view"}} name='post_action_type_index'> <strong>{{name}}</strong>
{{#if is_custom_flag}}
{{#unless view.isCustomFlag}}
<div class='description'>{{{description}}}</div>
{{/unless}}
{{else}}
{{#if description}}
<div class='description'>{{{description}}}</div>
{{/if}}
{{/if}}
</label>
{{#if is_custom_flag}}
{{#if view.isCustomFlag}}
{{view Ember.TextArea name="message" class="flag-message" placeholderBinding="view.customPlaceholder" valueBinding="view.customFlagMessage"}}
<div {{bindAttr class="view.customMessageLengthClasses"}}>{{view.customMessageLength}}</div>
{{/if}}
{{/if}}
</div>
{{/each}}
</form>
{{else}}
{{i18n flagging.cant}}
{{/if}}
</div>
{{#if view.showSubmit}}
<div class="modal-footer">
<button class='btn btn-primary' {{action createFlag target="view"}}>{{i18n flagging.action}}</button>
</div>
{{/if}}