Re: [Dhis2-devs] custom form in Tracker Capture
Hi Shyam, I'm afraid our developers are super busy trying to wrap up version 2.25, and there are not many people with free time to guide you. I think a good place to start would be to peruse the developer manual on the API: https://dhis2.github.io/dhis2-docs/master/en/developer/html/webapi.html Knut On Sun, Oct 9, 2016 at 3:39 PM, shyam tayal wrote: > hello , i am new here, Want to contribure .Confused where to start ? any > directions? > Any help will be appreciated . > > On Sun, Oct 9, 2016 at 6:53 PM, channara rin > wrote: > >> Dear alex, >> thank you alot :-) >> But could you give example one attribute for me? i don't know how to use >> that script... >> >> On Thu, Oct 6, 2016 at 5:36 PM, Alex Tumwesigye >> wrote: >> >>> Dear Channara, >>> >>> Use angular $watch to watch the models changes. >>> >>> >>> Attribute model is $scope.selectedTei.uid >>> event model is $scope.currentEvent.uid >>> >>> For Jquery, >>> use $(selectedTei.uid).val("Your value").trigger('input'); >>> >>> For angular, >>> This $scope.selectedTei.uid will pick your value, however, you will need >>> $watch to watch for changes. >>> >>> Note uid is the dhis2 11 character identifier. >>> >>> Alex >>> >>> On Thu, Oct 6, 2016 at 12:47 PM, channara rin >>> wrote: >>> Dear all, do you know any jquery script for tracker capture custom form to catch require attributes fields and unique attribute field? for example, when i edit client's profile in tracker capture. if i do some things wrong format of attribute fields, when i click update/save. i didn't see any popup message what i did wrong. but when i look console. i saw error of jax to use "PUT" on 404 message. thank you channara ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp >>> >>> >>> -- >>> Alex Tumwesigye >>> >>> Technical Advisor - DHIS2 (Consultant), >>> Ministry of Health/AFENET | HISP Uganda >>> Kampala >>> Uganda >>> +256 774149 775, + 256 759 800161 >>> Skype ID: talexie >>> >>> IT Consultant (Servers, Networks and Security, Health Information >>> Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant >>> >>> >>> "I don't want to be anything other than what I have been - one tree hill >>> " >>> >> >> >> ___ >> Mailing list: https://launchpad.net/~dhis2-devs >> Post to : dhis2-devs@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~dhis2-devs >> More help : https://help.launchpad.net/ListHelp >> >> > > > -- > Best Regards > Shyam Tayal > Department of Computer Science > Shri Mata Vaishnodevi University > Jammu & Kashmir > > > ___ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : dhis2-devs@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > -- Knut Staring Dept. of Informatics, University of Oslo Norway: +4791880522 Skype: knutstar http://dhis2.org ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] custom form in Tracker Capture
Dear Channara, See an example of building a custom form. ** * $(document).ready(function(){* * var scope = getScope('RegistrationController'); //Get scope from registration controller* * var orgUnitName = angular.element($("#orgUnitTree .selected")).text(); * * if(scope.registrationMode === 'REGISTRATION'){* * scope.$on('teienrolled',function(){* * console.log("TEI enrolled");* * });* * }* * if(scope.registrationMode === 'PROFILE'){* * scope.$on('teiupdated',function(){* * console.log("TEI updated");* * });* * } * * //var myForm = document.querySelector('d2-custom-form');* * //var $scope = angular.element(myForm).scope();* * // control birth date and date of consultation* * // Attribute Birth Date has a uid = A31FfrjPqyp* * scope.$watch('selectedTei.A31FfrjPqyp',function(newDOBValue,oldDOBValue){* * if(scope.interacted(scope.outerForm.A31FfrjPqyp) === true){* * if(newDOBValue >= scope.selectedEnrollment.enrollmentDate){ * * alert("Date of Birth should not be later than Date of Consultation, correct the Date of Birth."); * * scope.$applyAsync(function(){* * scope.selectedTei.A31FfrjPqyp = ''; //Assign date to null* * scope.outerForm.$dirty;* * });* * //angular.element($('[attributeid="A31FfrjPqyp"]')).focus().select(); * * }* * if(scope.selectedEnrollment.incidentDate < scope.selectedTei.A31FfrjPqyp){ * * alert("Date of onset of symptoms has to be later than or equal to Date of Birth , correct the Date of Birth.");* * scope.$applyAsync(function(){* * scope.selectedTei.A31FfrjPqyp = ''; //Assign date to null* * scope.outerForm.$dirty;* * });* * }* * }* * },true)* * });* ** Alex On Sun, Oct 9, 2016 at 4:23 PM, channara rin wrote: > Dear alex, > thank you alot :-) > But could you give example one attribute for me? i don't know how to use > that script... > > On Thu, Oct 6, 2016 at 5:36 PM, Alex Tumwesigye > wrote: > >> Dear Channara, >> >> Use angular $watch to watch the models changes. >> >> >> Attribute model is $scope.selectedTei.uid >> event model is $scope.currentEvent.uid >> >> For Jquery, >> use $(selectedTei.uid).val("Your value").trigger('input'); >> >> For angular, >> This $scope.selectedTei.uid will pick your value, however, you will need >> $watch to watch for changes. >> >> Note uid is the dhis2 11 character identifier. >> >> Alex >> >> On Thu, Oct 6, 2016 at 12:47 PM, channara rin >> wrote: >> >>> Dear all, >>> do you know any jquery script for tracker capture custom form to catch >>> require attributes fields and unique attribute field? >>> >>> for example, when i edit client's profile in tracker capture. if i do >>> some things wrong format of attribute fields, when i click update/save. i >>> didn't see any popup message what i did wrong. but when i look console. i >>> saw error of jax to use "PUT" on 404 message. >>> >>> thank you >>> channara >>> >>> ___ >>> Mailing list: https://launchpad.net/~dhis2-devs >>> Post to : dhis2-devs@lists.launchpad.net >>> Unsubscribe : https://launchpad.net/~dhis2-devs >>> More help : https://help.launchpad.net/ListHelp >>> >>> >> >> >> -- >> Alex Tumwesigye >> >> Technical Advisor - DHIS2 (Consultant), >> Ministry of Health/AFENET | HISP Uganda >> Kampala >> Uganda >> +256 774149 775, + 256 759 800161 >> Skype ID: talexie >> >> IT Consultant (Servers, Networks and Security, Health Information Systems >> - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant >> >> >> "I don't want to be anything other than what I have been - one tree hill " >> > > -- Alex Tumwesigye Technical Advisor - DHIS2 (Consultant), Ministry of Health/AFENET | HISP Uganda Kampala Uganda +256 774149 775, + 256 759 800161 Skype ID: talexie IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant "I don't want to be anything other than what I have been - one tree hill " ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] custom form in Tracker Capture
hello , i am new here, Want to contribure .Confused where to start ? any directions? Any help will be appreciated . On Sun, Oct 9, 2016 at 6:53 PM, channara rin wrote: > Dear alex, > thank you alot :-) > But could you give example one attribute for me? i don't know how to use > that script... > > On Thu, Oct 6, 2016 at 5:36 PM, Alex Tumwesigye > wrote: > >> Dear Channara, >> >> Use angular $watch to watch the models changes. >> >> >> Attribute model is $scope.selectedTei.uid >> event model is $scope.currentEvent.uid >> >> For Jquery, >> use $(selectedTei.uid).val("Your value").trigger('input'); >> >> For angular, >> This $scope.selectedTei.uid will pick your value, however, you will need >> $watch to watch for changes. >> >> Note uid is the dhis2 11 character identifier. >> >> Alex >> >> On Thu, Oct 6, 2016 at 12:47 PM, channara rin >> wrote: >> >>> Dear all, >>> do you know any jquery script for tracker capture custom form to catch >>> require attributes fields and unique attribute field? >>> >>> for example, when i edit client's profile in tracker capture. if i do >>> some things wrong format of attribute fields, when i click update/save. i >>> didn't see any popup message what i did wrong. but when i look console. i >>> saw error of jax to use "PUT" on 404 message. >>> >>> thank you >>> channara >>> >>> ___ >>> Mailing list: https://launchpad.net/~dhis2-devs >>> Post to : dhis2-devs@lists.launchpad.net >>> Unsubscribe : https://launchpad.net/~dhis2-devs >>> More help : https://help.launchpad.net/ListHelp >>> >>> >> >> >> -- >> Alex Tumwesigye >> >> Technical Advisor - DHIS2 (Consultant), >> Ministry of Health/AFENET | HISP Uganda >> Kampala >> Uganda >> +256 774149 775, + 256 759 800161 >> Skype ID: talexie >> >> IT Consultant (Servers, Networks and Security, Health Information Systems >> - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant >> >> >> "I don't want to be anything other than what I have been - one tree hill " >> > > > ___ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : dhis2-devs@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > -- Best Regards Shyam Tayal Department of Computer Science Shri Mata Vaishnodevi University Jammu & Kashmir ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] custom form in Tracker Capture
Dear alex, thank you alot :-) But could you give example one attribute for me? i don't know how to use that script... On Thu, Oct 6, 2016 at 5:36 PM, Alex Tumwesigye wrote: > Dear Channara, > > Use angular $watch to watch the models changes. > > > Attribute model is $scope.selectedTei.uid > event model is $scope.currentEvent.uid > > For Jquery, > use $(selectedTei.uid).val("Your value").trigger('input'); > > For angular, > This $scope.selectedTei.uid will pick your value, however, you will need > $watch to watch for changes. > > Note uid is the dhis2 11 character identifier. > > Alex > > On Thu, Oct 6, 2016 at 12:47 PM, channara rin > wrote: > >> Dear all, >> do you know any jquery script for tracker capture custom form to catch >> require attributes fields and unique attribute field? >> >> for example, when i edit client's profile in tracker capture. if i do >> some things wrong format of attribute fields, when i click update/save. i >> didn't see any popup message what i did wrong. but when i look console. i >> saw error of jax to use "PUT" on 404 message. >> >> thank you >> channara >> >> ___ >> Mailing list: https://launchpad.net/~dhis2-devs >> Post to : dhis2-devs@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~dhis2-devs >> More help : https://help.launchpad.net/ListHelp >> >> > > > -- > Alex Tumwesigye > > Technical Advisor - DHIS2 (Consultant), > Ministry of Health/AFENET | HISP Uganda > Kampala > Uganda > +256 774149 775, + 256 759 800161 > Skype ID: talexie > > IT Consultant (Servers, Networks and Security, Health Information Systems > - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant > > > "I don't want to be anything other than what I have been - one tree hill " > ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
Re: [Dhis2-devs] custom form in Tracker Capture
Dear Channara, Use angular $watch to watch the models changes. Attribute model is $scope.selectedTei.uid event model is $scope.currentEvent.uid For Jquery, use $(selectedTei.uid).val("Your value").trigger('input'); For angular, This $scope.selectedTei.uid will pick your value, however, you will need $watch to watch for changes. Note uid is the dhis2 11 character identifier. Alex On Thu, Oct 6, 2016 at 12:47 PM, channara rin wrote: > Dear all, > do you know any jquery script for tracker capture custom form to catch > require attributes fields and unique attribute field? > > for example, when i edit client's profile in tracker capture. if i do some > things wrong format of attribute fields, when i click update/save. i didn't > see any popup message what i did wrong. but when i look console. i saw > error of jax to use "PUT" on 404 message. > > thank you > channara > > ___ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : dhis2-devs@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > -- Alex Tumwesigye Technical Advisor - DHIS2 (Consultant), Ministry of Health/AFENET | HISP Uganda Kampala Uganda +256 774149 775, + 256 759 800161 Skype ID: talexie IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant "I don't want to be anything other than what I have been - one tree hill " ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp