示例#1
0
/**
 * Shows contract create date modify form
 * 
 * @return string
 */
function web_UserContractDateChangeForm($contract, $date = '')
{
    if (!empty($date)) {
        $inputs = wf_DatePickerPreset('newcontractdate', $date);
    } else {
        $inputs = wf_DatePicker('newcontractdate');
    }
    $cells = wf_TableCell(__('Current date'), '', 'row2');
    $cells .= wf_TableCell($date, '', 'row3');
    $rows = wf_tablerow($cells);
    $cells = wf_TableCell(__('New date'), '', 'row2');
    $cells .= wf_TableCell($inputs, '', 'row3');
    $rows .= wf_tablerow($cells);
    $form = wf_TableBody($rows, '100%', 0);
    $form .= wf_Submit('Save');
    $result = wf_Form("", 'POST', $form, '');
    return $result;
}
示例#2
0
/**
 * Renders agent strict assign form
 * 
 * @return string
 */
function web_AgentAssignStrictForm($login, $currentassign)
{
    if (!empty($currentassign)) {
        $agentData = zb_ContrAhentGetData($currentassign);
        @($currentAgentName = $agentData['contrname']);
    } else {
        $currentAgentName = __('No');
    }
    $inputs = zb_ContrAhentSelectPreset($currentassign);
    $inputs .= wf_HiddenInput('assignstrictlogin', $login);
    $deleteCheckbox = wf_CheckInput('deleteassignstrict', __('Delete'), false, false);
    $cells = wf_TableCell(__('Service provider'), '', 'row2');
    $cells .= wf_TableCell($currentAgentName, '', 'row3');
    $rows = wf_tablerow($cells);
    $cells = wf_TableCell(__('New assign'), '', 'row2');
    $cells .= wf_TableCell($inputs, '', 'row3');
    $rows .= wf_tablerow($cells);
    $cells = wf_TableCell('', '', 'row2');
    $cells .= wf_TableCell($deleteCheckbox, '', 'row3');
    $rows .= wf_tablerow($cells);
    $form = wf_TableBody($rows, '100%', 0);
    $form .= wf_Submit('Save');
    $result = wf_Form("", 'POST', $form, '');
    return $result;
}