[Movecommons-commits] r605 - in trunk: src wp-theme
Mario Gallegos
mgallegos at ourproject.org
Thu Mar 14 23:43:27 CET 2013
Author: mgallegos
Date: 2013-03-14 23:43:26 +0100 (Thu, 14 Mar 2013)
New Revision: 605
Modified:
trunk/src/mc-dia-form2.js
trunk/wp-theme/mc2-form.php
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 05:29:19 UTC (rev 604)
+++ trunk/src/mc-dia-form2.js 2013-03-14 22:43:26 UTC (rev 605)
@@ -462,7 +462,7 @@
function createInitiativeXml(){
if($j('#np-checkbox').val()=='S'){
- nonProfitXml="<NON_PROFIT>YES</NON_PROFIT>";
+ nonProfitXml="<INITIATIVE_NON_PROFIT>YES</INITIATIVE_NON_PROFIT>";
if($j("#registered-non-profit").attr("checked"))
nonProfitXml+="<WE_ARE_OFFICIALLY_REGISTERED>"+xmlReplaceInvalidCharacters($j("#non-profit-website").val())+"</WE_ARE_OFFICIALLY_REGISTERED>";
if($j("#open-accounting").attr("checked"))
@@ -470,39 +470,71 @@
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>";
}else{
- nonProfitXml="<NON_PROFIT>NO</NON_PROFIT>";
+ nonProfitXml="<INITIATIVE_NON_PROFIT>NO</INITIATIVE_NON_PROFIT>";
}
if($j('#rp-checkbox').val()=='S'){
- initiativeReproducibleXml="<INITIATIVE_REPRODUCIBLE>YES</INITIATIVE_REPRODUCIBLE>";
+ reproducibleXml="<INITIATIVE_REPRODUCIBLE>YES</INITIATIVE_REPRODUCIBLE>";
if($j("#terms-of-use").attr("checked"))
- initiativeReproducibleXml+="<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>";
if($j("#creative-commons").attr("checked"))
- initiativeReproducibleXml+="<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>";
if($j("#other-license").attr("checked"))
- initiativeReproducibleXml+="<OTHER_LICENSE_FOR_SHARING_OUR_CONTENT>"+xmlReplaceInvalidCharacters($j("#other-license-website").val())+"</OTHER_LICENSE_FOR_SHARING_OUR_CONTENT>";
- initiativeReproducibleXml+="<WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>";
+ 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>";
if($j("#organization-structure").attr("checked"))
- initiativeReproducibleXml+="<OUR_ORGANIZATION>YES</OUR_ORGANIZATION>";
+ reproducibleXml+="<OUR_ORGANIZATION>YES</OUR_ORGANIZATION>";
else
- initiativeReproducibleXml+="<OUR_ORGANIZATION>NO</OUR_ORGANIZATION>";
+ reproducibleXml+="<OUR_ORGANIZATION>NO</OUR_ORGANIZATION>";
if($j("#internal-procedures").attr("checked"))
- initiativeReproducibleXml+="<OUR_INTERNAL_PROCEDURES>YES</OUR_INTERNAL_PROCEDURES>";
+ reproducibleXml+="<OUR_INTERNAL_PROCEDURES>YES</OUR_INTERNAL_PROCEDURES>";
else
- initiativeReproducibleXml+="<OUR_INTERNAL_PROCEDURES>NO</OUR_INTERNAL_PROCEDURES>";
+ reproducibleXml+="<OUR_INTERNAL_PROCEDURES>NO</OUR_INTERNAL_PROCEDURES>";
if($j("#list-members").attr("checked"))
- initiativeReproducibleXml+="<OUR_LIST_OF_MEMBERS>YES</OUR_LIST_OF_MEMBERS>";
+ reproducibleXml+="<OUR_LIST_OF_MEMBERS>YES</OUR_LIST_OF_MEMBERS>";
else
- initiativeReproducibleXml+="<OUR_LIST_OF_MEMBERS>NO</OUR_LIST_OF_MEMBERS>";
+ reproducibleXml+="<OUR_LIST_OF_MEMBERS>NO</OUR_LIST_OF_MEMBERS>";
if($j("#funding-sources").attr("checked"))
- initiativeReproducibleXml+="<OUR_FUNDING_SOURCES>YES</OUR_FUNDING_SOURCES>";
+ reproducibleXml+="<OUR_FUNDING_SOURCES>YES</OUR_FUNDING_SOURCES>";
else
- initiativeReproducibleXml+="<OUR_FUNDING_SOURCES>NO</OUR_FUNDING_SOURCES>";
- initiativeReproducibleXml+="</WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>";
+ reproducibleXml+="<OUR_FUNDING_SOURCES>NO</OUR_FUNDING_SOURCES>";
+ reproducibleXml+="</WE_PROVIDE_PUBLIC_DOCUMENTATION_ABOUT>";
}else{
- nonProfitXml="<INITIATIVE_REPRODUCIBLE>NO</INITIATIVE_REPRODUCIBLE>";
+ reproducibleXml="<INITIATIVE_REPRODUCIBLE>NO</INITIATIVE_REPRODUCIBLE>";
}
+ if($j('#gr-checkbox').val()=='S'){
+ grassrootsXml="<INITIATIVE_GRASSROOTS>YES</INITIATIVE_GRASSROOTS>";
+ if($j("#decisions-general-assemblies").attr("checked"))
+ grassrootsXml+="<WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>YES</WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>";
+ else
+ grassrootsXml+="<WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>NO</WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES>";
+ if($j("#representatives-democratically").attr("checked"))
+ grassrootsXml+="<WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>YES</WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>";
+ else
+ grassrootsXml+="<WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>NO</WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY>";
+ if($j("#decisions-voting").attr("checked"))
+ grassrootsXml+="<WE_TAKE_DECISIONS_THROUGH>MAJORITY_VOTING</WE_TAKE_DECISIONS_THROUGH>";
+ else if ($j("#decisions-consensus").attr("checked"))
+ grassrootsXml+="<WE_TAKE_DECISIONS_THROUGH>CONSENSUS</WE_TAKE_DECISIONS_THROUGH>";
+ }else{
+ grassrootsXml="<INITIATIVE_GRASSROOTS>NO</INITIATIVE_GRASSROOTS>";
+ }
+
+ if($j('#rc-checkbox').val()=='S'){
+ reinforceCommonsXml="<INITIATIVE_REINFORCE_THE_COMMONS>YES</INITIATIVE_REINFORCE_THE_COMMONS>";
+ 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>";
+ 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>";
+ 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>";
+ else
+ reinforceCommonsXml+="<MAIN_FOCUS_OF_THE_INITIATIVE>DIGITAL_COMMONS</MAIN_FOCUS_OF_THE_INITIATIVE>";
+ }else{
+ reinforceCommonsXml="<INITIATIVE_REINFORCE_THE_COMMONS>YES</INITIATIVE_REINFORCE_THE_COMMONS>";
+ }
+
xmlDoc = "<INITIATIVE>"
+"<NAME>"+xmlReplaceInvalidCharacters($j("#ininame").val())+"</NAME>"+
+"<WEB_ADDRESS>"+xmlReplaceInvalidCharacters($j("#url").val())+"</WEB_ADDRESS>"+
@@ -510,8 +542,12 @@
+"<KEYWORDS>"+xmlReplaceInvalidCharacters($j("#keywords").val())+"</KEYWORDS>"+
+"<LOCATIONS>"+xmlReplaceInvalidCharacters($j("#locations").val())+"</LOCATIONS>"+
+nonProfitXml+
- +initiativeReproducibleXml+
+ +reproducibleXml+
+ +grassrootsXml+
+ +reinforceCommonsXml+
"</INITIATIVE>";
+
+ alert(xmlDoc);
}
$j('#submit_first').click(function(){
Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php 2013-03-14 05:29:19 UTC (rev 604)
+++ trunk/wp-theme/mc2-form.php 2013-03-14 22:43:26 UTC (rev 605)
@@ -8,6 +8,7 @@
<?php echo qtrans_generateLanguageSelectCode("text"); ?>
<div style="height: 10px;">
</div>
+
<!--
<div class="mc-form-info">
<div><?php _e("Move Commons allows your collective/initiative:", "mc"); ?></div>
@@ -231,7 +232,7 @@
</div><!-- End third slide -->
<div class="clear"></div>
- <div id="fourth_step"><!-- Fourth slide 5 original-->
+ <div id="fourth_step"><!-- Fourth slide -->
<div class="mc-cat-group-v2" id="mc-cat-group-d">
<div style="float: left;" class="mc-form-category-group-a-v2">
<div id="fourthStepProgressLine" class="progressLine">
More information about the Movecommons-commits
mailing list