parent
b83420874c
commit
194ad31c9f
|
@ -136,6 +136,13 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
// checkbox for privacy policy
|
||||
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
||||
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"\">privacy policy</a>.")
|
||||
->setDecorators(array('ViewHelper'))
|
||||
->setValue(1);
|
||||
$this->addElement($checkboxPrivacy);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -161,5 +161,12 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
<br>
|
||||
<label class="optional" for="Privacy">
|
||||
<?php echo $this->element->getElement('Privacy') ?>
|
||||
<?php echo $this->element->getElement('Privacy')->getLabel() ?>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
|
@ -1,31 +1,41 @@
|
|||
$(document).ready(function(){
|
||||
var dialogGlob;
|
||||
$.get("/Preference/register", {format:"json"}, function(json){
|
||||
var dialog = $(json.dialog);
|
||||
|
||||
dialogGlob = dialog;
|
||||
|
||||
dialog.dialog({
|
||||
autoOpen: false,
|
||||
width: 500,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
position:['center',50],
|
||||
buttons: {
|
||||
"Remind me in 1 week": function() {
|
||||
var url = '/Preference/remindme';
|
||||
$.ajax({
|
||||
url: url,
|
||||
});
|
||||
$(this).dialog("close");
|
||||
},
|
||||
"Yes, help Airtime": function() {
|
||||
if($("#Publicise").is(':checked')){
|
||||
if(validateFields()){
|
||||
$("#register-form").submit();
|
||||
}
|
||||
}else{
|
||||
$("#register-form").submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
buttons: [
|
||||
{
|
||||
id: "remind_me",
|
||||
text: "Remind me in 1 week",
|
||||
click: function() {
|
||||
var url = '/Preference/remindme';
|
||||
$.ajax({
|
||||
url: url,
|
||||
});
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "help_airtime",
|
||||
text: "Yes, help Airtime",
|
||||
click: function() {
|
||||
if($("#Publicise").is(':checked')){
|
||||
if(validateFields()){
|
||||
$("#register-form").submit();
|
||||
}
|
||||
}else{
|
||||
$("#register-form").submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
dialog.dialog('open');
|
||||
|
@ -56,6 +66,15 @@ $(document).ready(function(){
|
|||
}
|
||||
});
|
||||
|
||||
$("#Privacy").live('click', function(){
|
||||
var button = $("#help_airtime");
|
||||
if($(this).is(':checked')){
|
||||
button.removeAttr('disabled').removeClass('ui-state-disabled');
|
||||
}else{
|
||||
button.attr('disabled', 'disabled' ).addClass('ui-state-disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$("#link_to_whos_using").live('click', function(){
|
||||
window.open("http://sourcefabric.org/en/products/airtime_whosusing");
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue