I have an Zero app that still uses apb 0.8.4.0 which means I am unable to add the disable auditing attribute to the password property. I can only add it to the CreateOrUpdateUser method. I would rather not add it to the method since I would ultimately like to log when a user is either creating or editing another user.
I tried a couple of different things. I tried creating a new attribute like this...
/// <summary>
/// Used to disable auditing for a single method or
/// all methods of a class or interface.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
public class DisableAuditingPropertyAttribute : Attribute
{
}
But that did not work. I also tried inheriting from the original DisableAuditingAttribute but that didn't work either. It kept logging the password.
[AttributeUsage(AttributeTargets.Property)]
public class DisableAuditingPropertyAttribute : DisableAuditingAttribute
{
}
Does anyone have any ideas for the older version of abp? I must be missing something.
I will try to figure it out. The project is too big to send over email.
The only only thing I do to reproduce it is find the user in the user liat and click the impersonate user. It immediately errors out.
Awesome, that totally worked. Thank you hikalkan.
if I put the code below directly in the console, after the modal is open then it works. Does that give you any ideas of where I should be putting that?
jQuery('.date-picker').datepicker({
orientation: "left",
autoclose: true
});
Unfortatntly I wouldn't be able to email it. It is around 450MB. What are you thinking could possibly be wrong?
I was able to get Datepicker to work just fine in a normal view but not Modal.
The code you wanted me to try
modal.on('shown.bs.modal', function () {
modal.find('.date-picker').datepicker({
orientation: "left",
autoclose: true
});
});
Doesn't work because I open the modal differently. Below shows an example how I do it. How exactly would I be able to do something similar to what you suggested in the below method of opening a modal?
function openCreateOrEditPetModal(renterId, petId) {
var modalInstance = $uibModal.open({
templateUrl: '~/App/common/views/renters/createOrEditPetModal.cshtml',
controller: 'common.views.renters.createOrEditPetModal as vm',
backdrop: 'static',
resolve: {
renterId: function () {
return renterId;
},
petId: function () {
return petId;
}
}
});
modalInstance.result.then(function (result) {
init();
});
}
That makes sense. Thank you, that actually gives me an idea.
Thank you.
One more question. Do you know how to format the date on the model binding? In my text box when editing a date it shows it in the following format. 2016-10-19T00:00:00Z. I want it to show as 10/19/2016 instead. I know how to do it in a view such as {{vm.renter.dob | date:"MM/dd/yyyy"}} but I cannot do it that way in the text box.
I don't know Angular very well but I found an example online of someone creating a directive to handle this, below is the code for the directive. It actually works and puts it in the format I want it in, but for some reason it takes one day off of the date no matter what date I set. So for example if I set the date to 1/24/2016, after I reload the view it will say 1/23/2016. But the super weird thing is in the database it will be the correct date.
appModule.directive('date', function (dateFilter) {
return {
require: 'ngModel',
link: function (scope, elm, attrs, ctrl) {
var dateFormat = attrs['date'] || 'MM/dd/yyyy';
ctrl.$formatters.unshift(function (modelValue) {
return dateFilter(modelValue, dateFormat);
});
}
};
});
Does that go in the Modal controller? or would it go in the function that opens the modal?