Commit 243591a4 authored by Raph El's avatar Raph El
Browse files

form hotfix

parent ae8667b3
......@@ -235,6 +235,11 @@ var adminDirectory = {
if(typeof valURL.url != "undefined")
str += '<a class="pull-right" href="'+valURL.url+'" target="_blank"><i class="fa fa-2x fa-table text-green"></i></a>';
});
}else if(kCSV == "post"){
$.each(valCSV, function(kURL, valURL){
if(typeof valURL.url != "undefined")
str += '<a class="pull-right btnCsv" href="javascript:;" data-url="'+valURL.url+'" ><i class="fa fa-2x fa-table text-green"></i></a>';
});
}else{
var urlCsv = baseUrl+'/api/'+kCSV+'/get/format/csv';
if(typeof valCSV == "object" ){
......@@ -828,6 +833,29 @@ var adminDirectory = {
}
},
events : {
csv: function(aObj){
mylog.log("adminDirectory.events.csv ");
$("#"+aObj.container+" .btnCsv").off().on("click", function(){
mylog.log("adminDirectory.events.csv.btnCsv ", $(this).data("url"));
var paramsSearch = searchInterface.constructObjectAndUrl();
paramsSearch = jQuery.extend(paramsSearch, aObj.paramsSearch);
ajaxPost(
null,
$(this).data("url"),
paramsSearch,
function(data){
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(data);
hiddenElement.target = '_blank';
hiddenElement.download = 'people.csv';
hiddenElement.click();
},
function(data){
$("#searchResults").html("erreur");
}
);
});
},
update: function(aObj){
$("#"+aObj.container+" .updateBtn").off().on("click", function(){
mylog.log("adminDirectory..updateBtn ", $(this).data("id"), $(this).data("type"));
......
......@@ -424,7 +424,8 @@ var Login = {
addressPosition : ".passwordAgainRegister"
},
//alert("incorun run");
runRegisterValidator : function() { mylog.log("runRegisterValidator!!!!");
runRegisterValidator : function() {
mylog.log("runRegisterValidator!!!!");
//alert("runRegisterValidator 1");
var form3 = $('.form-register');
var errorHandler3 = $('.errorHandler', form3);
......
......@@ -134,8 +134,7 @@
"canEdit"=>$canEdit,
"controller" => $controller);
$params = Form::getDataForm($params);
$this->renderPartial('survey.views.tpls.forms.formWizard', $params );
$this->renderPartial('survey.views.tpls.forms.formWizard', $params );
}
?>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment