@ -103,7 +103,6 @@ define([
} ;
} ;
var saveAndCancelOptions = function ( cb ) {
var saveAndCancelOptions = function ( cb ) {
Messages . form _preview _button = "Preview" ; // XXX
var cancelBlock = h ( 'button.btn.btn-default.cp-form-preview-button' , [
var cancelBlock = h ( 'button.btn.btn-default.cp-form-preview-button' , [
h ( 'i.fa.fa-eye' ) ,
h ( 'i.fa.fa-eye' ) ,
Messages . form _preview _button
Messages . form _preview _button
@ -988,7 +987,6 @@ define([
} ) ;
} ) ;
Messages . form _type _section = "Conditional section" ; // XXX
var STATIC _TYPES = {
var STATIC _TYPES = {
md : {
md : {
defaultOpts : {
defaultOpts : {
@ -1161,8 +1159,6 @@ define([
} ) . filter ( Boolean ) ;
} ) . filter ( Boolean ) ;
return values ;
return values ;
} ;
} ;
Messages . form _conditional _add = "Add condition OR" ; // XXX
Messages . form _conditional _addAnd = "Add condition AND" ; // XXX
var addCondition = h ( 'button.btn.btn-secondary' , [
var addCondition = h ( 'button.btn.btn-secondary' , [
h ( 'i.fa.fa-plus' ) ,
h ( 'i.fa.fa-plus' ) ,
h ( 'span' , Messages . form _conditional _add )
h ( 'span' , Messages . form _conditional _add )
@ -1182,9 +1178,6 @@ define([
} ;
} ;
var values = getConditionsValues ( ) ;
var values = getConditionsValues ( ) ;
getConditions = function ( $container , isNew , rules , condition , $btn ) {
getConditions = function ( $container , isNew , rules , condition , $btn ) {
Messages . form _condition _q = "Choose a question" ; // XXX
Messages . form _condition _v = "Choose a value" ; // XXX
condition = condition || { } ;
condition = condition || { } ;
condition . uid = condition . uid || Util . uid ( ) ;
condition . uid = condition . uid || Util . uid ( ) ;
@ -1239,10 +1232,6 @@ define([
qSelect = UIElements . createDropdown ( qConfig ) ;
qSelect = UIElements . createDropdown ( qConfig ) ;
qSelect [ 0 ] . dropdown = qSelect ;
qSelect [ 0 ] . dropdown = qSelect ;
$ ( qSelect ) . attr ( 'data-drop' , 'q' ) ;
$ ( qSelect ) . attr ( 'data-drop' , 'q' ) ;
Messages . form _condition _is = 'is' ; // XXX
Messages . form _condition _isnot = 'is not' ; // XXX
Messages . form _condition _has = 'has' ; // XXX
Messages . form _condition _hasnot = 'has not' ; // XXX
var isOn = ! condition || condition . is !== 0 ;
var isOn = ! condition || condition . is !== 0 ;
var iOptions = [ {
var iOptions = [ {
@ -1400,7 +1389,6 @@ define([
if ( tmp . type === 'q' ) { qSelect . click ( ) ; }
if ( tmp . type === 'q' ) { qSelect . click ( ) ; }
else if ( tmp . type === 'i' ) { iSelect . click ( ) ; }
else if ( tmp . type === 'i' ) { iSelect . click ( ) ; }
} ;
} ;
Messages . form _conditional = "Only show this section when:" ; // XXX
var conditionalDiv = h ( 'div.cp-form-conditional' , [
var conditionalDiv = h ( 'div.cp-form-conditional' , [
h ( 'div.cp-form-conditional-hint' , Messages . form _conditional ) ,
h ( 'div.cp-form-conditional-hint' , Messages . form _conditional ) ,
@ -1421,7 +1409,6 @@ define([
} ;
} ;
redraw ( ) ;
redraw ( ) ;
Messages . form _condition _hint = "To make this section conditional, please add a choice or checkbox question above it." ; // XXX
var hintDiv = h ( 'div.cp-form-conditional-hint' , [
var hintDiv = h ( 'div.cp-form-conditional-hint' , [
h ( 'div.cp-form-conditional-hint' , Messages . form _condition _hint )
h ( 'div.cp-form-conditional-hint' , Messages . form _condition _hint )
] ) ;
] ) ;
@ -2775,7 +2762,6 @@ define([
return key && key . slice ( 0 , 1 ) !== "_" ;
return key && key . slice ( 0 , 1 ) !== "_" ;
} ) . length ;
} ) . length ;
} ;
} ;
Messages . form _results = "Responses ({0})" ; // XXX update key
var addResultsButton = function ( framework , content , answers ) {
var addResultsButton = function ( framework , content , answers ) {
var $container = $ ( '.cp-forms-results-participant' ) ;
var $container = $ ( '.cp-forms-results-participant' ) ;
var l = getAnswersLength ( answers ) ;
var l = getAnswersLength ( answers ) ;
@ -2826,9 +2812,6 @@ define([
return logo ;
return logo ;
} ;
} ;
Messages . form _alreadyAnswered = "You've responded to this form on {0}" ; // XXX
Messages . form _editAnswer = "Edit my responses" ; // XXX
Messages . form _viewAnswer = "View my responses" ; // XXX
var showAnsweredPage = function ( framework , content , answers ) {
var showAnsweredPage = function ( framework , content , answers ) {
var $formContainer = $ ( 'div.cp-form-creator-content' ) . hide ( ) ;
var $formContainer = $ ( 'div.cp-form-creator-content' ) . hide ( ) ;
var $resContainer = $ ( 'div.cp-form-creator-results' ) . hide ( ) ;
var $resContainer = $ ( 'div.cp-form-creator-results' ) . hide ( ) ;
@ -2865,7 +2848,6 @@ define([
if ( answers . _time ) { APP . lastAnswerTime = answers . _time ; }
if ( answers . _time ) { APP . lastAnswerTime = answers . _time ; }
Messages . form _viewAllAnswers = "View all responses ({0})" ; // XXX
// If responses are public, show button to view them
// If responses are public, show button to view them
var responses ;
var responses ;
if ( content . answers . privateKey ) {
if ( content . answers . privateKey ) {
@ -2924,9 +2906,6 @@ define([
return results ;
return results ;
} ;
} ;
Messages . form _anonAnswer = "All answers to this form are anonymous" ; // XXX
Messages . form _authAnswer = "You can't answer anonymously to this form" ; // XXX
var getSectionFromQ = function ( content , uid ) {
var getSectionFromQ = function ( content , uid ) {
var arr = content . order ;
var arr = content . order ;
var idx = content . order . indexOf ( uid ) ;
var idx = content . order . indexOf ( uid ) ;
@ -3141,7 +3120,6 @@ define([
reset = undefined ;
reset = undefined ;
}
}
Messages . form _requiredWarning = "These questions need an answer:" ; // XXX
var errors = h ( 'div.cp-form-invalid-warning' ) ;
var errors = h ( 'div.cp-form-invalid-warning' ) ;
var $errors = $ ( errors ) ;
var $errors = $ ( errors ) ;
var invalid = h ( 'div.cp-form-invalid-warning' ) ;
var invalid = h ( 'div.cp-form-invalid-warning' ) ;
@ -3432,10 +3410,6 @@ define([
return ;
return ;
}
}
// XXX
Messages . form _required _answer = "Answer: " ;
Messages . form _required _on = "Required" ;
Messages . form _required _off = "Optional" ;
var requiredTag ;
var requiredTag ;
if ( block . opts && block . opts . required ) {
if ( block . opts && block . opts . required ) {
requiredTag = h ( 'span.cp-form-required-tag' , Messages . form _required _on ) ;
requiredTag = h ( 'span.cp-form-required-tag' , Messages . form _required _on ) ;
@ -3454,12 +3428,8 @@ define([
APP . formBlocks . push ( data ) ;
APP . formBlocks . push ( data ) ;
Messages . form _preview = "Preview:" ; // XXX
var previewDiv = h ( 'div.cp-form-preview' , Messages . form _preview ) ;
var previewDiv = h ( 'div.cp-form-preview' , Messages . form _preview ) ;
Messages . form _required _answer = "Answer: " ;
Messages . form _required _on = "required" ;
Messages . form _required _off = "optional" ;
// Required radio displayed only for types that have an "isEmpty" function
// Required radio displayed only for types that have an "isEmpty" function
var requiredDiv ;
var requiredDiv ;
if ( APP . isEditor && ! isStatic && data . isEmpty ) {
if ( APP . isEditor && ! isStatic && data . isEmpty ) {
@ -3628,8 +3598,6 @@ define([
onEdit ( temp [ uid ] ) ;
onEdit ( temp [ uid ] ) ;
}
}
Messages . form _changeTypeConfirm = "Select the new type of this question and click OK." ; // XXX
Messages . form _corruptAnswers = "Changing the type may corrupt existing answers" ;
if ( Array . isArray ( model . compatible ) ) {
if ( Array . isArray ( model . compatible ) ) {
changeType = h ( 'div.cp-form-block-type.editable' , [
changeType = h ( 'div.cp-form-block-type.editable' , [
model . icon . cloneNode ( ) ,
model . icon . cloneNode ( ) ,
@ -3972,8 +3940,6 @@ define([
}
}
var makeFormSettings = function ( ) {
var makeFormSettings = function ( ) {
Messages . form _preview = "Preview form" ; // XXX
Messages . form _geturl = "Copy link" ; // XXX
var previewBtn = h ( 'button.btn.btn-primary' , [
var previewBtn = h ( 'button.btn.btn-primary' , [
h ( 'i.fa.fa-eye' ) ,
h ( 'i.fa.fa-eye' ) ,
Messages . form _preview
Messages . form _preview
@ -3993,7 +3959,6 @@ define([
} ) ;
} ) ;
} ) ;
} ) ;
Messages . form _makePublicWarning = "Are you sure you want to make responses to this form public? Past and future responses will be visible by participants. This cannot be undone." ; // XXX existing key
// Private / public status
// Private / public status
var resultsType = h ( 'div.cp-form-results-type-container' ) ;
var resultsType = h ( 'div.cp-form-results-type-container' ) ;
var $results = $ ( resultsType ) ;
var $results = $ ( resultsType ) ;
@ -4025,9 +3990,6 @@ define([
var $responseMsg = $ ( responseMsg ) ;
var $responseMsg = $ ( responseMsg ) ;
var refreshResponse = function ( ) {
var refreshResponse = function ( ) {
$responseMsg . empty ( ) ;
$responseMsg . empty ( ) ;
Messages . form _updateMsg = "Update submit message" ; // XXX 4.11.0
Messages . form _addMsg = "Add submit message" ; // XXX 4.11.0
Messages . form _responseMsg = "This message will be displayed after participants submit the form." ; // XXX 4.11.0
var text = content . answers . msg ? Messages . form _updateMsg : Messages . form _addMsg ;
var text = content . answers . msg ? Messages . form _updateMsg : Messages . form _addMsg ;
var btn = h ( 'button.btn.btn-secondary' , text ) ;
var btn = h ( 'button.btn.btn-secondary' , text ) ;
$ ( btn ) . click ( function ( ) {
$ ( btn ) . click ( function ( ) {
@ -4099,7 +4061,6 @@ define([
refreshResponse ( ) ;
refreshResponse ( ) ;
// Make answers anonymous
// Make answers anonymous
Messages . form _makeAnon = "Anonymize responses" ; // XXX
var anonContainer = h ( 'div.cp-form-anon-container' ) ;
var anonContainer = h ( 'div.cp-form-anon-container' ) ;
var $anon = $ ( anonContainer ) ;
var $anon = $ ( anonContainer ) ;
var refreshAnon = function ( ) {
var refreshAnon = function ( ) {
@ -4121,7 +4082,6 @@ define([
refreshAnon ( ) ;
refreshAnon ( ) ;
// XXX UPDATE KEYS "form_anonyous_on", "form_anonymous_off" and "form_anonymous"
// XXX UPDATE KEYS "form_anonyous_on", "form_anonymous_off" and "form_anonymous"
Messages . form _anonymous = "Guest access (not logged in)" ; // XXX existing key
// Allow guest(anonymous) answers
// Allow guest(anonymous) answers
var privacyContainer = h ( 'div.cp-form-privacy-container' ) ;
var privacyContainer = h ( 'div.cp-form-privacy-container' ) ;
var $privacy = $ ( privacyContainer ) ;
var $privacy = $ ( privacyContainer ) ;
@ -4152,7 +4112,6 @@ define([
refreshPrivacy ( ) ;
refreshPrivacy ( ) ;
// Allow responses edition
// Allow responses edition
Messages . form _editable = "Editing after submit" ; // XXX
var editableContainer = h ( 'div.cp-form-editable-container' ) ;
var editableContainer = h ( 'div.cp-form-editable-container' ) ;
var $editable = $ ( editableContainer ) ;
var $editable = $ ( editableContainer ) ;
var refreshEditable = function ( ) {
var refreshEditable = function ( ) {