Bunch of UX changes for polls builder.

This commit is contained in:
Guo Xiang Tan 2016-06-15 21:21:17 +08:00
parent 1c9519636c
commit fd91a8eee6
No known key found for this signature in database
GPG Key ID: 19C321C8952B0F72
3 changed files with 17 additions and 11 deletions

View File

@ -1,12 +1,12 @@
<div class="modal-body poll-ui-builder"> <div class="modal-body poll-ui-builder">
<form class="poll-ui-builder-form form-horizontal"> <form class="poll-ui-builder-form form-horizontal">
<div class="input-group"> <div class="input-group">
<label>{{i18n 'poll.ui_builder.poll_name.label'}}</label> <label class="input-group-label">{{i18n 'poll.ui_builder.poll_name.label'}}</label>
{{input name="poll-name" value=pollName placeholder=pollNamePlaceholder}} {{input name="poll-name" value=pollName placeholder=pollNamePlaceholder}}
</div> </div>
<div class="input-group"> <div class="input-group">
<label>{{i18n 'poll.ui_builder.poll_type.label'}}</label> <label class="input-group-label">{{i18n 'poll.ui_builder.poll_type.label'}}</label>
{{combo-box content=pollTypes {{combo-box content=pollTypes
value=pollType value=pollType
valueAttribute="value" valueAttribute="value"
@ -36,7 +36,7 @@
</div> </div>
<div class="input-group"> <div class="input-group">
<label for="poll-public"> <label>
{{input type='checkbox' checked=publicPoll}} {{input type='checkbox' checked=publicPoll}}
{{i18n "poll.ui_builder.poll_public.label"}} {{i18n "poll.ui_builder.poll_public.label"}}
</label> </label>
@ -46,12 +46,12 @@
<div class="input-group"> <div class="input-group">
<label>{{i18n 'poll.ui_builder.poll_options.label'}}</label> <label>{{i18n 'poll.ui_builder.poll_options.label'}}</label>
{{input-tip validation=minNumOfOptionsValidation}} {{input-tip validation=minNumOfOptionsValidation}}
{{d-editor value=pollOptions}} {{textarea value=pollOptions}}
</div> </div>
{{/unless}} {{/unless}}
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
{{d-button action="insertPoll" class='btn-primary' label='poll.ui_builder.insert' disabled=disableInsert}} {{d-button action="insertPoll" icon="bar-chart-o" class='btn-primary' label='poll.ui_builder.insert' disabled=disableInsert}}
</div> </div>

View File

@ -1,4 +1,6 @@
.poll-ui-builder-form { .poll-ui-builder-form {
margin: 0px;
.input-group { .input-group {
padding: 10px; padding: 10px;
} }
@ -8,6 +10,11 @@
display: inline; display: inline;
} }
.input-group-label {
display: inline-block;
width: 45px;
}
.combobox { .combobox {
margin-right: 5px; margin-right: 5px;
} }

View File

@ -72,14 +72,13 @@ en:
ui_builder: ui_builder:
title: Poll Builder title: Poll Builder
insert: Insert Poll insert: Insert Poll
reset: Reset Poll
help: help:
options_count: You must provide a minimum of 2 options. options_count: You must provide a minimum of 2 options.
poll_name: poll_name:
label: Poll Name label: Name
placeholder: Enter Poll Name placeholder: Enter Name
poll_type: poll_type:
label: Poll Type label: Type
regular: regular regular: regular
multiple: multiple multiple: multiple
number: number number: number
@ -88,6 +87,6 @@ en:
min: Min min: Min
step: Step step: Step
poll_public: poll_public:
label: Make Public Poll label: Show who voted
poll_options: poll_options:
label: "Poll Choices: (one option per line)" label: Enter one poll option per line