Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
survey
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pixel Humain
survey
Commits
a029dac6
Commit
a029dac6
authored
Jun 25, 2020
by
Anatole Rakotoson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modif multivalidation pour ajouter validation siret
parent
f25a246e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
views/tpls/forms/cplx/multitextvalidation.php
views/tpls/forms/cplx/multitextvalidation.php
+28
-10
No files found.
views/tpls/forms/cplx/multitextvalidation.php
View file @
a029dac6
...
@@ -168,7 +168,8 @@ $paramsData = [
...
@@ -168,7 +168,8 @@ $paramsData = [
"validation"
=>
[
"validation"
=>
[
"text"
=>
"texte"
,
"text"
=>
"texte"
,
"number"
=>
"Nombre"
,
"number"
=>
"Nombre"
,
"email"
=>
"adresse mail"
"email"
=>
"adresse mail"
,
"unique"
=>
"Siret"
]
]
];
];
...
@@ -296,13 +297,32 @@ if($mode == "r"){ ?>
...
@@ -296,13 +297,32 @@ if($mode == "r"){ ?>
$(this).parent().addClass('true-validate');
$(this).parent().addClass('true-validate');
}
}
answer.path =
"
answers
.
"
+$(this).data(
"
form
"
)+
"
.
"
+$(this).data(
"
id
"
);
if($(this).attr('type') == 'unique' ) {
answer.collection =
"
answers
"
;
ajaxPost(null, baseUrl+
"
/
co2
/
search
/
globalautocomplete
"
, {
"
searchType
"
: [
"
organizations
"
],
"
filters
"
: {
"
siret
"
: [$(this).val()] }},
answer.id =
"
<?php
echo
$answer
[
"_id"
];
?>
"
;
function (data){
answer.value = $(this).val();
if (data.results.lenght != 0){
dataHelper.path2Value(answer , function(params) {
toastr.error('cette organisation existe déjà');
//toastr.success('saved');
} else {
});
answer.path =
"
answers
.
"
+$(this).data(
"
form
"
)+
"
.
"
+$(this).data(
"
id
"
);
answer.collection =
"
answers
"
;
answer.id =
"
<?php
echo
$answer
[
"_id"
];
?>
"
;
answer.value = $(this).val();
dataHelper.path2Value(answer , function(params) {
//toastr.success('saved');
});
}
}
);
} else {
answer.path =
"
answers
.
"
+$(this).data(
"
form
"
)+
"
.
"
+$(this).data(
"
id
"
);
answer.collection =
"
answers
"
;
answer.id =
"
<?php
echo
$answer
[
"_id"
];
?>
"
;
answer.value = $(this).val();
dataHelper.path2Value(answer , function(params) {
//toastr.success('saved');
});
}
}
}
})
})
});
});
...
@@ -338,8 +358,6 @@ if($mode == "r"){ ?>
...
@@ -338,8 +358,6 @@ if($mode == "r"){ ?>
$(thisAlert).removeClass('alert-validate');
$(thisAlert).removeClass('alert-validate');
}
}
</script>
</script>
<?php
}
?>
<?php
}
?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment