-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added UI for "force subscription" acording to #7
- Loading branch information
Showing
7 changed files
with
67 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,18 @@ | |
.field | ||
= f.label :title | ||
= f.text_field :title, :class => 'required w60' | ||
|
||
.field | ||
= f.label :description | ||
%p This is an internal description of the Poll, it will not be sent to your users | ||
= f.text_area :description, :class => 'w60', :rows => 5 | ||
|
||
|
||
.field | ||
= f.label :welcome_message | ||
= f.label :force_subscription, "#{f.radio_button(:force_subscription, true)} Force subscription".html_safe, value: true | ||
%p Select this options <b>only</b> if you have explicit permission from the respondents to participate in your poll with their mobile phones. | ||
|
||
.field | ||
= f.label :force_subscription, "#{f.radio_button(:force_subscription, false)} Welcome message".html_safe, value: false | ||
%p This message will be sent to all respondents asking them if they agree to participate in the poll | ||
= f.text_area :welcome_message, :size => "28x5", :maxlength => 140, :class => 'required ux-wajbar w60', :readonly => [email protected]? | ||
.field | ||
|
@@ -31,7 +34,7 @@ | |
= f.label :goodbye_message | ||
%p This message will be sent to respondents when they complete the poll | ||
= f.text_area :goodbye_message, :size => "28x5", :maxlength => 140, :class => 'ux-wajbar w60' | ||
|
||
%hr | ||
|
||
= render :partial => 'form_questions', :locals => {f:f} | ||
|
@@ -45,4 +48,4 @@ | |
= grey_button _("Next") | ||
- else | ||
= grey_button _("Save") | ||
= white_link_to _("Cancel"), back_path | ||
= white_link_to _("Cancel"), back_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddForceSubscriptionToPolls < ActiveRecord::Migration | ||
def change | ||
add_column :polls, :force_subscription, :boolean, default: false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters