2017-09-05 15:58:34 +03:00
|
|
|
<script src="<?php echo base_url('/assets/js/backend_services_helper.js'); ?>"></script>
|
|
|
|
<script src="<?php echo base_url('/assets/js/backend_categories_helper.js'); ?>"></script>
|
|
|
|
<script src="<?php echo base_url('/assets/js/backend_services.js'); ?>"></script>
|
|
|
|
<script>
|
2015-10-05 01:31:06 +03:00
|
|
|
var GlobalVariables = {
|
2015-12-02 00:39:31 +02:00
|
|
|
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
2016-10-06 22:00:58 +03:00
|
|
|
'baseUrl' : <?php echo json_encode($base_url); ?>,
|
2015-12-02 00:39:31 +02:00
|
|
|
'dateFormat' : <?php echo json_encode($date_format); ?>,
|
|
|
|
'services' : <?php echo json_encode($services); ?>,
|
|
|
|
'categories' : <?php echo json_encode($categories); ?>,
|
|
|
|
'user' : {
|
2015-10-05 01:31:06 +03:00
|
|
|
'id' : <?php echo $user_id; ?>,
|
2016-10-06 22:00:58 +03:00
|
|
|
'email' : <?php echo json_encode($user_email); ?>,
|
|
|
|
'role_slug' : <?php echo json_encode($role_slug); ?>,
|
2015-10-05 01:31:06 +03:00
|
|
|
'privileges': <?php echo json_encode($privileges); ?>
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
BackendServices.initialize(true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2016-07-15 22:09:38 +03:00
|
|
|
<div id="services-page" class="container-fluid backend-page">
|
2015-10-05 01:31:06 +03:00
|
|
|
<ul class="nav nav-tabs">
|
2017-09-08 15:06:37 +03:00
|
|
|
<li role="presentation" class="services-tab tab active"><a><?php echo lang('services'); ?></a></li>
|
|
|
|
<li role="presentation" class="categories-tab tab"><a><?php echo lang('categories'); ?></a></li>
|
2015-10-05 01:31:06 +03:00
|
|
|
</ul>
|
|
|
|
|
2017-09-05 15:58:34 +03:00
|
|
|
<!-- SERVICES TAB -->
|
|
|
|
|
2015-10-05 01:31:06 +03:00
|
|
|
<div id="services" class="tab-content">
|
|
|
|
<?php // FILTER SERVICES ?>
|
|
|
|
<div class="row">
|
2016-07-14 21:52:50 +03:00
|
|
|
<div id="filter-services" class="filter-records column col-xs-12 col-sm-5">
|
2015-10-05 01:31:06 +03:00
|
|
|
<form class="input-append">
|
2015-11-28 12:19:44 +02:00
|
|
|
<input class="key" type="text" />
|
|
|
|
<div class="btn-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<button class="filter btn btn-default btn-sm" type="submit" title="<?php echo lang('filter'); ?>">
|
2015-11-28 12:19:44 +02:00
|
|
|
<span class="glyphglyphicon glyphicon glyphglyphicon glyphicon-search"></span>
|
|
|
|
</button>
|
2017-09-08 15:06:37 +03:00
|
|
|
<button class="clear btn btn-default btn-sm" type="button" title="<?php echo lang('clear'); ?>">
|
2015-11-28 12:19:44 +02:00
|
|
|
<span class="glyphglyphicon glyphicon glyphglyphicon glyphicon-repeat"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</form>
|
|
|
|
|
2017-09-08 15:06:37 +03:00
|
|
|
<h3><?php echo lang('services'); ?></h3>
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="results"></div>
|
|
|
|
</div>
|
|
|
|
|
2016-07-15 22:09:38 +03:00
|
|
|
<div class="record-details column col-xs-12 col-sm-7">
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div class="add-edit-delete-group btn-group">
|
|
|
|
<button id="add-service" class="btn btn-primary">
|
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('add'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2015-11-28 13:06:49 +02:00
|
|
|
<button id="edit-service" class="btn btn-default" disabled="disabled">
|
2015-10-05 01:31:06 +03:00
|
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('edit'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2015-11-28 13:06:49 +02:00
|
|
|
<button id="delete-service" class="btn btn-default" disabled="disabled">
|
2015-10-05 01:31:06 +03:00
|
|
|
<span class="glyphicon glyphicon-remove"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('delete'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="save-cancel-group btn-group" style="display:none;">
|
|
|
|
<button id="save-service" class="btn btn-primary">
|
|
|
|
<span class="glyphicon glyphicon-ok"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('save'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
2015-11-28 13:06:49 +02:00
|
|
|
<button id="cancel-service" class="btn btn-default">
|
2015-10-05 01:31:06 +03:00
|
|
|
<span class="glyphicon glyphicon-ban-circle"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('cancel'); ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-08 15:06:37 +03:00
|
|
|
<h3><?php echo lang('details'); ?></h3>
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="form-message alert" style="display:none;"></div>
|
|
|
|
|
|
|
|
<input type="hidden" id="service-id" />
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-name"><?php echo lang('name'); ?> *</label>
|
2015-10-05 01:31:06 +03:00
|
|
|
<input type="text" id="service-name" class="form-control required" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-duration"><?php echo lang('duration_minutes'); ?> *</label>
|
2015-10-05 01:31:06 +03:00
|
|
|
<input type="text" id="service-duration" class="form-control required" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-price"><?php echo lang('price'); ?> *</label>
|
2015-10-05 01:31:06 +03:00
|
|
|
<input type="text" id="service-price" class="form-control required" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-currency"><?php echo lang('currency'); ?></label>
|
2015-10-05 01:31:06 +03:00
|
|
|
<input type="text" id="service-currency" class="form-control" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-category"><?php echo lang('category'); ?></label>
|
2015-10-05 01:31:06 +03:00
|
|
|
<select id="service-category" class="form-control"></select>
|
|
|
|
</div>
|
|
|
|
|
2016-07-20 22:19:52 +03:00
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-availabilities-type"><?php echo lang('availabilities_type'); ?></label>
|
2016-07-20 22:19:52 +03:00
|
|
|
<select id="service-availabilities-type" class="form-control">
|
|
|
|
<option value="<?php echo AVAILABILITIES_TYPE_FLEXIBLE; ?>">
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('flexible'); ?>
|
2016-07-20 22:19:52 +03:00
|
|
|
</option>
|
|
|
|
<option value="<?php echo AVAILABILITIES_TYPE_FIXED; ?>">
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('fixed'); ?>
|
2016-07-20 22:19:52 +03:00
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2016-07-21 21:33:43 +03:00
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-attendants-number"><?php echo lang('attendants_number'); ?> *</label>
|
2016-07-21 21:33:43 +03:00
|
|
|
<input type="text" id="service-attendants-number" class="form-control required" />
|
|
|
|
</div>
|
|
|
|
|
2015-10-05 01:31:06 +03:00
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="service-description"><?php echo lang('description'); ?></label>
|
2015-10-05 01:31:06 +03:00
|
|
|
<textarea id="service-description" rows="4" class="form-control"></textarea>
|
|
|
|
</div>
|
|
|
|
|
2016-07-14 21:48:16 +03:00
|
|
|
<p id="form-message" class="text-danger">
|
2017-09-08 15:06:37 +03:00
|
|
|
<em><?php echo lang('fields_are_required'); ?></em>
|
2016-07-14 21:48:16 +03:00
|
|
|
</p>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-05 15:58:34 +03:00
|
|
|
<!-- CATEGORIES TAB -->
|
|
|
|
|
2015-10-05 01:31:06 +03:00
|
|
|
<div id="categories" class="tab-content" style="display:none;">
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="row">
|
2016-07-14 21:52:50 +03:00
|
|
|
<div id="filter-categories" class="filter-records column col-xs-12 col-sm-5">
|
2015-12-14 00:24:00 +02:00
|
|
|
<form class="input-append">
|
|
|
|
<input class="key" type="text" />
|
|
|
|
<div class="btn-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<button class="filter btn btn-default btn-sm" type="submit" title="<?php echo lang('filter'); ?>">
|
2015-12-14 00:24:00 +02:00
|
|
|
<span class="glyphicon glyphicon-search"></span>
|
|
|
|
</button>
|
2017-09-08 15:06:37 +03:00
|
|
|
<button class="clear btn btn-default btn-sm" type="button" title="<?php echo lang('clear'); ?>">
|
2015-12-14 00:24:00 +02:00
|
|
|
<span class="glyphicon glyphicon-repeat"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-08 15:06:37 +03:00
|
|
|
<h3><?php echo lang('categories'); ?></h3>
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="results"></div>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2016-07-15 22:09:38 +03:00
|
|
|
<div class="record-details col-xs-12 col-sm-7">
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div class="add-edit-delete-group btn-group">
|
|
|
|
<button id="add-category" class="btn btn-primary">
|
|
|
|
<span class="glyphicon glyphicon-plus glyphicon glyphicon-white"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('add'); ?>
|
2015-12-14 00:24:00 +02:00
|
|
|
</button>
|
|
|
|
<button id="edit-category" class="btn btn-default" disabled="disabled">
|
|
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('edit'); ?>
|
2015-12-14 00:24:00 +02:00
|
|
|
</button>
|
|
|
|
<button id="delete-category" class="btn btn-default" disabled="disabled">
|
|
|
|
<span class="glyphicon glyphicon-remove"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('delete'); ?>
|
2015-12-14 00:24:00 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="save-cancel-group btn-group" style="display:none;">
|
|
|
|
<button id="save-category" class="btn btn-primary">
|
|
|
|
<span class="glyphicon glyphicon-ok glyphicon glyphicon-white"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('save'); ?>
|
2015-12-14 00:24:00 +02:00
|
|
|
</button>
|
|
|
|
<button id="cancel-category" class="btn btn-default">
|
|
|
|
<span class="glyphicon glyphicon-ban-circle"></span>
|
2017-09-08 15:06:37 +03:00
|
|
|
<?php echo lang('cancel'); ?>
|
2015-12-14 00:24:00 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
|
2017-09-08 15:06:37 +03:00
|
|
|
<h3><?php echo lang('details'); ?></h3>
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="form-message alert" style="display:none;"></div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2015-12-14 00:24:00 +02:00
|
|
|
<input type="hidden" id="category-id" />
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="category-name"><?php echo lang('name'); ?> *</label>
|
2015-12-14 00:24:00 +02:00
|
|
|
<input type="text" id="category-name" class="form-control required" />
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2015-12-14 00:24:00 +02:00
|
|
|
<div class="form-group">
|
2017-09-08 15:06:37 +03:00
|
|
|
<label for="category-description"><?php echo lang('description'); ?></label>
|
2015-12-14 00:24:00 +02:00
|
|
|
<textarea id="category-description" rows="4" class="form-control"></textarea>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|