예제 #1
0
function hourIndex($d)
{
    $r =& getRenderer();
    $new_hour_forms = $r->view('jsHideable', array('Log Project Hour' => $r->view('projectHourLoggerForm', $d->new_hour), 'Log Support Hour' => $r->view('supporthourNewForm', $d->new_support_hour)));
    $hour_table_html = $r->view('hourSearch', $d->hours, array('ajax_target_id' => 'hour-search-1'));
    return array('title' => 'Listing All Hours', 'controls' => '', 'body' => $new_hour_forms . $hour_table_html);
}
예제 #2
0
function chargeSearch($charges, $o)
{
    $r = getRenderer();
    $type = isset($o['type']) ? $o['type'] : '';
    $company_id = isset($o['company_id']) ? $o['company_id'] : '';
    $start_date = isset($o['date_range']['start_date']) ? $o['date_range']['start_date'] : '';
    $end_date = isset($o['date_range']['end_date']) ? $o['date_range']['end_date'] : '';
    $form = new Form(array('controller' => 'Charge', 'action' => 'search', 'method' => 'get', 'auto_submit' => array('company_id', 'type', 'start_date', 'end_date'), 'ajax_target_id' => 'charges-table'));
    $charge = new Charge();
    $charge->set(array('type' => $type));
    $fs = $form->getFieldSetFor($charge);
    $form->content .= $fs->field('type', array('title' => 'Type', 'name' => 'type'));
    $form->content .= $r->classSelect('Company', array('title' => 'Client', 'name' => 'company_id', 'id' => 'company_id', 'selected_value' => $company_id));
    $form->content .= '<div class="search-input">
    <label for="charge_search_start">Start Date</label>
    ' . $r->input('date', array('name' => 'date_range[start_date]', 'value' => $start_date, 'id' => 'charge_search_start')) . '
    </div>
    <div class="search-input">
      <label for="charge_search_end">End Date</label>
      ' . $r->input('date', array('name' => 'date_range[end_date]', 'value' => $end_date, 'id' => 'charge_search_end')) . '
    </div>
    ';
    $o['search'] = $form->html;
    return $r->view('chargeTable', $charges, $o);
}
예제 #3
0
function invoiceBatchIndex($d, $o = array())
{
    $r = getRenderer();
    $hidden_forms = $r->view('jsMultipleButtons', array('Create Single Invoice' => $r->view('invoiceNewForm', $d->new_invoice), 'Create Quarterly Invoices' => $r->view('invoicebatchNewForm', $d->new_batch), 'Create Stand-Alone Invoice' => $r->view('invoiceStandNewForm', $d->new_stand_invoice)));
    $invoice_table = $r->view('invoiceTable', $d->invoices, array('search_invoice' => $d->search_invoice));
    return array('title' => 'Show Invoices', 'body' => $hidden_forms . $invoice_table);
}
예제 #4
0
function clientuserIndex($d)
{
    $r = getRenderer();
    $clientuser_new = $r->view('jsHideable', array('Create New Client User' => $r->view('clientuserNewForm', $d->new_clientuser)));
    $clientuser_table = $r->view('clientuserTable', $d->clientusers);
    return array('title' => 'Client Users', 'body' => $clientuser_new . $clientuser_table);
}
예제 #5
0
function projectIndex($d)
{
    $r = getRenderer();
    $new_project_form = $r->view('jsHideable', array('Create New Project' => $r->view('projectNewForm', $d->new_project)));
    $project_table = $r->view('projectTable', $d->projects, array('id' => 'project', 'search_project' => $d->search_project));
    return array('title' => 'All Projects', 'controls' => '', 'body' => $new_project_form . $project_table);
}
예제 #6
0
/**
  hour list item
  renders list display for a singe Hour objects
*/
function hourListItem($hour, $o)
{
    $r = getRenderer();
    $data = array('Hours' => $hour->getHours(), 'Discount' => $hour->getDiscount(), 'Name' => $hour->getName(), 'Staff' => $hour->getStaffName());
    $options = array('class' => 'hour-list-item');
    return $r->view('basicListItem', $data, $options);
}
예제 #7
0
function invoiceShow($d, $o = array())
{
    $r = getRenderer();
    if ($d->invoice->getData('type') == 'dated') {
        $invoice_date = $d->invoice->getEndDate();
    } else {
        $invoice_date = $d->invoice->getDate();
    }
    $invoice_period = $d->invoice->getStartDate() . " through " . $d->invoice->getEndDate();
    $banner = array('Invoice Date' => $invoice_date, 'Invoice Number' => "#" . $d->invoice->getData('id'));
    $client = $d->company->getDisplayName();
    $billing_contact_emails = $d->company->getBillingEmailAddress();
    $additional_recipients = $d->invoice->getAdditionalRecipients();
    $send_button = UI::button(array('controller' => 'Invoice', 'action' => 'email', 'id' => $d->invoice->getData('id')));
    if ($d->invoice->getData('type') == 'dated') {
        $items = array('Items for Period' => $invoice_period, 'Previous Balance' => "\$ " . number_format($d->invoice->getPreviousBalance(), 2), 'New Payments in Period' => "\$ " . number_format($d->invoice->getNewPaymentsTotal(), 2), 'New Charges in Period' => "\$ " . number_format($d->invoice->getNewCosts(), 2), 'Total Due' => "\$ " . number_format($d->invoice->getAmountDue(), 2), 'Net 30 Terms' => ' ');
    } else {
        $items = array('Total Due' => "\$ " . number_format($d->invoice->getAmountDue(), 2), 'Net 30 Terms' => ' ');
    }
    $summary = '
    <div id="banner">' . $r->view('basicList', $banner) . '</div>
    <h2 id="invoice-client">' . $client . '</h2>
    <div id="billing-contact">Billing Contact Email: ' . $billing_contact_emails . $additional_recipients . '<br>
    </div>
    <div id="billing-send-invoice">' . $send_button . '</div>
    <div id="invoice-summary">';
    if ($d->invoice->getData('details')) {
        $summary .= '<div id="details"><strong>Details</strong>: ' . nl2br($d->invoice->getData('details')) . '</div>';
    }
    $summary .= $r->view('basicList', $items) . '
    </div>';
    $history = $r->view('companyLineItems', array('company' => $d->company, 'months' => Util::month_range($d->invoice->getStartDate(), $d->invoice->getEndDate())));
    return array('template' => 'invoice', 'title' => 'Show Invoice', 'body' => $summary, 'history' => $history);
}
예제 #8
0
function hourSearch($hours, $o = array())
{
    $r = getRenderer();
    $start_date = isset($o['hour_search']['start_date']) ? $o['hour_search']['start_date'] : '';
    $end_date = isset($o['hour_search']['end_date']) ? $o['hour_search']['end_date'] : '';
    $company_id = isset($o['company']) ? $o['company'] : '';
    $staff_name = isset($o['staff']) ? $o['staff'] : '';
    unset($o['hour_search']);
    $search_form = new Form(array_merge(array('method' => 'get', 'controller' => 'Hour', 'action' => 'search', 'ajax_target_id' => 'hour_table', 'auto_submit' => array('company', 'staff')), $o));
    $search_form->content = '
    <div class="search-input">
    ' . $r->classSelect('Company', array('name' => 'company', 'id' => 'hour_search_company_id', 'title' => 'Client', 'selected_value' => $company_id)) . '
    </div>

    <div class="search-input">
    <label for="hour_search_start">Start Date</label>
      ' . $r->input('date', array('name' => 'hour_search[start_date]', 'value' => $start_date, 'id' => 'hour_search_start')) . '
    </div>
    <div class="search-input">
    <label for="hour_search_end">End Date</label>
    ' . $r->input('date', array('name' => 'hour_search[end_date]', 'value' => $end_date, 'id' => 'hour_search_end')) . '
    </div>
    ' . $r->classSelect('Staff', array('name' => 'staff_id', 'id' => 'hour_search_staff_id', 'title' => 'Staff', 'selected_value' => $staff_name));
    $hours_table = $r->view('hourTable', $hours, array('search' => $search_form->html));
    return '<div id="' . $o['ajax_target_id'] . '" class="hour-search clear-left">
    ' . $hours_table . '
    </div>';
}
예제 #9
0
function jumpSelect($sample_object, $criteria = array())
{
    $r = getRenderer();
    $form = new Form(array('method' => 'get', 'action' => 'show', 'controller' => get_class($sample_object)));
    $form->content = $r->objectSelect($sample_object, array('name' => 'id'), $criteria);
    return $form->html;
}
예제 #10
0
function companyTable($companies, $o = array())
{
    $r = getRenderer();
    $search_form = '';
    if (!empty($o['search_company']) && is_a($o['search_company'], 'Company')) {
        $form = new Form(array('controller' => 'Company', 'action' => 'index', 'method' => 'get', 'auto_submit' => array('org_type', 'country', 'status')));
        $f = $form->getFieldSetFor($o['search_company']);
        $form_content = $f->field('org_type', array('title' => 'Organization Type'));
        $form_content .= $f->field('country', array('title' => 'Country'));
        $form_content .= $f->field('status', array('title' => 'Status'));
        $form->content = $form_content;
        $search_form = $form->html;
    }
    $table = array();
    $table['headers'] = array('Client', 'Primary Contact', 'Status', 'Last Payment', 'Billing Status', 'Balance');
    $table['rows'] = array();
    foreach ($companies as $c) {
        $link = $r->link('Company', array('action' => 'show', 'id' => $c->id), $c->getName());
        if ($c->getPrimaryContact()) {
            $contact_link = $r->link('Contact', array('action' => 'show', 'id' => $c->getPrimaryContact()->id), $c->getPrimaryContactName());
        } else {
            $contact_link = '';
        }
        $table['rows'][] = array($link, $contact_link, $c->get('status'), $c->getLastPaymentDate(), $c->get('billing_status'), $c->calculateBalance(array('end_date' => Util::date_format_from_time())));
    }
    return $r->view('basicTable', $table, array('title' => 'Search Clients', 'search' => $search_form, 'pager' => true));
}
예제 #11
0
function supportcontractIndex($d)
{
    $r = getRenderer();
    $hidden_forms = $r->view('jsHideable', array('Create New Support Contract' => $r->view('supportcontractNewForm', $d->new_contract), 'Log Support Hour' => $r->view('supporthourNewForm', $d->new_hour)));
    $contract_table = $r->view('supportcontractTable', $d->contracts);
    return array('title' => 'Support Contracts', 'body' => $hidden_forms . $contract_table);
}
예제 #12
0
function chargeIndex($d)
{
    $r = getRenderer();
    $hidden_forms = $r->view('jsHideable', array('Create New Charge' => $r->view('chargeNewForm', $d->new_charge)), array('open_by_default' => array('Create New Charge')));
    $charge_table = $r->view('chargeSearch', $d->charges);
    return array('title' => 'Charge', 'body' => $hidden_forms . $charge_table);
}
예제 #13
0
function invoiceEmailPlain($d, $o = array())
{
    $r = getRenderer();
    if ($d->invoice->getData('type') == 'dated') {
        $invoice_date = $d->invoice->getEndDate();
    } else {
        $invoice_date = $d->invoice->getDate();
    }
    $invoice_period = $d->invoice->getStartDate() . " through " . $d->invoice->getEndDate();
    $client = $d->company->getName();
    $summary = "\n\nRadical Designs Invoice\n Invoice Date " . $invoice_date . "\n Invoice Number #" . $d->invoice->getData("id") . "\n Your New Radical Designs Invoice: " . $client . "\n\n ";
    if ($d->invoice->getData('type') == 'dated') {
        $summary .= "Invoice for Period " . $invoice_period . "\n\n Starting Balance on " . $d->invoice->getStartDate() . ":\n \$ " . number_format($d->invoice->getPreviousBalance(), 2) . " New Charges in Period:\n  \$ " . number_format($d->invoice->getNewCosts(), 2) . "\n\n Less Payments in Period:\n \$ " . number_format($d->invoice->getNewPaymentsTotal(), 2) . "\n";
    }
    if ($d->invoice->getData('details')) {
        $summary .= "Details: " . $d->invoice->getData("details") . "\n";
    }
    $summary .= " Current Total Due: \$ " . number_format($d->invoice->getAmountDue(), 2) . "\n\nNet 30 Terms\n\nPayment Information:\n\n";
    if ($d->invoice->getAmountDue() < 1000) {
        $summary .= "Radical Designs accepts online payments at https://payments.rdsecure.org/payments for amounts less than \$1000.\n\n";
    }
    $summary .= "Send checks to:\n Radical Designs\n 1201 Martin Luther King Jr. Way, Suite 200 \n Oakland, CA\n 94612\n \n Make your check payable to Radical Designs. \n For questions about your contract or bill please email billing@radicaldesigns.org\n For questions about support please email help@radicaldesigns.org\n Or you can call us at 415-738-0456";
    $summary .= $r->view('companyLineItemsPlain', array('company' => $d->company, 'months' => Util::month_range($d->invoice->getStartDate(), $d->invoice->getEndDate())));
    return array('template' => 'invoice', 'title' => 'Show Invoice', 'body' => $summary);
}
예제 #14
0
function companyIndex($d)
{
    $r = getRenderer();
    $company_new_html = $r->view('jsHideable', array('Create New Client' => $r->view('companyNewForm', $d->new_company)));
    $company_table_html = $r->view('companyTable', $d->companies, array('id' => 'company', 'search_company' => $d->search_company));
    return array('title' => 'Listing All Clients', 'controls' => '', 'body' => $company_new_html . $company_table_html);
}
예제 #15
0
function estimateInfo($estimate, $o = array())
{
    $r = getRenderer();
    $project = new Project($estimate->get('project_id'));
    $project_link = $r->link('Project', array('action' => 'show', 'id' => $project->id), $project->get('name'));
    $list_items = array('Estimate' => $estimate->getName(), 'Project' => $project_link, 'Due Date' => $estimate->getData('due_date'), 'High Estimate' => $estimate->getHighEstimate(), 'Low Estimate' => $estimate->getLowEstimate(), 'Total Hours' => $estimate->getTotalHours(), 'Billable Hours' => $estimate->getBillableHours(), 'Completed' => $estimate->getData('completed') ? 'yes' : 'no', 'Notes' => $estimate->getData('notes'), 'Category' => $estimate->get('category'));
    return $r->view('basicList', $list_items);
}
예제 #16
0
function supportcontractCancel($d)
{
    $r = getRenderer();
    $contract_cancel_instructions = '<p>This form cancels this support contract. Do this if the client is <b>permanently</b> terminating this contract, and we are no longer going to host or support them. Be sure to set the correct end date for this contract.</p>';
    $d->set_end_date_to_todays_date ? $end_date_message = '<p>This contract had no specified end date, so the end date has been set to today\'s date.  Please make sure this is correct by editing the form below.</p>' : ($end_date_message = '<p>This contract had a pre-set end date of ' . $d->contract->get('end_date') . '. Please make sure this is correct by editing the form below.</p>');
    $contract_cancel_form = $r->view('supportcontractCancelForm', $d->contract);
    return array('title' => 'Cancel Contract: ' . $d->contract->getName(), 'body' => $contract_cancel_instructions . $end_date_message . $contract_cancel_form);
}
예제 #17
0
 private static function _getSchema($class = '')
 {
     if (!isset($class::$schema)) {
         $r =& getRenderer();
         $class::$schema = $r->jsonDecode($class::$schema_json);
     }
     return $class::$schema;
 }
예제 #18
0
function projectInfo($p, $o = array())
{
    $r = getRenderer();
    $p->get('launch_date') ? $launch_date = date('m/d/Y', strtotime($p->get('launch_date'))) : ($launch_date = 'NOT SET');
    if ($launch_date == '11/30/-0001') {
        $launch_date = 'N/A';
    }
    $html = '
    <div>
      Project: ' . $r->link('Project', array('action' => 'show', 'id' => $p->id), $p->get('name')) . '
    </div>
    <div>
      Company: ' . $r->link('Company', array('action' => 'show', 'id' => $p->get('company_id')), $p->getCompanyName()) . '
    </div>
    <div>
    <span class="launch-date">Launch Date: ' . $launch_date . '</span>    
    </div>
    <div>
    <span class="status-label">
      Status: 
    </span>
    <span class="status">' . $p->get('status') . '</span>
    </div>
    <div>
      <span class="project-manager-label">Project Manager: </span>
      <span class="project-manager">' . $r->link('Staff', array('action' => 'show', 'id' => $p->get('staff_id')), $p->getStaffName()) . '</span>
      </div>';
    if ($p->get('designer')) {
        $html .= '
      <div>
        Designer: ' . $p->get('designer') . '
      </div>';
    }
    $percent = intval($p->getBillableHours() / $p->getHighEstimate() * 100);
    $pclass = $percent > 80 ? 'overbudget' : '';
    $html .= '
    <div class="detail-project-hours">
      <span class="float-left">Low Estimate: ' . $p->getLowEstimate() . '</span>    
      <span class="float-left">Hour Cap: ' . $p->get('hour_cap') . '</span>
      <span class="float-left">High Estimate: ' . $p->getHighEstimate() . '</span>      
      <span class="float-left">Hourly Rate: ' . $p->get('hourly_rate') . '</span>
      <span class="float-left">Total Hours Worked: ' . $p->getTotalHours() . '</span>
      <span class="float-left">Total Billable Hours : ' . $p->getBillableHours() . '</span>
      <span class="float-left">Server: ' . $p->get('server') . '</span>
      <div class="clear-left"></div>
      <div class="bar">
        <div class="filling ' . $pclass . '" style="width:5%">
          ' . $percent . '%
        </div>
      </div>
      <script type="text/javascript">
        $(function() {
          $(".filling").animate({"width":"' . $percent . '%"}, 1000);  
        });
      </script>
    </div>';
    return $html;
}
예제 #19
0
function staffEditForm($user)
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'Staff', 'action' => 'update'));
    $fs = $form->getFieldSetFor($user);
    $fields = array('Username' => $fs->username, 'First Name' => $fs->first_name, 'Last Name' => $fs->last_name, 'Email' => $fs->email, 'Team' => $fs->team, 'New Password' => '<input type="password" name="new_password"/>', 'Repeat Password' => '<input type="password" name="new_password_repeat"/>', 'Avatar' => $fs->avatar, 'Active' => $fs->active);
    $form->content = $r->view('basicFormContents', $fields, array('title' => 'Edit Staff'));
    return $form->html;
}
예제 #20
0
function companyEditForm($c, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'Company', 'action' => 'update'));
    $fs = $form->getFieldSetFor($c);
    $list_items = array('Name' => $fs->name, 'Alias' => $fs->alias, 'Status' => $fs->status, 'Type' => $fs->org_type, 'Bay Area' => $fs->bay_area, 'Street' => $fs->street, 'Street 2' => $fs->street_2, 'City' => $fs->city, 'State' => $fs->state, 'Zip' => $fs->zip, 'Country' => $fs->country, 'Start Date' => $fs->date_started, 'Close Date' => $fs->date_ended, 'Billing Status' => $fs->billing_status, 'Notes' => $fs->notes);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'Edit Client'));
    return $form->html;
}
예제 #21
0
function estimateEditForm($e, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'Estimate', 'action' => 'update'));
    $fs = $form->getFieldSetFor($e);
    $list_items = array('Name' => $fs->name, 'Description' => $fs->description, 'Low Estimate' => $fs->low_hours, 'High Estimate' => $fs->high_hours, 'Due Date' => $fs->due_date, 'Internal Details' => $fs->notes, 'Project' => $fs->project_id, 'Category' => $fs->category);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'Edit Estimate'));
    return $form->html;
}
예제 #22
0
function projectShow($d)
{
    $r = getRenderer();
    $editable_project_info = $r->view('jsSwappable', 'Project Info', array($r->view('projectInfo', $d->project), $r->view('projectEditForm', $d->project)));
    $hidden_forms = $r->view('jsMultipleButtons', array('Create New Estimate' => $r->view('estimateNewForm', $d->new_estimate), 'Log Hours' => $r->view('hourNewForm', $d->new_hour, array('project_id' => $d->project->id))), array('open_by_default' => array('Log Hours')));
    $estimate_table = $r->view('estimateTable', $d->project->getEstimates());
    $hour_table = $r->view('hourTable', $d->project->getHours());
    return array('title' => $d->project->getName(), 'body' => $editable_project_info . $hidden_forms . $estimate_table . $hour_table);
}
예제 #23
0
function projectEditForm($p, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'Project', 'action' => 'update'));
    $fs = $form->getFieldSetFor($p);
    $list_items = array('Name' => $fs->name, 'Status' => $fs->status, 'Internal Project' => $fs->internal, 'Launch Date' => $fs->launch_date, 'Company' => $fs->company_id, 'Project Manager' => $fs->staff_id, 'Designer' => $fs->desinger, 'Domain' => $fs->domain_notes, 'Initial Estimated Cost' => $fs->cost, 'Hour Cap' => $fs->hour_cap, 'Hourly Rate' => $fs->hourly_rate, 'Billing Status' => $fs->billing_status, 'Server' => $fs->server);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'Edit Project'));
    return $form->html;
}
function supportcontractNewForm($contract, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'SupportContract', 'action' => 'create'));
    $fs = $form->getFieldSetFor($contract);
    $list_items = array('Company' => $fs->company_id, 'Domain Name' => $fs->domain_name, 'Tech' => $fs->technology, 'Support Hours' => $fs->support_hours, 'Hourly Rate' => $fs->hourly_rate, 'Monthly Rate' => $fs->monthly_rate, 'Pro Bono' => $fs->pro_bono, 'Contract On File' => $fs->contract_on_file, 'Status' => $fs->status, 'Not Monthly' => $fs->not_monthly, 'Notes' => $fs->notes, 'Start Date' => $fs->start_date, 'End Date' => $fs->end_date, 'Contract Url' => $fs->contract_url);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'New Contract'));
    return $form->html;
}
예제 #25
0
function supporthourEditForm($h, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'SupportHour', 'action' => 'update'));
    $fs = $form->getFieldSetFor($h);
    $list_items = array('Support Contract' => $fs->support_contract_id, 'Description' => $fs->description, 'Staff' => $fs->staff_id, 'Pair' => $fs->field('pair_id', array('select_none' => 'Not Paired')), 'Hours' => $fs->hours, 'Discount' => $fs->discount, 'Date Completed' => $fs->date);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'Edit Hour', 'display' => 'inline'));
    return '<div id="edit-hours-for-support">' . $form->html . '</div>';
}
예제 #26
0
function invoicebatchNewForm($batch, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'InvoiceBatch', 'action' => 'create'));
    $fs = $form->getFieldSetFor($batch);
    $list_items = array('Name' => $fs->name, 'Start Date' => $fs->start_date, 'End Date' => $fs->end_date, 'Created Date' => $fs->created_date);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'New Invoice Batch'));
    return $form->html;
}
function supportcontractCorrectMistake($d)
{
    $r = getRenderer();
    $contract_instructions = '<p>This form is only to be used to edit a f**k-up.  
    If you did not already f**k up, then <b>you are f*****g up right now by editing this form</b>.
    Ask Sara if you are confused.</p>';
    $contract_form = $r->view('supportcontractCorrectMistakeForm', $d->contract);
    return array('title' => 'Correct Mistake on Contract: ' . $d->contract->getName(), 'body' => $contract_instructions . $contract_form);
}
예제 #28
0
function clientuserNewForm($user)
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'ClientUser', 'action' => 'create'));
    $fs = $form->getFieldSetFor($user);
    $fields = array('First Name' => $fs->first_name, 'Last Name' => $fs->last_name, 'Company' => $fs->company_id, 'Email' => $fs->email, 'Password' => $fs->password);
    $form->content = $r->view('basicFormContents', $fields, array('title' => 'New Client User'));
    return $form->html;
}
예제 #29
0
function contactEditForm($c, $o = array())
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'Contact', 'action' => 'update'));
    $fs = $form->getFieldSetFor($c);
    $list_items = array('Company' => $fs->company_id, 'First Name' => $fs->first_name, 'Last Name' => $fs->last_name, 'Email' => $fs->email, 'Phone' => $fs->phone, 'Fax' => $fs->fax, 'Billing Contact' => $fs->is_billing_contact, 'Primary Contact' => $fs->is_primary_contact, 'Technical Contact' => $fs->is_technical_contact);
    $form->content = $r->view('basicFormContents', $list_items, array('title' => 'Edit Contact'));
    return $form->html;
}
예제 #30
0
function clientuserEditForm($user)
{
    $r = getRenderer();
    $form = new Form(array('controller' => 'ClientUser', 'action' => 'update'));
    $fs = $form->getFieldSetFor($user);
    $fields = array('First Name' => $fs->first_name, 'Last Name' => $fs->last_name, 'Company' => $fs->company_id, 'Email' => $fs->email, 'New Password' => '<input type="text" name="new_password"/>');
    $form->content = $r->view('basicFormContents', $fields, array('title' => 'Edit Client User'));
    return $form->html;
}