1<?php 2 3/** 4 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures 5 * all the essential functionalities required for any enterprise. 6 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com 7 * 8 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of 9 * the GNU General Public License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along with this program; 17 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA 19 */ 20?> 21 22<?php 23use_stylesheet(plugin_web_path('orangehrmLeavePlugin', 'css/addLeaveEntitlementSuccess.css')); 24use_javascripts_for_form($form); 25use_stylesheets_for_form($form); 26 27?> 28 29<?php if ($form->hasErrors()): ?> 30 <div class="messagebar"> 31 <?php include_partial('global/form_errors', array('form' => $form)); ?> 32 </div> 33<?php endif; ?> 34 35<div class="box" id="add-leave-entitlement"> 36 <div class="head"> 37 <h1><?php echo $addMode ? __("Add Leave Entitlement") : __('Edit Leave Entitlement');?></h1> 38 </div> 39 <div class="inner"> 40 <?php include_partial('global/flash_messages'); ?> 41 <form id="frmLeaveEntitlementAdd" name="frmLeaveEntitlementAdd" method="post" action=""> 42 43 <fieldset> 44 <ol> 45 <?php echo $form->render(); ?> 46 47 <li class="required"> 48 <em>*</em> <?php echo __(CommonMessages::REQUIRED_FIELD); ?> 49 </li> 50 </ol> 51 52 <p> 53 <input type="button" id="btnSave" value="<?php echo __("Save") ?>"/> 54 <input type="button" id="btnCancel" class="cancel" value="<?php echo __("Cancel") ?>"/> 55 </p> 56 </fieldset> 57 58 </form> 59 60 </div> <!-- inner --> 61 62</div> <!-- employee-information --> 63 64<!-- Confirmation box HTML: Begins --> 65<div class="modal hide" id="noselection"> 66 <div class="modal-header"> 67 <a class="close" data-dismiss="modal">×</a> 68 <h3><?php echo 'OrangeHRM - ' . __('No matching employees'); ?></h3> 69 </div> 70 <div class="modal-body"> 71 <p><?php echo __('No employees match the selected filters'); ?></p> 72 </div> 73 <div class="modal-footer"> 74 <input type="button" class="btn" data-dismiss="modal" id="dialogDeleteBtn" value="<?php echo __('Ok'); ?>" /> 75 </div> 76</div> 77<!-- Confirmation box HTML: Ends --> 78<div class="modal hide" id="preview" style="width:500px"> 79 <div class="modal-header"> 80 <a class="close" data-dismiss="modal">×</a> 81 <h3><?php echo 'OrangeHRM - ' . __('Matching Employees'); ?></h3> 82 </div> 83 <div class="modal-body"> 84 <span><?php echo __('The selected leave entitlement will be applied to the following employees.');?></span> 85 86 <div id="employee_list"> 87 88 </div> 89 </div> 90 <div class="modal-footer"> 91 <input type="button" class="btn" data-dismiss="modal" id="dialogConfirmBtn" value="<?php echo __('Confirm'); ?>" /> 92 <input type="button" class="cancel" data-dismiss="modal" id="bulkAssignCancelBtn" value="<?php echo __('Cancel'); ?>" /> 93 <div id="employee_loading" class="loading_message"><?php echo __('Loading') . '...';?></div> 94 </div> 95</div> 96 97<!-- Confirmation box for employee entitlement--> 98<div class="modal hide" id="employeeEntitlement" style="width:500px"> 99 <div class="modal-header"> 100 <a class="close" data-dismiss="modal">×</a> 101 <h3><?php echo __('OrangeHRM') . ' - ' . __('Updating Entitlement'); ?></h3> 102 </div> 103 <div class="modal-body"> 104 105 <ol id="employee_entitlement_update"> 106 <li><?php echo __('Loading') . '...';?></li> 107 </ol> 108 </div> 109 <div class="modal-footer"> 110 <input type="button" class="btn" data-dismiss="modal" id="dialogUpdateEntitlementConfirmBtn" value="<?php echo __('Confirm'); ?>" /> 111 <input type="button" class="cancel" data-dismiss="modal" id="dialogUpdateEntitlementCancelBtn" value="<?php echo __('Cancel'); ?>" /> 112 </div> 113</div> 114 115<!-- Confirmation box for employee entitlement--> 116<div class="modal hide" id="bulkAssignWaitDlg" style="width:500px"> 117 <div class="modal-header"> 118 <h3><?php echo 'OrangeHRM - ' . __('Updating Entitlement'); ?></h3> 119 </div> 120 <div class="modal-body"> 121 <p id="buildAssignWait" class="loading_message"></p> 122 </div> 123</div> 124 125<script type="text/javascript"> 126 var datepickerDateFormat = '<?php echo get_datepicker_date_format($sf_user->getDateFormat()); ?>'; 127 var displayDateFormat = '<?php echo str_replace('yy', 'yyyy', get_datepicker_date_format($sf_user->getDateFormat())); ?>'; 128 var lang_invalidDate = '<?php echo __js(ValidationMessages::DATE_FORMAT_INVALID, array('%format%' => str_replace('yy', 'yyyy', get_datepicker_date_format($sf_user->getDateFormat())))) ?>'; 129 var lang_dateError = '<?php echo __js("To date should be after from date") ?>'; 130 var lang_employee = '<?php echo __js("Employee") ?>'; 131 var lang_old_entitlement = '<?php echo __js("Old Entitlement") ?>'; 132 var lang_new_entitlement = '<?php echo __js("New Entitlement") ?>'; 133 var listUrl = '<?php echo url_for('leave/viewLeaveEntitlements?savedsearch=1');?>'; 134 var getCountUrl = '<?php echo url_for('leave/getFilteredEmployeeCountAjax');?>'; 135 var getEmployeeUrl = '<?php echo url_for('leave/getFilteredEmployeesEntitlementAjax');?>'; 136 var getEmployeeEntitlementUrl = '<?php echo url_for('leave/getEmployeeEntitlementAjax');?>'; 137 var lang_matchesOne = '<?php echo __js('Matches one employee');?>'; 138 var lang_matchesMany = '<?php echo __js('Matches %count% employees');?>'; 139 var lang_matchesNone = '<?php echo __js('No matching employees');?>'; 140 var lang_required = '<?php echo __js(ValidationMessages::REQUIRED); ?>'; 141 var lang_invalid = '<?php echo __js(ValidationMessages::INVALID); ?>'; 142 var lang_number = '<?php echo __js("Should be a number with upto %count% decimal places", array('%count%' => 2)); ?>'; 143 var lang_valid_entitlement = '<?php echo __js("Used amount exceeds the current amount"); ?>'; 144 var lang_max_digits = '<?php echo __js("Should not be more than 10000"); ?>'; 145 var validEntitlemnetUrl = '<?php echo url_for('leave/isValidEntitlemnetAjax');?>'; 146 var lang_Loading = '<?php echo __js('Loading');?>'; 147 var lang_Employees = '<?php echo __js('Employees');?>'; 148 var lang_NoResultsFound = '<?php echo __js("No Records Found");?>'; 149 var lang_BulkAssignPleaseWait = '<?php echo __js('Bulk Assigning Leave Entitlement to %count% Employees. Please Wait');?>'; 150 var lang_PleaseWait = '<?php echo __js('Assigning Leave Entitlement. Please Wait');?>'; 151 var lang_ExistingEntitlement = '<?php echo __js('Existing Entitlement value %oldvalue% will be updated to %newvalue%');?>'; 152 153 var filterMatchingEmployees = 0; 154 155 var mode = '<?php echo ($addMode)?'add':'update'; ?>'; 156 157</script> 158