Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 153 | Rev 155 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 153 Rev 154
Línea 57... Línea 57...
57
$status_inactive = \LeadersLinked\Model\CompanySelfEvaluationForm::STATUS_INACTIVE;
57
$status_inactive = \LeadersLinked\Model\CompanySelfEvaluationForm::STATUS_INACTIVE;
Línea 58... Línea 58...
58
 
58
 
59
$lang_es = \LeadersLinked\Model\CompanySelfEvaluationForm::LANGUAGE_SPANISH;
59
$lang_es = \LeadersLinked\Model\CompanySelfEvaluationForm::LANGUAGE_SPANISH;
Línea 60... Línea -...
60
$lang_en = \LeadersLinked\Model\CompanySelfEvaluationForm::LANGUAGE_ENGLISH;
-
 
61
 
60
$lang_en = \LeadersLinked\Model\CompanySelfEvaluationForm::LANGUAGE_ENGLISH;
62
 
-
 
63
                            
-
 
64
                            
61
 
65
                            
62
                        
66
$this->inlineScript()->captureStart();
63
$this->inlineScript()->captureStart();
67
echo <<<JS
64
echo <<<JS
68
		const classFormGenerator = function() {
65
		const classFormGenerator = function() {
Línea 1050... Línea 1047...
1050
		    				
1047
		    				
Línea 1051... Línea 1048...
1051
		    				if(objFormGenerator.sections[i].questions[j].options.length == 0) {
1048
		    				if(objFormGenerator.sections[i].questions[j].options.length == 0) {
1052
 
1049
 
-
 
1050
								$.fn.showError('ERROR_OPTIONS'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1053
								$.fn.showError('ERROR_OPTIONS'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1051
								error = true;
1054
								error = true;
1052
								return false;
Línea 1055... Línea 1053...
1055
									break;
1053
									break;
1056
		    				}
1054
		    				}
Línea 1080... Línea 1078...
1080
		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' || objFormGenerator.sections[i].questions[j].type == 'multiple' ) {
1078
		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' || objFormGenerator.sections[i].questions[j].type == 'multiple' ) {
Línea 1081... Línea 1079...
1081
		    				
1079
		    				
1082
    		    				if(numberCorrect == 0) {
1080
    		    				if(numberCorrect == 0) {
1083
    		    					$.fn.showError('ERROR_OPTIONS_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1081
    		    					$.fn.showError('ERROR_OPTIONS_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
-
 
1082
    		    					error = true;
1084
    		    					error = true;
1083
									return false;
1085
    		    					break;
1084
    		    					break;
1086
    		    				}
1085
    		    				}
1087
    		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' && numberCorrect > 1) {
1086
    		    				if(objFormGenerator.sections[i].questions[j].type == 'simple' && numberCorrect > 1) {
1088
    		    					$.fn.showError('ERROR_OPTIONS_DUPLICATE_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1087
    		    					$.fn.showError('ERROR_OPTIONS_DUPLICATE_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
-
 
1088
    		    					error = true;
1089
    		    					error = true;
1089
									return false;
1090
    		    					break;
1090
    		    					break;
1091
    		    				}
1091
    		    				}
1092
    		    				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && numberCorrect == 1) {
1092
    		    				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && numberCorrect == 1) {
1093
    		    					$.fn.showError('ERROR_OPTIONS_ONE_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1093
    		    					$.fn.showError('ERROR_OPTIONS_ONE_CORRECT'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
-
 
1094
    		    					error = true;
1094
    		    					error = true;
1095
									return false;
1095
    		    					break;
1096
    		    					break;
1096
    		    				}
1097
    		    				}
Línea 1097... Línea 1098...
1097
		    				}
1098
		    				}
Línea 1098... Línea 1099...
1098
 
1099
 
1099
			 				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && totalOption > valueQuestion ) {
1100
			 				if(objFormGenerator.sections[i].questions[j].type == 'multiple' && totalOption > valueQuestion ) {
-
 
1101
 
1100
 
1102
								$.fn.showError('ERROR_OPTIONS_SUM_VALUES'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1101
								$.fn.showError('ERROR_OPTIONS_SUM_VALUES'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1103
		    					error = true;
Línea 1102... Línea 1104...
1102
		    					error = true;
1104
								return false;
1103
		    					break;
1105
		    					break;
1104
			    			}
1106
			    			}
-
 
1107
 
1105
 
1108
		    				if(objFormGenerator.sections[i].questions[j].type == 'rating-open' && maxOption > valueQuestion ) {
1106
		    				if(objFormGenerator.sections[i].questions[j].type == 'rating-open' && maxOption > valueQuestion ) {
1109
								$.fn.showError('ERROR_OPTIONS_MAX_OPTION'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1107
								$.fn.showError('ERROR_OPTIONS_MAX_OPTION'.replace('%s', objFormGenerator.sections[i].name ).replace('%n', questionNumber));
1110
		    					error = true;
Línea 1108... Línea 1111...
1108
		    					error = true;
1111
								return false;
Línea 1109... Línea 1112...
1109
		    					break;
1112
		    					break;
1110
			    			}
1113
			    			}
1111
						}
1114
						}
-
 
1115
	
1112
	
1116
		    		}
1113
		    		}
1117
 
1114
 
1118
		    		if(valueSection != totalValueQuestion) {
Línea 1890... Línea 1894...
1890
    <div class="container-fluid" id="row-forms">
1894
    <div class="container-fluid" id="row-forms">
1891
        <div class="row">
1895
        <div class="row">
1892
            <div class="col-12">
1896
            <div class="col-12">
1893
                <div class="card">
1897
                <div class="card">
1894
                    <div class="card-body">
1898
                    <div class="card-body">
1895
 
-
 
1896
					<table  class="table table-hover">
-
 
1897
                            <thead>
-
 
1898
                                <tr>
-
 
1899
                                    <th>LABEL_NAME</th>
-
 
1900
                                    <th>LABEL_LANGUAGE</th>
-
 
1901
                                    <th>LABEL_ACTIVE</th>
-
 
1902
                                    <th>LABEL_ACTIONS</th>
-
 
1903
                                </tr>
-
 
1904
                            </thead>
-
 
1905
                            <tbody id="rows"></tbody>
-
 
1906
                        </table>
-
 
1907
                        <table id="gridTable" class="table   table-hover">
1899
                        <table id="gridTable" class="table   table-hover">
1908
                            <thead>
1900
                            <thead>
1909
                                <tr>
1901
                                <tr>
1910
                                    <th>LABEL_NAME</th>
1902
                                    <th>LABEL_NAME</th>
1911
                                    <th>LABEL_LANGUAGE</th>
1903
                                    <th>LABEL_LANGUAGE</th>
Línea 1928... Línea 1920...
1928
                    </div>
1920
                    </div>
1929
                </div>
1921
                </div>
1930
            </div>
1922
            </div>
1931
        </div>
1923
        </div>
1932
    </div>
1924
    </div>
-
 
1925
 
1933
    <!-- Row Edit -->
1926
    <!-- Row Edit -->
1934
    <div class="row" id="row-edit" style="display: none">
1927
    <?php echo $this->partial('modals/forms.phtml',  array(
1935
        <div class="col-xs-12 col-md-12">
1928
		'status_inactive' => $status_inactive,
1936
            <form action="#" name="form-main" id="form-main">
-
 
1937
                <input type="hidden" name="form-id" id="form-id" value="0" />
-
 
1938
                <input type="hidden" name="form-continue" id="form-continue" value="0" />
-
 
1939
                <div class="form-group">
-
 
1940
                    <label for="form-name">LABEL_FIRST_NAME</label>
-
 
1941
                    <input type="text" name="form-name" id="form-name" class="form-control" maxlength="50" />
-
 
1942
                </div>
-
 
1943
                <div class="form-group">
-
 
1944
                    <label for="form-description">LABEL_DESCRIPTION</label>
-
 
1945
                    <!--  ckeditor -->
-
 
1946
                    <textarea  name="form-description" id="form-description" rows="5" class="ckeditor form-control"></textarea>
-
 
1947
                </div>
-
 
1948
                <div class="form-group">
-
 
1949
                    <label for="form-text">LABEL_TEXT</label>
-
 
1950
                    <!--  ckeditor -->
1929
		'status_active' => $status_active,
1951
                    <textarea  name="form-text" id="form-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1952
                </div>
-
 
1953
                <div class="form-group">
-
 
1954
                    <label for="form-language">LABEL_LANGUAGES</label>
-
 
1955
                    <select name="form-language" id="form-language" class="form-control">
-
 
1956
                        <option value="<?php echo $lang_en; ?>">LABEL_ENGLISH</option>
-
 
1957
                        <option value="<?php echo $lang_es; ?>">LABEL_SPANISH</option>
-
 
1958
                    </select>
-
 
1959
                </div>
-
 
1960
                <div class="form-group">
-
 
1961
                    <label for="form-status">LABEL_STATUS</label>
-
 
1962
                    <select name="form-status" id="form-status" class="form-control">
-
 
1963
                        <option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
-
 
1964
                        <option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
-
 
1965
                    </select>
-
 
1966
                </div>
1930
		'lang_es'=>$lang_es,
1967
                <br/>
1931
		'lang_en'=>$lang_en
1968
                <div class="row">
-
 
1969
                    <div class="col-xs-12 col-md-12 text-right">
-
 
1970
                        <button class="btn btn-primary" id="btn-add-section" data-toggle="tooltip" title="LABEL_ADD LABEL_SECTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_SECTION</button>
-
 
1971
                    </div>
-
 
1972
                </div>
-
 
1973
                <br />	
-
 
1974
                <div class="row">
-
 
1975
                    <div class="col-xs-12 col-md-12">
-
 
1976
                        <div class="panel-group" id="accordion"></div>
-
 
1977
                    </div>
-
 
1978
                </div>
-
 
1979
                <div class="form-group">
-
 
1980
                    <button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
-
 
1981
                    <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
-
 
1982
                    <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
-
 
1983
                </div>
-
 
1984
            </form>
-
 
1985
        </div>
-
 
1986
    </div>
1932
		)) ;?>
1987
    <!-- End Row Edit -->
1933
    <!-- End Row Edit -->
1988
	
1934
 
1989
    <!-- Modals -->
1935
    <!-- Modals -->
Línea 1990... Línea 1936...
1990
 
1936
 
1991
    <!-- Section Modal -->
1937
    <!-- Section Modal -->
1992
    <?php echo $this->partial('modals/sections.phtml') ;?>
1938
    <?php echo $this->partial('modals/sections.phtml') ;?>