Files
crm-ms1/application/views/lots/form.php
2026-05-27 11:44:10 -04:00

699 lines
24 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-4">
<h1 class="page-title txt-color-blueDark">
<i class="fa fa-table fa-fw "></i>
Projet
<span>>
</span>
</h1>
</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-8">
<ul id="sparks" class="">
<li class="sparks-info">
<h5> Projets actif <span class="txt-color-blue" id="Clients_actif"> </span></h5>
</li>
<li class="sparks-info">
</li>
<li class="sparks-info">
</li>
</ul>
</div>
</div>
<!-- widget grid -->
<section id="widget-grid" class="">
<!-- row -->
<div class="row">
<!-- NEW COL START -->
<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- Widget ID (each widget will need unique ID)-->
<div class="jarviswidget jarviswidget-color-orange" data-widget-collapsed="true" id="wid-id-1" data-widget-editbutton="false"
data-widget-colorbutton="true" data-widget-deletebutton="false">
<!-- widget options:
usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
data-widget-colorbutton="false"
data-widget-editbutton="false"
data-widget-togglebutton="false"
data-widget-deletebutton="false"
data-widget-fullscreenbutton="false"
data-widget-custombutton="false"
data-widget-sortable="false"
-->
<header id="etape_color">
<span class="widget-icon"> <i class="fa fa-edit"></i> </span>
<h2>Projet <?php echo($titre); ?></h2>
</header>
<!-- widget div-->
<div>
<!-- widget edit box -->
<div class="jarviswidget-editbox">
<!-- This area used as dropdown edit box -->
</div>
<!-- end widget edit box -->
<!-- widget content -->
<div class="widget-body no-padding">
<?php echo form_open('projets/saveRecord/' . $mem_id . '/' . $retour_client, 'class="smart-form" id="saveRecord"');
?>
<footer>
<section class="col col-3">
<h2><?php echo $mem_numero ?></h2>
</section>
<button id="submit_btn" type="submit" class="btn btn-primary">
Sauvegarde
</button>
</footer>
<fieldset>
<div class="row">
<section class="col col-3">
<label class="input">
<?php
$mem_champ = 'proj_nom';
echo form_label($label[$mem_champ]);
?>
</label>
<label class="input">
<?php
echo form_input($input[$mem_champ]); ?>
<i>
</i>
</label>
</section>
<section class="col col-3">
<?php
$mem_champ = 'proj_date_debut';
?>
<label class="input">
<?php
echo form_label($label[$mem_champ]);
?>
</label>
<label class="input">
<i class="icon-append fa fa-calendar"></i>
<?php
echo form_input($input[$mem_champ]); ?>
</label>
</section>
<section class="col col-3">
<?php
$mem_champ = 'proj_date_fin';
?>
<label class="input">
<?php
echo form_label($label[$mem_champ]);
?>
</label>
<label class="input"> <i class="icon-append fa fa-calendar"></i>
<?php
echo form_input($input[$mem_champ]); ?>
</label>
</section>
<section class="col col-2">
<?php
$mem_champ = 'proj_date_confirmation';
?>
<label class="input">
<?php
echo form_label($label[$mem_champ]);
?>
</label>
<label class="input"> <i class="icon-append fa fa-calendar"></i>
<?php
echo form_input($input[$mem_champ]); ?>
</label>
</section>
<section class="col col-1">
</section>
<section class="col col-2">
</section>
</div>
</fieldset>
<fieldset>
<div class="row">
<section class="col col-3">
<label class="input">
<?php
$mem_champ = 'com_compagnie';
echo form_label($label[$mem_champ]);
?>
</label>
<label class="input">
<?php
echo $value[$mem_champ];
?>
<i>
</i>
</label>
</section>
<section class="col col-3">
<label class="input">
<?php
$mem_champ = 'proj_contact_principale';
echo form_label($label[$mem_champ]);
?>
</label>
<label class="select">
<?php
echo $icon[$mem_champ];
echo form_dropdown($mem_champ, $select[$mem_champ]['choix'], $select[$mem_champ]['value']);
?>
<i>
</i>
</label>
</section>
<section class="col col-3">
<label class="input">
<?php
$mem_champ = 'proj_representant_id';
echo form_label($label[$mem_champ]);
?>
</label>
<label class="select">
<?php
echo $icon[$mem_champ];
echo form_dropdown($mem_champ, $select[$mem_champ]['choix'], $select[$mem_champ]['value']);
?>
<i>
</i>
</label>
</section>
<section class="col col-2">
<label class="input">
<?php
$mem_champ = 'proj_etape';
echo form_label($label[$mem_champ]);
?>
</label>
<label class="select">
<?php
echo $icon[$mem_champ];
echo form_dropdown($mem_champ, $select[$mem_champ]['choix'], $select[$mem_champ]['value'], 'id="' . $mem_champ . '"');
?>
<i>
</i>
</label>
</section>
<section class="col col-1">
</section>
<section class="col col-2">
</section>
</div>
</fieldset>
<fieldset>
<section>
<label class="textarea">
<?php
$mem_champ = 'proj_notes';
echo $icon[$mem_champ];
echo form_textarea($input[$mem_champ]);
?>
</label>
</section>
</fieldset>
<footer>
<button id="submit_btn" type="submit" class="btn btn-primary">
Sauvegarde
</button>
</footer>
<?php
echo form_close();
?>
</div>
<!-- end widget content -->
</div>
<!-- end widget div -->
</div>
<!-- end widget -->
</article>
<!-- END COL -->
</div>
<!-- end row -->
<!-- end row -->
<!-- row -->
<div class="row">
<!-- NEW COL START -->
<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- Widget ID (each widget will need unique ID)-->
<div class="jarviswidget jarviswidget-color-orange" id="wid-id-2" data-widget-collapsed="true" data-widget-editbutton="false"
data-widget-colorbutton="true" data-widget-deletebutton="false">
<!-- widget options:
usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
data-widget-colorbutton="false"
data-widget-editbutton="false"
data-widget-togglebutton="false"
data-widget-deletebutton="false"
data-widget-fullscreenbutton="false"
data-widget-custombutton="false"
data-widget-collapsed="true"
data-widget-sortable="false"
-->
<header>
<span class="widget-icon"> <i class="fa fa-edit"></i> </span>
<h2>Ajout de produits</h2>
</header>
<!-- widget div-->
<div>
<!-- widget edit box -->
<div class="jarviswidget-editbox">
<!-- This area used as dropdown edit box -->
</div>
<!-- end widget edit box -->
<!-- widget content -->
<div class="widget-body no-padding">
<div class="container">
<div class="row">
<div class="col-sm-3 produit ">
PRODUIT
</div>
<div class="col-sm-8 produit_desc" id="produit_affiche">
</div>
</div>
</div>
<div class="container" id="fournisseur_display">
<div class="row">
<div class="col-sm-3 fournisseur ">
FOURNISSEUR
</div>
<div class="col-sm-9 fournisseur_desc" id="fournisseur_affiche">
</div>
</div>
</div>
<div id="choix_projet">
<div class="emp" id='produits_list'>
</div>
<div id='pagination_produits'>
</div>
</div>
<div id="choix_fournisseur">
<div id='fournisseurs_List'>
</div>
<div id='pagination_fournisseurs'>
</div>
</div>
<footer>
</footer>
<?php
echo form_close();
?>
</div>
<!-- end widget content -->
</div>
<!-- end widget div -->
</div>
<!-- end widget -->
</article>
<!-- END COL -->
</div>
<div class="row">
<!-- NEW COL START -->
<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- Widget ID (each widget will need unique ID)-->
<!-- <div class="jarviswidget jarviswidget-color-orange" id="wid-id-3" data-widget-collapsed="false" data-widget-collapsed="false" data-widget-editbutton="false" data-widget-colorbutton="true" data-widget-deletebutton="false">
<!-- widget options:
usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
data-widget-colorbutton="false"
data-widget-editbutton="false"
data-widget-togglebutton="false"
data-widget-deletebutton="false"
data-widget-fullscreenbutton="false"
data-widget-custombutton="false"
data-widget-collapsed="true"
data-widget-sortable="false"
-->
<header id="etape_color">
 <h2>details</h2>
</header>
<!-- widget div-->
<?php
$mem_widget = 4;
//print_r($produits);
$mem_max = count($produits);
if ($new == 'new') {
$mem_colapse = '';
} else {
$mem_colapse = 'data-widget-collapsed="true"';
}
foreach ($produits as $key => $value) {
//print_r($value);
?>
<div class="row">
<!-- NEW COL START -->
<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- Widget ID (each widget will need unique ID)-->
<div class="jarviswidget jarviswidget "
id="wid-id-<?php echo $mem_widget; ?>" <?php echo $mem_colapse; ?>
data-widget-editbutton="false" data-widget-colorbutton="true"
data-widget-deletebutton="false">
<!-- widget options:
usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
data-widget-colorbutton="false"
data-widget-editbutton="false"
data-widget-togglebutton="false"
data-widget-deletebutton="false"
data-widget-custombutton="false"
data-widget-collapsed="true"
-->
<header style="font-size: larger">
<?php //echo $value['type'] ;?>
<div
style="font-size: larger;background-color: <?php echo $value['form']['etape_color']; ?>"
id="produit_affiche">
<?php echo $value['type'] . "-" . $value['ent_com_compagnie'] . ' ' . $value['ent_des_nom']; ?>
</div>
</header>
<!-- widget div-->
<div >
<?php echo $value['ent_com_compagnie'] . ' ' . $value['ent_des_nom']; ?>
<div class="row">
<?php
$value['form']['projet_id'] = $mem_id;
$value['form']['key'] = $key;
$value['form']['mem_max'] = $mem_max;
$this->load->view('projets/form_' . $value['form']['mem_type_fiche'], $value['form']);
?>
</div>
</div>
<!-- end widget div -->
</div>
</article>
<!-- END COL -->
</div>
<?php
$mem_colapse = 'data-widget-collapsed="true"';
$mem_widget = $mem_widget + 1;
}
?>
<!-- end widget div -->
<!-- </div>
<!-- end widget -->
</article>
<!-- END COL -->
</div>
<!-- end row -->
<!-- end row -->
<!-- end widget grid -->
</section>
</div>
<!-- END MAIN PANEL -->
<!-- ==========================CONTENT ENDS HERE ========================== -->
<script>
var mcolor = new Array(15);
var tcolor = new Array(15);
$(document).ready(function () {
<?php
echo( $this->Config_model->conf_javacouleurprojets());
?>
var current = $('#proj_etape').val();
$('#etape_color').css('background-color', mcolor[current]);
// $('#proj_etape').css('color','gray');
$('#proj_etape').change(function () {
var current = $('#proj_etape').val();
$('#etape_color').css('background-color', mcolor[current]);
});
// START AND FINISH DATE
$('#proj_date_debut').datepicker({
dateFormat: 'yy-mm-dd',
prevText: '<i class="fa fa-chevron-left"></i>',
nextText: '<i class="fa fa-chevron-right"></i>',
onSelect: function (selectedDate) {
$('#proj_date_fin').datepicker('option', 'minDate', selectedDate);
}
});
$('#proj_date_fin').datepicker({
dateFormat: 'yy-mm-dd',
prevText: '<i class="fa fa-chevron-left"></i>',
nextText: '<i class="fa fa-chevron-right"></i>',
onSelect: function (selectedDate) {
$('#proj_date_debut').datepicker('option', 'maxDate', selectedDate);
}
});
$(".form_datetime").datetimepicker({
format: 'yyyy-mm-dd hh:ii', autoclose: true,
todayBtn: true, todayHighlight: true, startDate: "<?php echo date('Y-m-d')?>"
});
$('#proj_date_confirmation').datepicker({
dateFormat: 'yy-mm-dd',
prevText: '<i class="fa fa-chevron-left"></i>',
nextText: '<i class="fa fa-chevron-right"></i>'
});
var errorClass = 'invalid';
var errorElement = 'em';
var $checkoutForm = $('#saveRecord').validate({
errorClass: errorClass,
errorElement: errorElement,
highlight: function (element) {
$(element).parent().removeClass('state-success').addClass("state-error");
$(element).removeClass('valid');
},
unhighlight: function (element) {
$(element).parent().removeClass("state-error").addClass('state-success');
$(element).addClass('valid');
},
// Rules for form validation
<?php
echo($validation['rules']);
?>
// Messages for form validation
<?php
echo($validation['messages']);
?>
// Do not change code below
errorPlacement: function (error, element) {
error.insertAfter(element.parent());
}
});
});
</script>
<?php
if (isset($pageSection)) {
?>
<script>
$(document).ready(function () {
var aTag = $("a[name='<?php echo $pageSection;?>']");
$('html,body').animate({scrollTop: aTag.offset().top}, 'fast');
});
</script>
<?php
} ?>
<script>
var mem_choix_produit_id = 0;
var mem_choix_fournisseur_id = 0;
$(document).ready(function () {
<?php
$model_de_produits="projets";
include('application/views/produits/produits_filtre.php');
$model_de_fournisseur="projets";
include('application/views/fournisseurs/fournisseurs_filtre.php');
include('application/views/produits/produits_script_projets.php');
?>
});
</script>