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">
<form class="poll-ui-builder-form form-horizontal">
<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}}
</div>
<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
value=pollType
valueAttribute="value"
@ -36,7 +36,7 @@
</div>
<div class="input-group">
<label for="poll-public">
<label>
{{input type='checkbox' checked=publicPoll}}
{{i18n "poll.ui_builder.poll_public.label"}}
</label>
@ -46,12 +46,12 @@
<div class="input-group">
<label>{{i18n 'poll.ui_builder.poll_options.label'}}</label>
{{input-tip validation=minNumOfOptionsValidation}}
{{d-editor value=pollOptions}}
{{textarea value=pollOptions}}
</div>
{{/unless}}
</form>
</div>
<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>

View File

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

View File

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