+ ns.set_input_constraints = function() {
+ $(ns.inputs_to_disable).each(function(idx, elt) {
+ if ("customer" === elt) {
+ $('#time_recording_customer_id_name').prop('disabled', true);
+ }
+ if ("project" === elt) {
+ $('#time_recording_project_id_name').prop('disabled', true);
+ setTimeout(function() {$('#time_recording_project_id ~ .ppp_popup_button').hide();}, 100);
+ }
+ });
+ };
+
+});
+
+$(function() {
+ kivi.TimeRecording.set_input_constraints();
+ $('#time_recording_project_id').on('set_item:ProjectPicker', function(){ kivi.TimeRecording.project_changed() });