easyappointments/src/application/views/backend/customers.php

122 lines
5.4 KiB
PHP
Raw Normal View History

2013-07-05 11:39:52 +03:00
<script type="text/javascript"
src="<?php echo $base_url; ?>assets/js/libs/jquery/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript"
src="<?php echo $base_url; ?>assets/js/backend_customers.js"></script>
<script type="text/javascript">
var GlobalVariables = {
'availableProviders': <?php echo json_encode($available_providers); ?>,
'availableServices': <?php echo json_encode($available_services); ?>,
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
'customers': <?php echo json_encode($customers); ?>,
'user' : {
'id' : <?php echo $user_id; ?>,
'email' : <?php echo '"' . $user_email . '"'; ?>,
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
'privileges': <?php echo json_encode($privileges); ?>
}
2013-07-05 11:39:52 +03:00
};
var EALang = <?php echo json_encode($this->lang->language); ?>
2013-07-05 11:39:52 +03:00
$(document).ready(function() {
BackendCustomers.initialize(true);
});
</script>
2013-07-05 11:39:52 +03:00
<div id="customers-page" class="row-fluid">
<div id="filter-customers" class="filter-records column span4">
<form class="input-append">
<input class="key span12" type="text" />
<button class="filter btn" type="submit" title="<?php echo $this->lang->line('be_filter'); ?>">
<i class="icon-search"></i>
</button>
<button class="clear btn" type="button" title="<?php echo $this->lang->line('be_clear'); ?>">
<i class="icon-repeat"></i>
</button>
</form>
2013-07-15 17:27:19 +03:00
<h2><?php echo $this->lang->line('be_customers'); ?></h2>
<div class="results"></div>
2013-07-05 11:39:52 +03:00
</div>
<div class="details span7 row-fluid">
2013-07-15 17:27:19 +03:00
<div class="btn-toolbar">
<div id="add-edit-delete-group" class="btn-group">
<?php if ($privileges[PRIV_CUSTOMERS]['add'] == TRUE) { ?>
<button id="add-customer" class="btn btn-primary">
<i class="icon-plus icon-white"></i>
<?php echo $this->lang->line('be_add'); ?>
</button>
<?php } ?>
<?php if ($privileges[PRIV_CUSTOMERS]['edit'] == TRUE) { ?>
2013-07-15 17:27:19 +03:00
<button id="edit-customer" class="btn" disabled="disabled">
<i class="icon-pencil"></i>
<?php echo $this->lang->line('be_edit'); ?>
</button>
<?php }?>
<?php if ($privileges[PRIV_CUSTOMERS]['delete'] == TRUE) { ?>
2013-07-15 17:27:19 +03:00
<button id="delete-customer" class="btn" disabled="disabled">
<i class="icon-remove"></i>
<?php echo $this->lang->line('be_delete'); ?>
</button>
<?php } ?>
2013-07-15 17:27:19 +03:00
</div>
<div id="save-cancel-group" class="btn-group" style="display:none;">
2013-10-27 14:53:51 +02:00
<button id="save-customer" class="btn btn-primary">
<i class="icon-ok icon-white"></i>
<?php echo $this->lang->line('be_save'); ?>
</button>
2013-07-15 17:27:19 +03:00
<button id="cancel-customer" class="btn">
<i class="icon-ban-circle"></i>
<?php echo $this->lang->line('be_cancel'); ?>
</button>
2013-07-15 17:27:19 +03:00
</div>
</div>
<input id="customer-id" type="hidden" />
<div class="span6" style="margin-left: 0;">
<h2><?php echo $this->lang->line('be_details'); ?></h2>
2013-07-15 17:27:19 +03:00
<div id="form-message" class="alert" style="display:none;"></div>
<label for="first-name"><?php echo $this->lang->line('fe_first_name'); ?> *</label>
<input type="text" id="first-name" class="span11 required" />
2013-07-15 17:27:19 +03:00
<label for="last-name"><?php echo $this->lang->line('fe_last_name'); ?> *</label>
2013-07-15 17:27:19 +03:00
<input type="text" id="last-name" class="span11 required" />
<label for="email"><?php echo $this->lang->line('fe_email'); ?> *</label>
2013-07-15 17:27:19 +03:00
<input type="text" id="email" class="span11 required" />
<label for="phone-number"><?php echo $this->lang->line('fe_phone_number'); ?> *</label>
2013-07-15 17:27:19 +03:00
<input type="text" id="phone-number" class="span11 required" />
<label for="address"><?php echo $this->lang->line('fe_address'); ?></label>
2013-07-15 17:27:19 +03:00
<input type="text" id="address" class="span11" />
<label for="city"><?php echo $this->lang->line('fe_city'); ?></label>
2013-07-15 17:27:19 +03:00
<input type="text" id="city" class="span11" />
<label for="zip-code"><?php echo $this->lang->line('fe_zip_code'); ?></label>
2013-07-15 17:27:19 +03:00
<input type="text" id="zip-code" class="span11" />
<label for="notes"><?php echo $this->lang->line('fe_notes'); ?></label>
2013-07-15 17:27:19 +03:00
<textarea id="notes" rows="4" class="span11"></textarea>
<br/><br/>
<center><em id="form-message" class="text-error">
<?php echo $this->lang->line('fe_fields_are_required'); ?></em></center>
2013-07-15 17:27:19 +03:00
</div>
<div class="span5">
<h2><?php echo $this->lang->line('be_appointments'); ?></h2>
2013-07-15 17:27:19 +03:00
<div id="customer-appointments"></div>
<div id="appointment-details"></div>
</div>
2013-07-05 11:39:52 +03:00
</div>
</div>