[Movecommons-commits] r610 - trunk/src
Mario Gallegos
mgallegos at ourproject.org
Fri Mar 15 18:16:49 CET 2013
Author: mgallegos
Date: 2013-03-15 18:16:49 +0100 (Fri, 15 Mar 2013)
New Revision: 610
Modified:
trunk/src/mc-dia-form2.js
Log:
IN PROGRESS - Enhancement #488:Save registrations in CSV or similar
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2013-03-14 23:19:49 UTC (rev 609)
+++ trunk/src/mc-dia-form2.js 2013-03-15 17:16:49 UTC (rev 610)
@@ -463,91 +463,90 @@
function createInitiativeXml(){
if($j('#np-checkbox').val()=='S'){
- nonProfitXml="<INITIATIVE_NON_PROFIT>YES</INITIATIVE_NON_PROFIT>";
+ nonProfitXml="<INITIATIVE_NON_PROFIT>YES</INITIATIVE_NON_PROFIT>\n";
if($j("#registered-non-profit").attr("checked"))
- nonProfitXml+="<WE_ARE_OFFICIALLY_REGISTERED>"+xmlReplaceInvalidCharacters($j("#non-profit-website").val())+"</WE_ARE_OFFICIALLY_REGISTERED>";
+ nonProfitXml+="<WE_ARE_OFFICIALLY_REGISTERED>"+xmlReplaceInvalidCharacters($j("#non-profit-website").val())+"</WE_ARE_OFFICIALLY_REGISTERED>\n";
if($j("#open-accounting").attr("checked"))
- nonProfitXml+="<WE_HAVE_WEBPAGE_WHERE_OUR_ACCOUNTING_IS_PUBLIC>"+xmlReplaceInvalidCharacters($j("#open-accounting-website").val())+"</WE_HAVE_WEBPAGE_WHERE_OUR_ACCOUNTING_IS_PUBLIC>";
+ nonProfitXml+="<WE_HAVE_WEBPAGE_WHERE_OUR_ACCOUNTING_IS_PUBLIC>"+xmlReplaceInvalidCharacters($j("#open-accounting-website").val())+"</WE_HAVE_WEBPAGE_WHERE_OUR_ACCOUNTING_IS_PUBLIC>\n";
if($j("#accept-donations").attr("checked"))
- nonProfitXml+="<WE_HAVE_A_WEBPAGE_TO_RECEIVE_ONLINE_DONATIONS>"+xmlReplaceInvalidCharacters($j("#donation-website").val())+"</WE_HAVE_A_WEBPAGE_TO_RECEIVE_ONLINE_DONATIONS>";
+ nonProfitXml+="<WE_HAVE_A_WEBPAGE_TO_RECEIVE_ONLINE_DONATIONS>"+xmlReplaceInvalidCharacters($j("#donation-website").val())+"</WE_HAVE_A_WEBPAGE_TO_RECEIVE_ONLINE_DONATIONS>\n";
}else{
- nonProfitXml="<INITIATIVE_NON_PROFIT>NO</INITIATIVE_NON_PROFIT>";
+ nonProfitXml="<INITIATIVE_NON_PROFIT>NO</INITIATIVE_NON_PROFIT>\n";
}
if($j('#rp-checkbox').val()=='S'){
- reproducibleXml="<INITIATIVE_REPRODUCIBLE>YES</INITIATIVE_REPRODUCIBLE>";
+ reproducibleXml="<INITIATIVE_REPRODUCIBLE>YES</INITIATIVE_REPRODUCIBLE>\n";
if($j("#terms-of-use").attr("checked"))
- reproducibleXml+="<WE_HAVE_TERMS_OF_USE_OF_OUR_CONTENTS>"+xmlReplaceInvalidCharacters($j("#terms-of-use-website").val())+"</WE_HAVE_TERMS_OF_USE_OF_OUR_CONTENTS>";
+ reproducibleXml+="<WE_HAVE_TERMS_OF_USE_OF_OUR_CONTENTS>"+xmlReplaceInvalidCharacters($j("#terms-of-use-website").val())+"</WE_HAVE_TERMS_OF_USE_OF_OUR_CONTENTS>\n";
if($j("#creative-commons").attr("checked"))
- reproducibleXml+="<CREATIVE_COMMONS_LICENSE_FOR_SHARING_OUR_CONTENT>"+xmlReplaceInvalidCharacters($j("#creative-commons-website").val())+"</CREATIVE_COMMONS_LICENSE_FOR_SHARING_OUR_CONTENT>";
+ reproducibleXml+="<CREATIVE_COMMONS_LICENSE_FOR_SHARING_OUR_CONTENT>"+xmlReplaceInvalidCharacters($j("#creative-commons-website").val())+"</CREATIVE_COMMONS_LICENSE_FOR_SHARING_OUR_CONTENT>\n";
if($j("#other-license").attr("checked"))
- reproducibleXml+="<OTHER_LICENSE_FOR_SHARING_OUR_CONTENT>"+xmlReplaceInvalidCharacters($j("#other-license-website").val())+"</OTHER_LICENSE_FOR_SHARING_OUR_CONTENT>";
- reproducibleXml+="<WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>";
+ reproducibleXml+="<OTHER_LICENSE_FOR_SHARING_OUR_CONTENT>"+xmlReplaceInvalidCharacters($j("#other-license-website").val())+"</OTHER_LICENSE_FOR_SHARING_OUR_CONTENT>\n";
+ reproducibleXml+="<WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>\n";
if($j("#organization-structure").attr("checked"))
- reproducibleXml+="<OUR_ORGANIZATION>YES</OUR_ORGANIZATION>";
+ reproducibleXml+="<OUR_ORGANIZATION>YES</OUR_ORGANIZATION>\n";
else
- reproducibleXml+="<OUR_ORGANIZATION>NO</OUR_ORGANIZATION>";
+ reproducibleXml+="<OUR_ORGANIZATION>NO</OUR_ORGANIZATION>\n";
if($j("#internal-procedures").attr("checked"))
- reproducibleXml+="<OUR_INTERNAL_PROCEDURES>YES</OUR_INTERNAL_PROCEDURES>";
+ reproducibleXml+="<OUR_INTERNAL_PROCEDURES>YES</OUR_INTERNAL_PROCEDURES>\n";
else
- reproducibleXml+="<OUR_INTERNAL_PROCEDURES>NO</OUR_INTERNAL_PROCEDURES>";
+ reproducibleXml+="<OUR_INTERNAL_PROCEDURES>NO</OUR_INTERNAL_PROCEDURES>\n";
if($j("#list-members").attr("checked"))
- reproducibleXml+="<OUR_LIST_OF_MEMBERS>YES</OUR_LIST_OF_MEMBERS>";
+ reproducibleXml+="<OUR_LIST_OF_MEMBERS>YES</OUR_LIST_OF_MEMBERS>\n";
else
- reproducibleXml+="<OUR_LIST_OF_MEMBERS>NO</OUR_LIST_OF_MEMBERS>";
+ reproducibleXml+="<OUR_LIST_OF_MEMBERS>NO</OUR_LIST_OF_MEMBERS>\n";
if($j("#funding-sources").attr("checked"))
- reproducibleXml+="<OUR_FUNDING_SOURCES>YES</OUR_FUNDING_SOURCES>";
+ reproducibleXml+="<OUR_FUNDING_SOURCES>YES</OUR_FUNDING_SOURCES>\n";
else
- reproducibleXml+="<OUR_FUNDING_SOURCES>NO</OUR_FUNDING_SOURCES>";
- reproducibleXml+="</WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>";
+ reproducibleXml+="<OUR_FUNDING_SOURCES>NO</OUR_FUNDING_SOURCES>\n";
+ reproducibleXml+="</WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>\n";
}else{
- reproducibleXml="<INITIATIVE_REPRODUCIBLE>NO</INITIATIVE_REPRODUCIBLE>";
+ reproducibleXml="<INITIATIVE_REPRODUCIBLE>NO</INITIATIVE_REPRODUCIBLE>\n";
}
if($j('#gr-checkbox').val()=='S'){
- grassrootsXml="<INITIATIVE_GRASSROOTS>YES</INITIATIVE_GRASSROOTS>";
+ grassrootsXml="<INITIATIVE_GRASSROOTS>YES</INITIATIVE_GRASSROOTS>\n";
if($j("#decisions-general-assemblies").attr("checked"))
- grassrootsXml+="<WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>YES</WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>";
+ grassrootsXml+="<WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>YES</WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>\n";
else
- grassrootsXml+="<WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>NO</WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>";
+ grassrootsXml+="<WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>NO</WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>\n";
if($j("#representatives-democratically").attr("checked"))
- grassrootsXml+="<WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>YES</WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>";
+ grassrootsXml+="<WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>YES</WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>\n";
else
- grassrootsXml+="<WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>NO</WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>";
+ grassrootsXml+="<WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>NO</WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>\n";
if($j("#decisions-voting").attr("checked"))
- grassrootsXml+="<WE_TAKE_DECISIONS_THROUGH>MAJORITY_VOTING</WE_TAKE_DECISIONS_THROUGH>";
+ grassrootsXml+="<WE_TAKE_DECISIONS_THROUGH>MAJORITY_VOTING</WE_TAKE_DECISIONS_THROUGH>\n";
else if ($j("#decisions-consensus").attr("checked"))
- grassrootsXml+="<WE_TAKE_DECISIONS_THROUGH>CONSENSUS</WE_TAKE_DECISIONS_THROUGH>";
+ grassrootsXml+="<WE_TAKE_DECISIONS_THROUGH>CONSENSUS</WE_TAKE_DECISIONS_THROUGH>\n";
}else{
- grassrootsXml="<INITIATIVE_GRASSROOTS>NO</INITIATIVE_GRASSROOTS>";
+ grassrootsXml="<INITIATIVE_GRASSROOTS>NO</INITIATIVE_GRASSROOTS>\n";
}
if($j('#rc-checkbox').val()=='S'){
- reinforceCommonsXml="<INITIATIVE_REINFORCE_THE_COMMONS>YES</INITIATIVE_REINFORCE_THE_COMMONS>";
+ reinforceCommonsXml="<INITIATIVE_REINFORCE_THE_COMMONS>YES</INITIATIVE_REINFORCE_THE_COMMONS>\n";
if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rcec60.png')
- reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>NATURE_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>";
+ reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>NATURE_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>\n";
else if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rcbo60.png')
- reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>BODY_HEALTH_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>";
+ reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>BODY_HEALTH_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>\n";
else if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rcto60.png')
- reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>TOWN_COMMUNITY_SOCIETY_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>";
+ reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>TOWN_COMMUNITY_SOCIETY_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>\n";
else
- reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>DIGITAL_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>";
+ reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>DIGITAL_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>\n";
}else{
- reinforceCommonsXml="<INITIATIVE_REINFORCE_THE_COMMONS>YES</INITIATIVE_REINFORCE_THE_COMMONS>";
+ reinforceCommonsXml="<INITIATIVE_REINFORCE_THE_COMMONS>YES</INITIATIVE_REINFORCE_THE_COMMONS>\n";
}
- xmlDoc = "<INITIATIVE>"
- +"<NAME>"+xmlReplaceInvalidCharacters($j("#ininame").val())+"</NAME>"+
- +"<WEB_ADDRESS>"+xmlReplaceInvalidCharacters($j("#url").val())+"</WEB_ADDRESS>"+
- +"<LANGUAGES>"+xmlReplaceInvalidCharacters($j("#languages").val())+"</LANGUAGES>"+
- +"<KEYWORDS>"+xmlReplaceInvalidCharacters($j("#keywords").val())+"</KEYWORDS>"+
- +"<LOCATIONS>"+xmlReplaceInvalidCharacters($j("#location").val())+"</LOCATIONS>"+
- +nonProfitXml+
- +reproducibleXml+
- +grassrootsXml+
- +reinforceCommonsXml+
- "</INITIATIVE>";
-
+ xmlDoc = "<INITIATIVE>\n"
+ +"<NAME>"+xmlReplaceInvalidCharacters($j("#ininame").val())+"</NAME>\n"+
+ "<WEB_ADDRESS>"+xmlReplaceInvalidCharacters($j("#url").val())+"</WEB_ADDRESS>\n"+
+ "<LANGUAGES>"+xmlReplaceInvalidCharacters($j("#languages").val())+"</LANGUAGES>\n"+
+ "<KEYWORDS>"+xmlReplaceInvalidCharacters($j("#keywords").val())+"</KEYWORDS>\n"+
+ "<LOCATIONS>"+xmlReplaceInvalidCharacters($j("#location").val())+"</LOCATIONS>\n"+
+ nonProfitXml+"\n"+
+ reproducibleXml+"\n"+
+ grassrootsXml+"\n"+
+ reinforceCommonsXml+"\n"+
+ "</INITIATIVE>";
alert(xmlDoc);
}
More information about the Movecommons-commits
mailing list