Delicious      Technorati      Blinklist      Furl      Reddit

TimeTrex Time and Attendance

TimeTrex Time and Attendance

* FAQ    * Search
* Login   * Register

All times are UTC - 8 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Mar 30, 2016 9:16 pm 

Joined: Sun Feb 14, 2016 6:09 pm
Posts: 53
Good morning. How do I get which form/page I am at currently in, using PhP code?

For example, I am in the Schedule View form where I want to reduce the items in the Absence Policy field dropdown (when Status=Absent). We have set Absence Policies which have names like "unauthorized leave", of course this should not be "scheduled", so it must not be visible. Then the same dropdown also shows up in the TimeSheet View form (clicked New Absence button), there I need all these items to show up in the dropdown list.

I managed to find out that APIAbsencePolicy.class.php#getAbsencePolicy gets called when I click the "Absence Policy" dropdown. So there I could "remove" some of the items from returned array BUT if only I could manage to find out which "page" I am currently in, but I do not know how to yet.

Can someone please teach me how to achieve this or if its even possible?
Initially I tried looking at the javascript files ScheduleViewController.js and TimeSheetViewController.js but I cannot seem to get where the list is stored, I only find this:

      form_item_input.AComboBox( {
         api_class: (APIFactory.getAPIClass( 'APIAbsencePolicy' )),
         allow_multiple_selection: false,
         layout_name: ALayoutIDs.ABSENCES_POLICY,
         show_search_inputs: true,
         set_empty: true,
         field: 'src_object_id',
         validation_field: 'absence_policy_id'
      } );

      form_item_input.customSearchFilter = function( filter ) {
         return $this.setAbsencePolicyFilter( filter );

      this.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_punch_column1, '', null, true );

Could I directly manipulate records in the dropdown list here in the javascript?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Time and Attendance

Powered by phpBB® Forum Software © phpBB Group