- Adaptación de los formularios a iOS (iPhone / iPod)
- Traducción al castellano git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_FormulariosCalidad/trunk@13 e2c41b2c-0c6f-0149-8b81-50b1a9191bb3
This commit is contained in:
parent
9bacd4c2f7
commit
635411b52b
353
edit_form.php
353
edit_form.php
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/******************************************************************************
|
||||
MachForm
|
||||
|
||||
|
||||
Copyright 2007 Appnitro Software. This code cannot be redistributed without
|
||||
permission from http://www.appnitro.com/
|
||||
|
||||
|
||||
More info at: http://www.appnitro.com/
|
||||
******************************************************************************/
|
||||
session_start();
|
||||
|
||||
|
||||
require('config.php');
|
||||
require('includes/check-session.php');
|
||||
require('includes/db-core.php');
|
||||
@ -20,13 +20,13 @@
|
||||
}else{
|
||||
$form_id = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//get data from databae
|
||||
connect_db();
|
||||
|
||||
|
||||
//get form data
|
||||
$query = "select
|
||||
$query = "select
|
||||
form_name,
|
||||
form_description,
|
||||
form_redirect,
|
||||
@ -36,13 +36,13 @@
|
||||
form_captcha,
|
||||
form_review,
|
||||
form_frame_height
|
||||
from
|
||||
ap_forms
|
||||
where
|
||||
from
|
||||
ap_forms
|
||||
where
|
||||
form_id='$form_id'";
|
||||
$result = do_query($query);
|
||||
$row = do_fetch_result($result);
|
||||
|
||||
|
||||
$form = new stdClass();
|
||||
if(!empty($row)){
|
||||
$form->id = $form_id;
|
||||
@ -67,19 +67,19 @@
|
||||
$form->captcha = 0;
|
||||
$form->review = 0;
|
||||
}
|
||||
|
||||
|
||||
//get element options first and store it into array
|
||||
$query = "select
|
||||
$query = "select
|
||||
element_id,
|
||||
option_id,
|
||||
`position`,
|
||||
`option`,
|
||||
option_is_default
|
||||
from
|
||||
ap_element_options
|
||||
where
|
||||
form_id='$form_id' and live=1
|
||||
order by
|
||||
option_is_default
|
||||
from
|
||||
ap_element_options
|
||||
where
|
||||
form_id='$form_id' and live=1
|
||||
order by
|
||||
element_id asc,`position` asc";
|
||||
$result = do_query($query);
|
||||
while($row = do_fetch_result($result)){
|
||||
@ -90,10 +90,10 @@
|
||||
$options_lookup[$element_id][$option_id]['option_is_default'] = $row['option_is_default'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//get elements data
|
||||
$element = array();
|
||||
$query = "select
|
||||
$query = "select
|
||||
element_id,
|
||||
element_title,
|
||||
element_guidelines,
|
||||
@ -104,18 +104,18 @@
|
||||
element_type,
|
||||
element_position,
|
||||
element_default_value,
|
||||
element_constraint
|
||||
from
|
||||
ap_form_elements
|
||||
where
|
||||
form_id='$form_id'
|
||||
order by
|
||||
element_constraint
|
||||
from
|
||||
ap_form_elements
|
||||
where
|
||||
form_id='$form_id'
|
||||
order by
|
||||
element_position asc";
|
||||
$result = do_query($query);
|
||||
$j=0;
|
||||
while($row = do_fetch_result($result)){
|
||||
$element_id = $row['element_id'];
|
||||
|
||||
|
||||
//lookup element options first
|
||||
if(!empty($options_lookup[$element_id])){
|
||||
$element_options = array();
|
||||
@ -129,8 +129,8 @@
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//populate elements
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->title = $row['element_title'];
|
||||
@ -152,25 +152,25 @@
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$json = new Services_JSON();
|
||||
$json_form = $json->encode($form);
|
||||
|
||||
|
||||
|
||||
|
||||
$all_element = array('elements' => $element);
|
||||
|
||||
|
||||
$json_element = $json->encode($all_element);
|
||||
|
||||
|
||||
|
||||
$header_data =<<<EOT
|
||||
<script type="text/javascript" src="js/base.js"></script>
|
||||
<script type="text/javascript" src="js/machform.js"></script>
|
||||
EOT;
|
||||
|
||||
|
||||
$show_status_bar = true; //for header.php
|
||||
|
||||
require('includes/header.php');
|
||||
|
||||
require('includes/header.php');
|
||||
?>
|
||||
|
||||
<div id="main">
|
||||
@ -218,8 +218,8 @@ EOT;
|
||||
<li><a id="number" href="javascript:insert_element('number');"><img src="images/button_text/number.gif" /></a></li>
|
||||
<li><a id="checkboxes" href="javascript:insert_element('checkbox');"><img src="images/button_text/checkboxes.gif" /></a></li>
|
||||
<li><a id="drop_down" href="javascript:insert_element('select');"><img src="images/button_text/drop_down.gif" /></a></li>
|
||||
<li><a id="date" href="javascript:insert_element('date');"><img src="images/button_text/date.gif" /></a></li>
|
||||
<li><a id="phone" href="javascript:insert_element('phone');"><img src="images/button_text/phone.gif" /></a></li>
|
||||
<li><a id="date" href="javascript:insert_element('europe_date');"><img src="images/button_text/date.gif" /></a></li>
|
||||
<li><a id="phone" href="javascript:insert_element('simple_phone');"><img src="images/button_text/phone.gif" /></a></li>
|
||||
<li><a id="web_site" href="javascript:insert_element('url');"><img src="images/button_text/web_site.gif" /></a></li>
|
||||
<li><a id="email" href="javascript:insert_element('email');"><img src="images/button_text/email.gif" /></a></li>
|
||||
<li><a id="file_upload" href="javascript:insert_element('file');"><img src="images/button_text/file_upload.gif" /></a></li>
|
||||
@ -241,7 +241,7 @@ EOT;
|
||||
Etiqueta del campo
|
||||
<a href="#" class="tooltip" title="Etiqueta del campo" rel="La etiqueta del campo se sitúa encima del campo e indica qué información hay que introducir.">(?)</a>
|
||||
</label>
|
||||
<textarea id="element_label" class="textarea"
|
||||
<textarea id="element_label" class="textarea"
|
||||
onkeyup="set_properties(this.value, 'title')"
|
||||
/></textarea><img src="images/icons/arrow_left.gif" id="arrow_left" height="24" width="24" align="top" style="margin-left: 3px;" />
|
||||
</li>
|
||||
@ -289,8 +289,8 @@ Formato de fecha
|
||||
<a href="#" class="tooltip" title="Formato de fecha" rel="Puede elegir entre formato de fecha americano y europeo">(?)</a>
|
||||
</label>
|
||||
<select class="select full" id="date_type" autocomplete="off" onchange="set_properties(JJ(this).val(), 'type')">
|
||||
<option id="element_date" value="date">MM / DD / YYYY</option>
|
||||
<option id="element_europe_date" value="europe_date">DD / MM / YYYY</option>
|
||||
<option id="element_europe_date" value="europe_date">DD / MM / AAAA</option>
|
||||
<option id="element_date" value="date">MM / DD / AAAA</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
@ -311,8 +311,8 @@ Formato de teléfono
|
||||
<a href="#" class="tooltip" title="Formato de teléfono" rel="Puede elegir entre formato de fecha americano o internacional">(?)</a>
|
||||
</label>
|
||||
<select class="select full" id="phone_format" autocomplete="off" onchange="set_properties(JJ(this).val(), 'type')">
|
||||
<option id="element_phone" value="phone">(###) ### - ####</option>
|
||||
<option id="element_simple_phone" value="simple_phone">Internacional</option>
|
||||
<option id="element_phone" value="phone">(###) ### - ####</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
@ -346,8 +346,8 @@ Opciones
|
||||
<label class="choice" for="element_required">Obligatorio</label>
|
||||
<a href="#" class="tooltip" title="Obligatorio" rel="Marcando esta restricción, el usuario tendrá que rellenar este campo obligatoriamente y se le avisará para que lo haga en caso de que lo deje en blanco.">(?)</a><br>
|
||||
<span id="element_unique_span">
|
||||
<input id="element_unique" class="checkbox" value="" tabindex="15" onchange="(this.checked) ? checkVal = '1' : checkVal = '0';set_properties(checkVal, 'is_unique')" type="checkbox">
|
||||
<label class="choice" for="element_unique">Sin duplicados</label>
|
||||
<input id="element_unique" class="checkbox" value="" tabindex="15" onchange="(this.checked) ? checkVal = '1' : checkVal = '0';set_properties(checkVal, 'is_unique')" type="checkbox">
|
||||
<label class="choice" for="element_unique">Sin duplicados</label>
|
||||
<a href="#" class="tooltip" title="Sin duplicados" rel="Marcando esta restricción, se comprobará que los datos introducidos en este campo son únicos y no se han introducidor anteriormente.">(?)</a></span><br>
|
||||
</fieldset>
|
||||
</li>
|
||||
@ -404,42 +404,42 @@ País predeterminado
|
||||
<optgroup label="América del Norte y Central">
|
||||
<option value="Antigua and Barbuda">Antigua y Barbuda</option>
|
||||
<option value="Bahamas">Bahamas</option>
|
||||
<option value="Barbados">Barbados</option>
|
||||
<option value="Belize">Belice</option>
|
||||
<option value="Canada">Canadá</option>
|
||||
<option value="Costa Rica">Costa Rica</option>
|
||||
<option value="Cuba">Cuba</option>
|
||||
<option value="Dominica">Mancomunidad de Dominica</option>
|
||||
<option value="Barbados">Barbados</option>
|
||||
<option value="Belize">Belice</option>
|
||||
<option value="Canada">Canadá</option>
|
||||
<option value="Costa Rica">Costa Rica</option>
|
||||
<option value="Cuba">Cuba</option>
|
||||
<option value="Dominica">Mancomunidad de Dominica</option>
|
||||
<option value="El Salvador">El Salvador</option>
|
||||
<option value="United States">Estados Unidos</option>
|
||||
<option value="Grenada">Granada</option>
|
||||
<option value="Guatemala">Guatemala</option>
|
||||
<option value="Haiti">Haití</option>
|
||||
<option value="Honduras">Honduras</option>
|
||||
<option value="Jamaica">Jamaica</option>
|
||||
<option value="Mexico">México</option>
|
||||
<option value="Nicaragua">Nicaragua</option>
|
||||
<option value="Panama">Panamá</option>
|
||||
<option value="Puerto Rico">Puerto Rico</option>
|
||||
<option value="Grenada">Granada</option>
|
||||
<option value="Guatemala">Guatemala</option>
|
||||
<option value="Haiti">Haití</option>
|
||||
<option value="Honduras">Honduras</option>
|
||||
<option value="Jamaica">Jamaica</option>
|
||||
<option value="Mexico">México</option>
|
||||
<option value="Nicaragua">Nicaragua</option>
|
||||
<option value="Panama">Panamá</option>
|
||||
<option value="Puerto Rico">Puerto Rico</option>
|
||||
<option value="Dominican Republic">República Dominicana</option>
|
||||
<option value="Saint Kitts and Nevis">San Cristóbal y Nieves</option>
|
||||
<option value="Saint Kitts and Nevis">San Cristóbal y Nieves</option>
|
||||
<option value="Saint Lucia">Santa Lucía</option>
|
||||
<option value="Saint Vincent and the Grenadines">San Vicente y las Granadinas</option>
|
||||
<option value="Saint Vincent and the Grenadines">San Vicente y las Granadinas</option>
|
||||
<option value="Trinidad and Tobago">Trinidad y Tobago</option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="América del Sur">
|
||||
<option value="Argentina">Argentina</option>
|
||||
<option value="Bolivia">Bolivia</option>
|
||||
<option value="Brazil">Brasil</option>
|
||||
<option value="Chile">Chile</option>
|
||||
<option value="Bolivia">Bolivia</option>
|
||||
<option value="Brazil">Brasil</option>
|
||||
<option value="Chile">Chile</option>
|
||||
<option value="Columbia">Colombia</option>
|
||||
<option value="Ecuador">Ecuador</option>
|
||||
<option value="Guyana">Guyana</option>
|
||||
<option value="Paraguay">Paraguay</option>
|
||||
<option value="Peru">Perú</option>
|
||||
<option value="Suriname">Surinam</option>
|
||||
<option value="Uruguay">Uruguay</option>
|
||||
<option value="Ecuador">Ecuador</option>
|
||||
<option value="Guyana">Guyana</option>
|
||||
<option value="Paraguay">Paraguay</option>
|
||||
<option value="Peru">Perú</option>
|
||||
<option value="Suriname">Surinam</option>
|
||||
<option value="Uruguay">Uruguay</option>
|
||||
<option value="Venezuela">Venezuela</option>
|
||||
</optgroup>
|
||||
|
||||
@ -450,47 +450,47 @@ País predeterminado
|
||||
<option value="Armenia">Armenia</option>
|
||||
<option value="Austria">Austria</option>
|
||||
<option value="Azerbaijan">Azerbaiyán</option>
|
||||
<option value="Belgium">Bélgica</option>
|
||||
<option value="Belgium">Bélgica</option>
|
||||
<option value="Belarus">Bielorrusia</option>
|
||||
<option value="Bosnia and Herzegovina">Bosnia y Herzegovina</option>
|
||||
<option value="Bulgaria">Bulgaria</option>
|
||||
<option value="Bulgaria">Bulgaria</option>
|
||||
<option value="Vatican City">Ciudad del Vaticano</option>
|
||||
<option value="Croatia">Croacia</option>
|
||||
<option value="Cyprus">Chipre</option>
|
||||
<option value="Denmark">Dinamarca</option>
|
||||
<option value="Croatia">Croacia</option>
|
||||
<option value="Cyprus">Chipre</option>
|
||||
<option value="Denmark">Dinamarca</option>
|
||||
<option value="Slovakia">Eslovaquia</option>
|
||||
<option value="Slovenia">Eslovenia</option>
|
||||
<option value="Spain">España</option>
|
||||
<option value="Estonia">Estonia</option>
|
||||
<option value="Finland">Finlandia</option>
|
||||
<option value="France">Francia</option>
|
||||
<option value="Slovenia">Eslovenia</option>
|
||||
<option value="Spain">España</option>
|
||||
<option value="Estonia">Estonia</option>
|
||||
<option value="Finland">Finlandia</option>
|
||||
<option value="France">Francia</option>
|
||||
<option value="Georgia">Georgia</option>
|
||||
<option value="Greece">Grecia</option>
|
||||
<option value="Hungary">Hungría</option>
|
||||
<option value="Iceland">Islandia</option>
|
||||
<option value="Ireland">Irlanda</option>
|
||||
<option value="Italy">Italia</option>
|
||||
<option value="Latvia">Letonia</option>
|
||||
<option value="Greece">Grecia</option>
|
||||
<option value="Hungary">Hungría</option>
|
||||
<option value="Iceland">Islandia</option>
|
||||
<option value="Ireland">Irlanda</option>
|
||||
<option value="Italy">Italia</option>
|
||||
<option value="Latvia">Letonia</option>
|
||||
<option value="Liechtenstein">Liechtenstein</option>
|
||||
<option value="Lithuania">Lituania</option>
|
||||
<option value="Luxembourg">Luxemburgo</option>
|
||||
<option value="Macedonia">Macedonia</option>
|
||||
<option value="Malta">Malta</option>
|
||||
<option value="Moldova">Moldavia</option>
|
||||
<option value="Monaco">Mónaco</option>
|
||||
<option value="Montenegro">Montenegro</option>
|
||||
<option value="Norway">Noruega</option>
|
||||
<option value="Netherlands">Países Bajos</option>
|
||||
<option value="Poland">Polonia</option>
|
||||
<option value="Lithuania">Lituania</option>
|
||||
<option value="Luxembourg">Luxemburgo</option>
|
||||
<option value="Macedonia">Macedonia</option>
|
||||
<option value="Malta">Malta</option>
|
||||
<option value="Moldova">Moldavia</option>
|
||||
<option value="Monaco">Mónaco</option>
|
||||
<option value="Montenegro">Montenegro</option>
|
||||
<option value="Norway">Noruega</option>
|
||||
<option value="Netherlands">Países Bajos</option>
|
||||
<option value="Poland">Polonia</option>
|
||||
<option value="Portugal">Portugal</option>
|
||||
<option value="United Kingdom">Reino Unido</option>
|
||||
<option value="Czech Republic">República Checa</option>
|
||||
<option value="Romania">Rumanía</option>
|
||||
<option value="Romania">Rumanía</option>
|
||||
<option value="San Marino">San Marino</option>
|
||||
<option value="Serbia">Serbia</option>
|
||||
<option value="Sweden">Suecia</option>
|
||||
<option value="Switzerland">Suiza</option>
|
||||
<option value="Ukraine">Ucrania</option>
|
||||
<option value="Sweden">Suecia</option>
|
||||
<option value="Switzerland">Suiza</option>
|
||||
<option value="Ukraine">Ucrania</option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="Asia">
|
||||
@ -503,7 +503,7 @@ País predeterminado
|
||||
<option value="Cambodia">Camboya</option>
|
||||
<option value="China">China</option>
|
||||
<option value="East Timor">Timor Oriental</option>
|
||||
<option value="Hong Kong">Hong Kong</option>
|
||||
<option value="Hong Kong">Hong Kong</option>
|
||||
<option value="India">India</option>
|
||||
<option value="Indonesia">Indonesia</option>
|
||||
<option value="Iran">Irán</option>
|
||||
@ -514,103 +514,103 @@ País predeterminado
|
||||
<option value="Kazakhstan">Kazajistán</option>
|
||||
<option value="North Korea">Corea del Norte</option>
|
||||
<option value="South Korea">Corea del Sur</option>
|
||||
<option value="Kuwait">Kuwait</option>
|
||||
<option value="Kyrgyzstan">Kirguistán</option>
|
||||
<option value="Laos">Laos</option>
|
||||
<option value="Lebanon">Líbano</option>
|
||||
<option value="Malaysia">Malasia</option>
|
||||
<option value="Maldives">Maldivas</option>
|
||||
<option value="Mongolia">Mongolia</option>
|
||||
<option value="Nepal">Nepal</option>
|
||||
<option value="Oman">Omán</option>
|
||||
<option value="Pakistan">Pakistán</option>
|
||||
<option value="Philippines">Filipinas</option>
|
||||
<option value="Qatar">Catar</option>
|
||||
<option value="Russia">Rusia</option>
|
||||
<option value="Saudi Arabia">Arabia Saudita</option>
|
||||
<option value="Singapore">Singapur</option>
|
||||
<option value="Kuwait">Kuwait</option>
|
||||
<option value="Kyrgyzstan">Kirguistán</option>
|
||||
<option value="Laos">Laos</option>
|
||||
<option value="Lebanon">Líbano</option>
|
||||
<option value="Malaysia">Malasia</option>
|
||||
<option value="Maldives">Maldivas</option>
|
||||
<option value="Mongolia">Mongolia</option>
|
||||
<option value="Nepal">Nepal</option>
|
||||
<option value="Oman">Omán</option>
|
||||
<option value="Pakistan">Pakistán</option>
|
||||
<option value="Philippines">Filipinas</option>
|
||||
<option value="Qatar">Catar</option>
|
||||
<option value="Russia">Rusia</option>
|
||||
<option value="Saudi Arabia">Arabia Saudita</option>
|
||||
<option value="Singapore">Singapur</option>
|
||||
<option value="Sri Lanka">Sri Lanka</option>
|
||||
<option value="Syria">Siria</option>
|
||||
<option value="Taiwan">Taiwán</option>
|
||||
<option value="Tajikistan">Tayikistán</option>
|
||||
<option value="Thailand">Tailandia</option>
|
||||
<option value="Turkey">Turquía</option>
|
||||
<option value="Turkmenistan">Turkmenistán</option>
|
||||
<option value="Taiwan">Taiwán</option>
|
||||
<option value="Tajikistan">Tayikistán</option>
|
||||
<option value="Thailand">Tailandia</option>
|
||||
<option value="Turkey">Turquía</option>
|
||||
<option value="Turkmenistan">Turkmenistán</option>
|
||||
<option value="United Arab Emirates">Emiratos Árabes Unidos</option>
|
||||
<option value="Uzbekistan">Uzbekistán</option>
|
||||
<option value="Vietnam">Vietnam</option>
|
||||
<option value="Uzbekistan">Uzbekistán</option>
|
||||
<option value="Vietnam">Vietnam</option>
|
||||
<option value="Yemen">Yemen</option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="Oceania">
|
||||
<option value="Australia">Australia</option>
|
||||
<option value="Fiji">Fiji</option>
|
||||
<option value="Fiji">Fiji</option>
|
||||
<option value="Kiribati">Kiribati</option>
|
||||
<option value="Marshall Islands">Islas Marshall</option>
|
||||
<option value="Micronesia">Micronesia</option>
|
||||
<option value="Nauru">Nauru</option>
|
||||
<option value="Marshall Islands">Islas Marshall</option>
|
||||
<option value="Micronesia">Micronesia</option>
|
||||
<option value="Nauru">Nauru</option>
|
||||
<option value="New Zealand">Nueva Zelanda</option>
|
||||
<option value="Palau">Palau</option>
|
||||
<option value="Papua New Guinea">Papúa Nueva Guinea</option>
|
||||
<option value="Samoa">Samoa</option>
|
||||
<option value="Samoa">Samoa</option>
|
||||
<option value="Solomon Islands">Islas Solomón</option>
|
||||
<option value="Tonga">Tonga</option>
|
||||
<option value="Tuvalu">Tuvalu</option>
|
||||
<option value="Tonga">Tonga</option>
|
||||
<option value="Tuvalu">Tuvalu</option>
|
||||
<option value="Vanuatu">Vanuatu</option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="África">
|
||||
<option value="Algeria">Argelia</option>
|
||||
<option value="Angola">Angola</option>
|
||||
<option value="Benin">Benin</option>
|
||||
<option value="Botswana">Botswana</option>
|
||||
<option value="Burkina Faso">Burkina Faso</option>
|
||||
<option value="Burundi">Burundi</option>
|
||||
<option value="Cameroon">Camerún</option>
|
||||
<option value="Algeria">Argelia</option>
|
||||
<option value="Angola">Angola</option>
|
||||
<option value="Benin">Benin</option>
|
||||
<option value="Botswana">Botswana</option>
|
||||
<option value="Burkina Faso">Burkina Faso</option>
|
||||
<option value="Burundi">Burundi</option>
|
||||
<option value="Cameroon">Camerún</option>
|
||||
<option value="Cape Verde">Cabo Verde</option>
|
||||
<option value="Central African Republic">República Centroafricana</option>
|
||||
<option value="Chad">Chad</option>
|
||||
<option value="Comoros">Comoras</option>
|
||||
<option value="Chad">Chad</option>
|
||||
<option value="Comoros">Comoras</option>
|
||||
<option value="Congo">Congo</option>
|
||||
<option value="Djibouti">Djibouti</option>
|
||||
<option value="Egypt">Egipto</option>
|
||||
<option value="Equatorial Guinea">Guinea Ecuatorial</option>
|
||||
<option value="Eritrea">Eritrea</option>
|
||||
<option value="Ethiopia">Etiopía</option>
|
||||
<option value="Gabon">Gabón</option>
|
||||
<option value="Gambia">Gambia</option>
|
||||
<option value="Ghana">Ghana</option>
|
||||
<option value="Guinea">Guinea</option>
|
||||
<option value="Djibouti">Djibouti</option>
|
||||
<option value="Egypt">Egipto</option>
|
||||
<option value="Equatorial Guinea">Guinea Ecuatorial</option>
|
||||
<option value="Eritrea">Eritrea</option>
|
||||
<option value="Ethiopia">Etiopía</option>
|
||||
<option value="Gabon">Gabón</option>
|
||||
<option value="Gambia">Gambia</option>
|
||||
<option value="Ghana">Ghana</option>
|
||||
<option value="Guinea">Guinea</option>
|
||||
<option value="Guinea-Bissau">Guinea-Bissau</option>
|
||||
<option value="Côte d'Ivoire">Côte d'Ivoire</option>
|
||||
<option value="Kenya">Kenya</option>
|
||||
<option value="Lesotho">Lesotho</option>
|
||||
<option value="Liberia">Liberia</option>
|
||||
<option value="Libya">Libia</option>
|
||||
<option value="Madagascar">Madagascar</option>
|
||||
<option value="Malawi">Malawi</option>
|
||||
<option value="Côte d'Ivoire">Côte d'Ivoire</option>
|
||||
<option value="Kenya">Kenya</option>
|
||||
<option value="Lesotho">Lesotho</option>
|
||||
<option value="Liberia">Liberia</option>
|
||||
<option value="Libya">Libia</option>
|
||||
<option value="Madagascar">Madagascar</option>
|
||||
<option value="Malawi">Malawi</option>
|
||||
<option value="Mali">Malí</option>
|
||||
<option value="Mauritania">Mauritania</option>
|
||||
<option value="Mauritius">Mauricio</option>
|
||||
<option value="Morocco">Marruecos</option>
|
||||
<option value="Mozambique">Mozambique</option>
|
||||
<option value="Mauritania">Mauritania</option>
|
||||
<option value="Mauritius">Mauricio</option>
|
||||
<option value="Morocco">Marruecos</option>
|
||||
<option value="Mozambique">Mozambique</option>
|
||||
<option value="Namibia">Namibia</option>
|
||||
<option value="Niger">Níger</option>
|
||||
<option value="Nigeria">Nigeria</option>
|
||||
<option value="Rwanda">Ruanda</option>
|
||||
<option value="Nigeria">Nigeria</option>
|
||||
<option value="Rwanda">Ruanda</option>
|
||||
<option value="Sao Tome and Principe">Santo Tomé y Príncipe</option>
|
||||
<option value="Senegal">Senegal</option>
|
||||
<option value="Seychelles">Seychelles</option>
|
||||
<option value="Senegal">Senegal</option>
|
||||
<option value="Seychelles">Seychelles</option>
|
||||
<option value="Sierra Leone">Sierra Leona</option>
|
||||
<option value="Somalia">Somalia</option>
|
||||
<option value="Somalia">Somalia</option>
|
||||
<option value="South Africa">Sudáfrica</option>
|
||||
<option value="Sudan">Sudán</option>
|
||||
<option value="Swaziland">Suazilandia</option>
|
||||
<option value="Sudan">Sudán</option>
|
||||
<option value="Swaziland">Suazilandia</option>
|
||||
<option value="United Republic of Tanzania">Tanzania</option>
|
||||
<option value="Togo">Togo</option>
|
||||
<option value="Tunisia">Túnez</option>
|
||||
<option value="Uganda">Uganda</option>
|
||||
<option value="Zambia">Zambia</option>
|
||||
<option value="Togo">Togo</option>
|
||||
<option value="Tunisia">Túnez</option>
|
||||
<option value="Uganda">Uganda</option>
|
||||
<option value="Zambia">Zambia</option>
|
||||
<option value="Zimbabwe">Zimbabue</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
@ -622,7 +622,7 @@ Valor predeterminado
|
||||
<a href="#" class="tooltip" title="Default Value" rel="Al mostrar el formulario, este campo se rellenará con el valor que se indique aquí.">(?)</a>
|
||||
</label>
|
||||
|
||||
( <input id="element_phone_default1" class="text" size="3" name="text" value="" tabindex="11" maxlength="3" onkeyup="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" onblur="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" type="text"> )
|
||||
( <input id="element_phone_default1" class="text" size="3" name="text" value="" tabindex="11" maxlength="3" onkeyup="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" onblur="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" type="text"> )
|
||||
|
||||
<input id="element_phone_default2" class="text" size="3" name="text" value="" tabindex="11" maxlength="3" onkeyup="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" onblur="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" type="text"> -
|
||||
<input id="element_phone_default3" class="text" size="4" name="text" value="" tabindex="11" maxlength="4" onkeyup="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" onblur="set_properties(JJ('#element_phone_default1').val().toString()+JJ('#element_phone_default2').val().toString()+JJ('#element_phone_default3').val().toString(), 'default_value')" type="text">
|
||||
@ -707,14 +707,15 @@ Instrucciones para los usuarios
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$footer_data =<<<EOT
|
||||
<script type="text/javascript">
|
||||
var json_form = {$json_form};
|
||||
var json_elements = {$json_element};
|
||||
</script>
|
||||
EOT;
|
||||
require('includes/footer.php');
|
||||
require('includes/footer.php');
|
||||
?>
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
global $lang;
|
||||
|
||||
//simple name and extended name
|
||||
$lang['name_first'] = 'Primero';
|
||||
$lang['name_last'] = 'Último';
|
||||
$lang['name_first'] = 'Nombre';
|
||||
$lang['name_last'] = 'Apellidos';
|
||||
$lang['name_title'] = 'Título';
|
||||
$lang['name_suffix'] = 'Sufijo';
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
//date
|
||||
$lang['date_dd'] = 'DD';
|
||||
$lang['date_mm'] = 'MM';
|
||||
$lang['date_yyyy'] = 'YYYY';
|
||||
$lang['date_yyyy'] = 'AAAA';
|
||||
|
||||
//price
|
||||
$lang['price_dollar_main'] = 'Dólares';
|
||||
|
||||
@ -8,10 +8,8 @@
|
||||
More info at: http://www.appnitro.com/
|
||||
******************************************************************************/
|
||||
|
||||
namespace mobile_view_funcions;
|
||||
|
||||
//Single Line Text
|
||||
function display_text($element){
|
||||
function mobile_display_text($element){
|
||||
|
||||
//check for error
|
||||
$error_message = '';
|
||||
@ -62,7 +60,7 @@ EOT;
|
||||
|
||||
|
||||
//Paragraph Text
|
||||
function display_textarea($element){
|
||||
function mobile_display_textarea($element){
|
||||
//check for error
|
||||
$error_message = '';
|
||||
$span_required = '';
|
||||
@ -116,7 +114,7 @@ EOT;
|
||||
|
||||
|
||||
//File Upload
|
||||
function display_file($element){
|
||||
function mobile_display_file($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -156,7 +154,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Website
|
||||
function display_url($element){
|
||||
function mobile_display_url($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -201,7 +199,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Email
|
||||
function display_email($element){
|
||||
function mobile_display_email($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -242,7 +240,7 @@ EOT;
|
||||
|
||||
|
||||
//Phone - Extended
|
||||
function display_phone($element){
|
||||
function mobile_display_phone($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -309,7 +307,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Phone - Simple
|
||||
function display_simple_phone($element){
|
||||
function mobile_display_simple_phone($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -351,7 +349,7 @@ EOT;
|
||||
|
||||
|
||||
//Date - Normal
|
||||
function display_date($element){
|
||||
function mobile_display_date($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -417,7 +415,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Date - Normal
|
||||
function display_europe_date($element){
|
||||
function mobile_display_europe_date($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -483,7 +481,7 @@ EOT;
|
||||
|
||||
|
||||
//Multiple Choice
|
||||
function display_radio($element){
|
||||
function mobile_display_radio($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -546,7 +544,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Checkboxes
|
||||
function display_checkbox($element){
|
||||
function mobile_display_checkbox($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -626,7 +624,7 @@ EOT;
|
||||
|
||||
|
||||
//Dropdown
|
||||
function display_select($element){
|
||||
function mobile_display_select($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -694,17 +692,15 @@ EOT;
|
||||
|
||||
|
||||
//Name - Simple
|
||||
function display_simple_name($element){
|
||||
function mobile_display_simple_name($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
$span_required = '';
|
||||
$guidelines = '';
|
||||
global $lang;
|
||||
|
||||
if(!empty($element->is_error)){
|
||||
$error_class = 'class="error"';
|
||||
$error_message = "<p class=\"error\">{$element->error_message}</p>";
|
||||
$error_message = "<br/><p class=\"error\">{$element->error_message}</p>";
|
||||
}
|
||||
|
||||
//check for required
|
||||
@ -714,38 +710,37 @@ EOT;
|
||||
|
||||
//check for guidelines
|
||||
if(!empty($element->guidelines)){
|
||||
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\"><small>{$element->guidelines}</small></p>";
|
||||
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\">{$element->guidelines}</p>";
|
||||
}
|
||||
|
||||
$element_markup = <<<EOT
|
||||
<li id="li_{$element->id}" {$error_class}>
|
||||
<label class="description">{$element->title} {$span_required}</label>
|
||||
<span>
|
||||
<input id="element_{$element->id}_1" name= "element_{$element->id}_1" class="element text" maxlength="255" size="8" value="{$element->populated_value['element_'.$element->id.'_1']['default_value']}" />
|
||||
<label>{$lang['name_first']}</label>
|
||||
</span>
|
||||
<span>
|
||||
<input id="element_{$element->id}_2" name= "element_{$element->id}_2" class="element text" maxlength="255" size="14" value="{$element->populated_value['element_'.$element->id.'_2']['default_value']}" />
|
||||
<label>{$lang['name_last']}</label>
|
||||
</span>{$guidelines} {$error_message}
|
||||
</li>
|
||||
<span class="graytitle">{$element->title} {$span_required}</span>
|
||||
{$error_message}
|
||||
{$guidelines}
|
||||
<ul class="pageitem">
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['name_first']}" type="text" id="element_{$element->id}_1" name="element_{$element->id}_1" class="element text" value="{$element->populated_value['element_'.$element->id.'_1']['default_value']}" />
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['name_last']}" type="text" id="element_{$element->id}_2" name="element_{$element->id}_2" class="element text" value="{$element->populated_value['element_'.$element->id.'_2']['default_value']}" />
|
||||
</li>
|
||||
</ul>
|
||||
EOT;
|
||||
|
||||
|
||||
return $element_markup;
|
||||
}
|
||||
|
||||
//Name
|
||||
function display_name($element){
|
||||
function mobile_display_name($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
$span_required = '';
|
||||
$guidelines = '';
|
||||
global $lang;
|
||||
|
||||
if(!empty($element->is_error)){
|
||||
$error_class = 'class="error"';
|
||||
$error_message = "<p class=\"error\">{$element->error_message}</p>";
|
||||
$error_message = "<br/><p class=\"error\">{$element->error_message}</p>";
|
||||
}
|
||||
|
||||
//check for required
|
||||
@ -755,10 +750,30 @@ EOT;
|
||||
|
||||
//check for guidelines
|
||||
if(!empty($element->guidelines)){
|
||||
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\"><small>{$element->guidelines}</small></p>";
|
||||
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\">{$element->guidelines}</p>";
|
||||
}
|
||||
|
||||
$element_markup = <<<EOT
|
||||
<span class="graytitle">{$element->title} {$span_required}</span>
|
||||
{$error_message}
|
||||
{$guidelines}
|
||||
<ul class="pageitem">
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['name_title']}" type="text" id="element_{$element->id}_1" name="element_{$element->id}_1" class="element text" value="{$element->populated_value['element_'.$element->id.'_1']['default_value']}"/>
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['name_first']}" type="text" id="element_{$element->id}_2" name="element_{$element->id}_2" class="element text" value="{$element->populated_value['element_'.$element->id.'_2']['default_value']}" />
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['name_last']}" type="text" id="element_{$element->id}_3" name="element_{$element->id}_3" class="element text" value="{$element->populated_value['element_'.$element->id.'_3']['default_value']}" />
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['name_suffix']}" type="text" id="element_{$element->id}_4" name="element_{$element->id}_4" class="element text" value="{$element->populated_value['element_'.$element->id.'_4']['default_value']}" />
|
||||
</li>
|
||||
</ul>
|
||||
EOT;
|
||||
|
||||
/*
|
||||
<li id="li_{$element->id}" {$error_class}>
|
||||
<label class="description">{$element->title} {$span_required}</label>
|
||||
<span>
|
||||
@ -778,13 +793,13 @@ $element_markup = <<<EOT
|
||||
<label>{$lang['name_suffix']}</label>
|
||||
</span>{$guidelines} {$error_message}
|
||||
</li>
|
||||
EOT;
|
||||
*/
|
||||
|
||||
return $element_markup;
|
||||
}
|
||||
|
||||
//Time
|
||||
function display_time($element){
|
||||
function mobile_display_time($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -855,7 +870,7 @@ EOT;
|
||||
|
||||
|
||||
//Price
|
||||
function display_money($element){
|
||||
function mobile_display_money($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -933,7 +948,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Section Break
|
||||
function display_section($element){
|
||||
function mobile_display_section($element){
|
||||
$element->guidelines = nl2br($element->guidelines);
|
||||
$element_markup = <<<EOT
|
||||
<li id="li_{$element->id}" class="section_break">
|
||||
@ -948,7 +963,7 @@ EOT;
|
||||
|
||||
|
||||
//Number
|
||||
function display_number($element){
|
||||
function mobile_display_number($element){
|
||||
//check for error
|
||||
$error_message = '';
|
||||
$span_required = '';
|
||||
@ -996,7 +1011,7 @@ EOT;
|
||||
|
||||
|
||||
//Address
|
||||
function display_address($element){
|
||||
function mobile_display_address($element){
|
||||
|
||||
$country[0]['label'] = "Afghanistan";
|
||||
$country[1]['label'] = "Albania";
|
||||
@ -1390,15 +1405,13 @@ EOT;
|
||||
$country[193]['value'] = "Zimbabwe";
|
||||
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
$span_required = '';
|
||||
$guidelines = '';
|
||||
global $lang;
|
||||
|
||||
if(!empty($element->is_error)){
|
||||
$error_class = 'class="error"';
|
||||
$error_message = "<p class=\"error\">{$element->error_message}</p>";
|
||||
$error_message = "<br/><p class=\"error\">{$element->error_message}</p>";
|
||||
}
|
||||
|
||||
//check for required
|
||||
@ -1408,7 +1421,7 @@ EOT;
|
||||
|
||||
//check for guidelines
|
||||
if(!empty($element->guidelines)){
|
||||
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\"><small>{$element->guidelines}</small></p>";
|
||||
$guidelines = "<p class=\"guidelines\" id=\"guide_{$element->id}\">{$element->guidelines}</p>";
|
||||
}
|
||||
|
||||
|
||||
@ -1438,7 +1451,29 @@ EOT;
|
||||
}
|
||||
|
||||
$element_markup = <<<EOT
|
||||
<li id="li_{$element->id}" {$error_class}>
|
||||
<span class="graytitle">{$element->title} {$span_required}</span>
|
||||
{$error_message}
|
||||
{$guidelines}
|
||||
<ul class="pageitem">
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['address_street']}" type="text" id="element_{$element->id}_1" name="element_{$element->id}_1" class="element text" value="{$element->populated_value['element_'.$element->id.'_1']['default_value']}"/>
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['address_street2']}" type="text" id="element_{$element->id}_2" name="element_{$element->id}_2" class="element text" value="{$element->populated_value['element_'.$element->id.'_2']['default_value']}"/>
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['address_city']}" type="text" id="element_{$element->id}_3" name="element_{$element->id}_3" class="element text" value="{$element->populated_value['element_'.$element->id.'_3']['default_value']}"/>
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['address_state']}" type="text" id="element_{$element->id}_4" name="element_{$element->id}_4" class="element text" value="{$element->populated_value['element_'.$element->id.'_4']['default_value']}"/>
|
||||
</li>
|
||||
<li class="bigfield">
|
||||
<input placeholder="{$lang['address_zip']}" type="number" id="element_{$element->id}_5" name="element_{$element->id}_5" class="element text" value="{$element->populated_value['element_'.$element->id.'_5']['default_value']}"/>
|
||||
</li>
|
||||
</ul>
|
||||
EOT;
|
||||
|
||||
/* <li id="li_{$element->id}" {$error_class}>
|
||||
<label class="description">{$element->title} {$span_required}</label>
|
||||
|
||||
<div id="li_{$element->id}_div_1">
|
||||
@ -1473,7 +1508,8 @@ $element_markup = <<<EOT
|
||||
<label for="element_{$element->id}_6">{$lang['address_country']}</label>
|
||||
</div> {$guidelines} {$error_message}
|
||||
</li>
|
||||
EOT;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
return $element_markup;
|
||||
@ -1481,7 +1517,7 @@ EOT;
|
||||
|
||||
|
||||
//Captcha
|
||||
function display_captcha($element){
|
||||
function mobile_display_captcha($element){
|
||||
|
||||
if(!empty($element->error_message)){
|
||||
$error_code = $element->error_message;
|
||||
@ -1568,7 +1604,7 @@ EOT;
|
||||
//2. New form with error (displayed when 1 submitted and having error, form populated with user inputs)
|
||||
//3. Edit form (form populated with data from db)
|
||||
//4. Edit form with error (displayed when 3 submiteed and having error)
|
||||
function display_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$embed=false){
|
||||
function mobile_display_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$embed=false){
|
||||
|
||||
global $lang;
|
||||
|
||||
@ -1597,7 +1633,7 @@ EOT;
|
||||
$result = do_query($query);
|
||||
$row = do_fetch_result($result);
|
||||
|
||||
$form = new \stdClass();
|
||||
$form = new stdClass();
|
||||
|
||||
$form->id = $form_id;
|
||||
$form->name = $row['form_name'];
|
||||
@ -1679,7 +1715,7 @@ EOT;
|
||||
$element_options = array();
|
||||
$i=0;
|
||||
foreach ($options_lookup[$element_id] as $option_id=>$data){
|
||||
$element_options[$i] = new \stdClass();
|
||||
$element_options[$i] = new stdClass();
|
||||
$element_options[$i]->id = $option_id;
|
||||
$element_options[$i]->option = $data['option'];
|
||||
$element_options[$i]->is_default = $data['option_is_default'];
|
||||
@ -1690,7 +1726,7 @@ EOT;
|
||||
|
||||
|
||||
//populate elements
|
||||
$element[$j] = new \stdClass();
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->title = nl2br($row['element_title']);
|
||||
$element[$j]->guidelines = $row['element_guidelines'];
|
||||
$element[$j]->size = $row['element_size'];
|
||||
@ -1740,7 +1776,7 @@ EOT;
|
||||
|
||||
//add captcha if enable
|
||||
if(!empty($form->captcha) && (empty($edit_id))){
|
||||
$element[$j] = new \stdClass();
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->type = 'captcha';
|
||||
$element[$j]->form_id = $form_id;
|
||||
$element[$j]->is_private = 0;
|
||||
@ -1757,7 +1793,7 @@ EOT;
|
||||
if($element_data->is_private && empty($_SESSION['logged_in'])){ //don't show private element
|
||||
continue;
|
||||
}
|
||||
$all_element_markup .= call_user_func(__NAMESPACE__ .'\display_'.$element_data->type,$element_data);
|
||||
$all_element_markup .= call_user_func('mobile_display_'.$element_data->type,$element_data);
|
||||
}
|
||||
|
||||
if(!empty($custom_error)){
|
||||
@ -1932,7 +1968,7 @@ EOT;
|
||||
}
|
||||
|
||||
//this function is similar as display_form, but designed to display form without IFRAME
|
||||
function display_integrated_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$machform_path){
|
||||
function mobile_display_integrated_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$machform_path){
|
||||
|
||||
global $lang;
|
||||
|
||||
@ -1961,7 +1997,7 @@ EOT;
|
||||
$result = do_query($query);
|
||||
$row = do_fetch_result($result);
|
||||
|
||||
$form = new \stdClass();
|
||||
$form = new stdClass();
|
||||
|
||||
$form->id = $form_id;
|
||||
$form->name = $row['form_name'];
|
||||
@ -2044,7 +2080,7 @@ EOT;
|
||||
$element_options = array();
|
||||
$i=0;
|
||||
foreach ($options_lookup[$element_id] as $option_id=>$data){
|
||||
$element_options[$i] = new \stdClass();
|
||||
$element_options[$i] = new stdClass();
|
||||
$element_options[$i]->id = $option_id;
|
||||
$element_options[$i]->option = $data['option'];
|
||||
$element_options[$i]->is_default = $data['option_is_default'];
|
||||
@ -2055,7 +2091,7 @@ EOT;
|
||||
|
||||
|
||||
//populate elements
|
||||
$element[$j] = new \stdClass();
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->title = nl2br($row['element_title']);
|
||||
|
||||
if(empty($edit_id)){
|
||||
@ -2111,7 +2147,7 @@ EOT;
|
||||
|
||||
//add captcha if enable
|
||||
if(!empty($form->captcha) && (empty($edit_id))){
|
||||
$element[$j] = new \stdClass();
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->type = 'captcha';
|
||||
$element[$j]->form_id = $form_id;
|
||||
$element[$j]->machform_path = $machform_path;
|
||||
@ -2128,7 +2164,7 @@ EOT;
|
||||
if($element_data->is_private && empty($_SESSION['logged_in'])){ //don't show private element
|
||||
continue;
|
||||
}
|
||||
$all_element_markup .= call_user_func('display_'.$element_data->type,$element_data);
|
||||
$all_element_markup .= call_user_func('mobile_display_'.$element_data->type,$element_data);
|
||||
}
|
||||
|
||||
if(!empty($custom_error)){
|
||||
@ -2266,7 +2302,7 @@ EOT;
|
||||
|
||||
}
|
||||
|
||||
function display_success($form_id,$embed=false){
|
||||
function mobile_display_success($form_id,$embed=false){
|
||||
//get form properties data
|
||||
$query = "select
|
||||
form_success_message,
|
||||
@ -2280,7 +2316,7 @@ EOT;
|
||||
$result = do_query($query);
|
||||
$row = do_fetch_result($result);
|
||||
|
||||
$form = new \stdClass();
|
||||
$form = new stdClass();
|
||||
|
||||
$form->id = $form_id;
|
||||
$form->success_message = nl2br($row['form_success_message']);
|
||||
@ -2347,7 +2383,7 @@ EOT;
|
||||
<h2>{$form->success_message}</h2>
|
||||
</div>
|
||||
<div id="footer" class="success">
|
||||
Powered by <a href="http://www.appnitro.com" target="_blank">MachForm</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<img id="bottom" src="images/bottom.png" alt="" />
|
||||
@ -2359,7 +2395,7 @@ EOT;*/
|
||||
}
|
||||
|
||||
//this function is similar as display_success, but designed to display success page without IFRAME
|
||||
function display_integrated_success($form_id,$machform_path){
|
||||
function mobile_display_integrated_success($form_id,$machform_path){
|
||||
//get form properties data
|
||||
$query = "select
|
||||
form_success_message,
|
||||
@ -2372,7 +2408,7 @@ EOT;*/
|
||||
$result = do_query($query);
|
||||
$row = do_fetch_result($result);
|
||||
|
||||
$form = new \stdClass();
|
||||
$form = new stdClass();
|
||||
|
||||
$form->id = $form_id;
|
||||
$form->success_message = nl2br($row['form_success_message']);
|
||||
@ -2403,7 +2439,7 @@ EOT;
|
||||
}
|
||||
|
||||
//display form confirmation page
|
||||
function display_form_review($form_id,$record_id,$embed=false){
|
||||
function mobile_display_form_review($form_id,$record_id,$embed=false){
|
||||
global $lang;
|
||||
|
||||
//get form properties data
|
||||
@ -2503,7 +2539,7 @@ EOT;
|
||||
}
|
||||
|
||||
//display form confirmation page for integrated embed code
|
||||
function display_integrated_form_review($form_id,$record_id,$machform_path){
|
||||
function mobile_display_integrated_form_review($form_id,$record_id,$machform_path){
|
||||
global $lang;
|
||||
|
||||
//get form properties data
|
||||
|
||||
@ -8,10 +8,8 @@
|
||||
More info at: http://www.appnitro.com/
|
||||
******************************************************************************/
|
||||
|
||||
namespace standard_view_funcions;
|
||||
|
||||
//Single Line Text
|
||||
function display_text($element){
|
||||
function standard_display_text($element){
|
||||
|
||||
//check for error
|
||||
$error_class = '';
|
||||
@ -55,7 +53,7 @@ EOT;
|
||||
|
||||
|
||||
//Paragraph Text
|
||||
function display_textarea($element){
|
||||
function standard_display_textarea($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -96,7 +94,7 @@ EOT;
|
||||
|
||||
|
||||
//File Upload
|
||||
function display_file($element){
|
||||
function standard_display_file($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -136,7 +134,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Website
|
||||
function display_url($element){
|
||||
function standard_display_url($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -181,7 +179,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Email
|
||||
function display_email($element){
|
||||
function standard_display_email($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -222,7 +220,7 @@ EOT;
|
||||
|
||||
|
||||
//Phone - Extended
|
||||
function display_phone($element){
|
||||
function standard_display_phone($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -289,7 +287,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Phone - Simple
|
||||
function display_simple_phone($element){
|
||||
function standard_display_simple_phone($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -331,7 +329,7 @@ EOT;
|
||||
|
||||
|
||||
//Date - Normal
|
||||
function display_date($element){
|
||||
function standard_display_date($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -397,7 +395,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Date - Normal
|
||||
function display_europe_date($element){
|
||||
function standard_display_europe_date($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -463,7 +461,7 @@ EOT;
|
||||
|
||||
|
||||
//Multiple Choice
|
||||
function display_radio($element){
|
||||
function standard_display_radio($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -526,7 +524,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Checkboxes
|
||||
function display_checkbox($element){
|
||||
function standard_display_checkbox($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -596,7 +594,7 @@ EOT;
|
||||
|
||||
|
||||
//Dropdown
|
||||
function display_select($element){
|
||||
function standard_display_select($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -664,7 +662,7 @@ EOT;
|
||||
|
||||
|
||||
//Name - Simple
|
||||
function display_simple_name($element){
|
||||
function standard_display_simple_name($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -705,7 +703,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Name
|
||||
function display_name($element){
|
||||
function standard_display_name($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -754,7 +752,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Time
|
||||
function display_time($element){
|
||||
function standard_display_time($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -825,7 +823,7 @@ EOT;
|
||||
|
||||
|
||||
//Price
|
||||
function display_money($element){
|
||||
function standard_display_money($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -903,7 +901,7 @@ EOT;
|
||||
}
|
||||
|
||||
//Section Break
|
||||
function display_section($element){
|
||||
function standard_display_section($element){
|
||||
$element->guidelines = nl2br($element->guidelines);
|
||||
$element_markup = <<<EOT
|
||||
<li id="li_{$element->id}" class="section_break">
|
||||
@ -918,7 +916,7 @@ EOT;
|
||||
|
||||
|
||||
//Number
|
||||
function display_number($element){
|
||||
function standard_display_number($element){
|
||||
//check for error
|
||||
$error_class = '';
|
||||
$error_message = '';
|
||||
@ -960,7 +958,7 @@ EOT;
|
||||
|
||||
|
||||
//Address
|
||||
function display_address($element){
|
||||
function standard_display_address($element){
|
||||
|
||||
$country[0]['label'] = "Afghanistan";
|
||||
$country[1]['label'] = "Albania";
|
||||
@ -1001,7 +999,7 @@ EOT;
|
||||
$country[36]['label'] = "Comoros";
|
||||
$country[37]['label'] = "Congo";
|
||||
$country[38]['label'] = "Costa Rica";
|
||||
$country[39]['label'] = "Côte d'Ivoire";
|
||||
$country[39]['label'] = "Côte d'Ivoire";
|
||||
$country[40]['label'] = "Croatia";
|
||||
$country[41]['label'] = "Cuba";
|
||||
$country[42]['label'] = "Cyprus";
|
||||
@ -1197,7 +1195,7 @@ EOT;
|
||||
$country[36]['value'] = "Comoros";
|
||||
$country[37]['value'] = "Congo";
|
||||
$country[38]['value'] = "Costa Rica";
|
||||
$country[39]['value'] = "Côte d'Ivoire";
|
||||
$country[39]['value'] = "Côte d'Ivoire";
|
||||
$country[40]['value'] = "Croatia";
|
||||
$country[41]['value'] = "Cuba";
|
||||
$country[42]['value'] = "Cyprus";
|
||||
@ -1445,7 +1443,7 @@ EOT;
|
||||
|
||||
|
||||
//Captcha
|
||||
function display_captcha($element){
|
||||
function standard_display_captcha($element){
|
||||
|
||||
if(!empty($element->error_message)){
|
||||
$error_code = $element->error_message;
|
||||
@ -1532,7 +1530,7 @@ EOT;
|
||||
//2. New form with error (displayed when 1 submitted and having error, form populated with user inputs)
|
||||
//3. Edit form (form populated with data from db)
|
||||
//4. Edit form with error (displayed when 3 submiteed and having error)
|
||||
function display_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$embed=false){
|
||||
function standard_display_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$embed=false){
|
||||
|
||||
global $lang;
|
||||
|
||||
@ -1561,7 +1559,7 @@ EOT;
|
||||
$result = do_query($query);
|
||||
$row = do_fetch_result($result);
|
||||
|
||||
$form = new \stdClass();
|
||||
$form = new stdClass();
|
||||
|
||||
$form->id = $form_id;
|
||||
$form->name = $row['form_name'];
|
||||
@ -1643,7 +1641,7 @@ EOT;
|
||||
$element_options = array();
|
||||
$i=0;
|
||||
foreach ($options_lookup[$element_id] as $option_id=>$data){
|
||||
$element_options[$i] = new \stdClass();
|
||||
$element_options[$i] = new stdClass();
|
||||
$element_options[$i]->id = $option_id;
|
||||
$element_options[$i]->option = $data['option'];
|
||||
$element_options[$i]->is_default = $data['option_is_default'];
|
||||
@ -1654,7 +1652,7 @@ EOT;
|
||||
|
||||
|
||||
//populate elements
|
||||
$element[$j] = new \stdClass();
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->title = nl2br($row['element_title']);
|
||||
$element[$j]->guidelines = $row['element_guidelines'];
|
||||
$element[$j]->size = $row['element_size'];
|
||||
@ -1704,7 +1702,7 @@ EOT;
|
||||
|
||||
//add captcha if enable
|
||||
if(!empty($form->captcha) && (empty($edit_id))){
|
||||
$element[$j] = new \stdClass();
|
||||
$element[$j] = new stdClass();
|
||||
$element[$j]->type = 'captcha';
|
||||
$element[$j]->form_id = $form_id;
|
||||
$element[$j]->is_private = 0;
|
||||
@ -1721,7 +1719,7 @@ EOT;
|
||||
if($element_data->is_private && empty($_SESSION['logged_in'])){ //don't show private element
|
||||
continue;
|
||||
}
|
||||
$all_element_markup .= call_user_func(__NAMESPACE__ .'\display_'.$element_data->type,$element_data);
|
||||
$all_element_markup .= call_user_func('standard_display_'.$element_data->type,$element_data);
|
||||
}
|
||||
|
||||
if(!empty($custom_error)){
|
||||
@ -1855,7 +1853,7 @@ EOT;
|
||||
</ul>
|
||||
</form>
|
||||
<div id="footer">
|
||||
Powered by <a href="http://www.appnitro.com" target="_blank">MachForm</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<img id="bottom" src="images/bottom.png" alt="" />
|
||||
@ -1867,7 +1865,7 @@ EOT;
|
||||
}
|
||||
|
||||
//this function is similar as display_form, but designed to display form without IFRAME
|
||||
function display_integrated_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$machform_path){
|
||||
function standard_display_integrated_form($form_id,$populated_values=array(),$error_elements=array(),$custom_error='',$edit_id=0,$machform_path){
|
||||
|
||||
global $lang;
|
||||
|
||||
@ -2063,7 +2061,7 @@ EOT;
|
||||
if($element_data->is_private && empty($_SESSION['logged_in'])){ //don't show private element
|
||||
continue;
|
||||
}
|
||||
$all_element_markup .= call_user_func('display_'.$element_data->type,$element_data);
|
||||
$all_element_markup .= call_user_func('standard_display_'.$element_data->type,$element_data);
|
||||
}
|
||||
|
||||
if(!empty($custom_error)){
|
||||
@ -2193,7 +2191,7 @@ EOT;
|
||||
</ul>
|
||||
</form>
|
||||
<div id="footer">
|
||||
Powered by <a href="http://www.appnitro.com" target="_blank">MachForm</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2202,7 +2200,7 @@ EOT;
|
||||
|
||||
}
|
||||
|
||||
function display_success($form_id,$embed=false){
|
||||
function standard_display_success($form_id,$embed=false){
|
||||
//get form properties data
|
||||
$query = "select
|
||||
form_success_message,
|
||||
@ -2252,7 +2250,7 @@ EOT;
|
||||
<h2>{$form->success_message}</h2>
|
||||
</div>
|
||||
<div id="footer" class="success">
|
||||
Powered by <a href="http://www.appnitro.com" target="_blank">MachForm</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<img id="bottom" src="images/bottom.png" alt="" />
|
||||
@ -2263,7 +2261,7 @@ EOT;
|
||||
}
|
||||
|
||||
//this function is similar as display_success, but designed to display success page without IFRAME
|
||||
function display_integrated_success($form_id,$machform_path){
|
||||
function standard_display_integrated_success($form_id,$machform_path){
|
||||
//get form properties data
|
||||
$query = "select
|
||||
form_success_message,
|
||||
@ -2299,7 +2297,7 @@ EOT;
|
||||
<h2>{$form->success_message}</h2>
|
||||
</div>
|
||||
<div id="footer" class="success">
|
||||
Powered by <a href="http://www.appnitro.com" target="_blank">MachForm</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2308,7 +2306,7 @@ EOT;
|
||||
}
|
||||
|
||||
//display form confirmation page
|
||||
function display_form_review($form_id,$record_id,$embed=false){
|
||||
function standard_display_form_review($form_id,$record_id,$embed=false){
|
||||
global $lang;
|
||||
|
||||
//get form properties data
|
||||
@ -2408,7 +2406,7 @@ EOT;
|
||||
}
|
||||
|
||||
//display form confirmation page for integrated embed code
|
||||
function display_integrated_form_review($form_id,$record_id,$machform_path){
|
||||
function standard_display_integrated_form_review($form_id,$record_id,$machform_path){
|
||||
global $lang;
|
||||
|
||||
//get form properties data
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
******************************************************************************/
|
||||
|
||||
require('mobileesp/mdetect.php');
|
||||
require('includes/standard-view-functions.php');
|
||||
require('includes/mobile-view-functions.php');
|
||||
require_once('includes/standard-view-functions.php');
|
||||
require_once('includes/mobile-view-functions.php');
|
||||
|
||||
//Main function to display a form
|
||||
//There are few mode when displaying a form
|
||||
@ -23,10 +23,10 @@ require('includes/mobile-view-functions.php');
|
||||
$agent_info = new uagent_info();
|
||||
|
||||
if ($agent_info->DetectIphoneOrIpod()) {
|
||||
return \mobile_view_funcions\display_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $embed);
|
||||
return mobile_display_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $embed);
|
||||
}
|
||||
else {
|
||||
return \standard_view_funcions\display_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $embed);
|
||||
return standard_display_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $embed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,10 +36,10 @@ require('includes/mobile-view-functions.php');
|
||||
$agent_info = new uagent_info();
|
||||
|
||||
if ($agent_info->DetectIphoneOrIpod()) {
|
||||
return \mobile_view_funcions\display_integrated_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $machform_path);
|
||||
return mobile_display_integrated_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $machform_path);
|
||||
}
|
||||
else {
|
||||
return \standard_view_funcions\display_integrated_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $machform_path);
|
||||
return standard_display_integrated_form($form_id, $populated_values, $error_elements, $custom_error, $edit_id, $machform_path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,10 +48,10 @@ require('includes/mobile-view-functions.php');
|
||||
$agent_info = new uagent_info();
|
||||
|
||||
if ($agent_info->DetectIphoneOrIpod()) {
|
||||
return \mobile_view_funcions\display_success($form_id, $embed);
|
||||
return mobile_display_success($form_id, $embed);
|
||||
}
|
||||
else {
|
||||
return \standard_view_funcions\display_success($form_id, $embed);
|
||||
return standard_display_success($form_id, $embed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,10 +61,10 @@ require('includes/mobile-view-functions.php');
|
||||
$agent_info = new uagent_info();
|
||||
|
||||
if ($agent_info->DetectIphoneOrIpod()) {
|
||||
return \mobile_view_funcions\display_integrated_success($form_id, $machform_path);
|
||||
return mobile_display_integrated_success($form_id, $machform_path);
|
||||
}
|
||||
else {
|
||||
return \standard_view_funcions\display_integrated_success($form_id, $machform_path);
|
||||
return standard_display_integrated_success($form_id, $machform_path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,10 +74,10 @@ require('includes/mobile-view-functions.php');
|
||||
$agent_info = new uagent_info();
|
||||
|
||||
if ($agent_info->DetectIphoneOrIpod()) {
|
||||
return \mobile_view_funcions\display_form_review($form_id, $record_id, $embed);
|
||||
return mobile_display_form_review($form_id, $record_id, $embed);
|
||||
}
|
||||
else {
|
||||
return \standard_view_funcions\display_form_review($form_id, $record_id, $embed);
|
||||
return standard_display_form_review($form_id, $record_id, $embed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,10 +87,10 @@ require('includes/mobile-view-functions.php');
|
||||
$agent_info = new uagent_info();
|
||||
|
||||
if ($agent_info->DetectIphoneOrIpod()) {
|
||||
return \mobile_view_funcions\display_integrated_form_review($form_id, $record_id, $machform_path);
|
||||
return mobile_display_integrated_form_review($form_id, $record_id, $machform_path);
|
||||
}
|
||||
else {
|
||||
return \standard_view_funcions\display_integrated_form_review($form_id, $record_id, $machform_path);
|
||||
return standard_display_integrated_form_review($form_id, $record_id, $machform_path);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -166,6 +166,7 @@
|
||||
}
|
||||
});
|
||||
if (d === true) {
|
||||
|
||||
this.find("*").andSelf().each(function (i) {
|
||||
var a = v.data(this, "events");
|
||||
for (var b in a) {
|
||||
@ -902,6 +903,7 @@
|
||||
button: '"button"==a.type||jQuery.nodeName(a,"button")',
|
||||
input: "/input|select|textarea|button/i.test(a.nodeName)",
|
||||
has: "jQuery.find(m[3],a).length",
|
||||
|
||||
header: "/h\\d/i.test(a.nodeName)",
|
||||
animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
|
||||
}
|
||||
@ -1241,6 +1243,7 @@
|
||||
} else {
|
||||
if (d[b]) {
|
||||
if (c) {
|
||||
|
||||
delete d[b][c.guid]
|
||||
} else {
|
||||
for (c in d[b]) {
|
||||
@ -1624,6 +1627,7 @@
|
||||
lastModified: {},
|
||||
ajax: function (s) {
|
||||
var c, jsre = /=(\?|%3F)/g,
|
||||
|
||||
status, data;
|
||||
s = v.extend(true, s, v.extend(true, {},
|
||||
v.ajaxSettings, s));
|
||||
@ -2369,6 +2373,7 @@ var JJ = jQuery.noConflict();
|
||||
S = 0,
|
||||
Y = this[0],
|
||||
M = this[0],
|
||||
|
||||
L,
|
||||
I,
|
||||
W = G.css(Y, "position"),
|
||||
@ -3102,16 +3107,16 @@ field.prototype = {
|
||||
return A
|
||||
},
|
||||
name: function () {
|
||||
return '<div><span><input readonly="readonly" class="text" size="2" type="text"><label>Title</label></span><span><input readonly="readonly" class="text" size="12" type="text"><label>First</label></span><span><input readonly="readonly" class="text" size="14" type="text"><label>Last</label></span><span><input readonly="readonly" class="text" size="3" type="text"><label>Suffix</label></span></div>'
|
||||
return '<div><span><input readonly="readonly" class="text" size="2" type="text"><label>Título</label></span><span><input readonly="readonly" class="text" size="12" type="text"><label>Nombre</label></span><span><input readonly="readonly" class="text" size="14" type="text"><label>Apellidos</label></span><span><input readonly="readonly" class="text" size="3" type="text"><label>Sufijo</label></span></div>'
|
||||
},
|
||||
simple_name: function () {
|
||||
return '<div><span><input readonly="readonly" class="text" size="12" type="text"><label>First</label></span><span><input readonly="readonly" class="text" size="14" type="text"><label>Last</label></span></div>'
|
||||
return '<div><span><input readonly="readonly" class="text" size="12" type="text"><label>Nombre</label></span><span><input readonly="readonly" class="text" size="14" type="text"><label>Apellidos</label></span></div>'
|
||||
},
|
||||
date: function () {
|
||||
return '<div><span><input readonly="readonly" class="text" size="2" type="text"> / <label>MM</label></span><span><input readonly="readonly" class="text" size="2" type="text"> / <label>DD</label></span><span><input readonly="readonly" class="text" size="4" type="text"> <label>YYYY</label></span><img src="images/icons/calendar.gif" alt="Elegir una fecha" class="icon"></div>'
|
||||
return '<div><span><input readonly="readonly" class="text" size="2" type="text"> / <label>MM</label></span><span><input readonly="readonly" class="text" size="2" type="text"> / <label>DD</label></span><span><input readonly="readonly" class="text" size="4" type="text"> <label>AAAA</label></span><img src="images/icons/calendar.gif" alt="Elegir una fecha" class="icon"></div>'
|
||||
},
|
||||
europe_date: function () {
|
||||
return '<div><span><input readonly="readonly" class="text" size="2" type="text"> / <label>DD</label></span><span><input readonly="readonly" class="text" size="2" type="text"> / <label>MM</label></span><span><input readonly="readonly" class="text" size="4" type="text"> <label>YYYY</label></span><img src="images/icons/calendar.gif" alt="Elegir una fecha" class="icon"></div>'
|
||||
return '<div><span><input readonly="readonly" class="text" size="2" type="text"> / <label>DD</label></span><span><input readonly="readonly" class="text" size="2" type="text"> / <label>MM</label></span><span><input readonly="readonly" class="text" size="4" type="text"> <label>AAAA</label></span><img src="images/icons/calendar.gif" alt="Elegir una fecha" class="icon"></div>'
|
||||
},
|
||||
time: function () {
|
||||
if (ds.get(this.id, "constraint") == "show_seconds") {
|
||||
@ -3240,6 +3245,7 @@ data_source.prototype = {
|
||||
break;
|
||||
case "file":
|
||||
title = "Carga de fichero";
|
||||
|
||||
break;
|
||||
case "section":
|
||||
title = "Salto de sección";
|
||||
@ -3646,7 +3652,7 @@ function delete_checkbox(c, d, e, f) {
|
||||
return false
|
||||
}
|
||||
if (e == "checkbox" && d == 1) {
|
||||
confirmed = confirm("All data associated with this choice will be deleted. Are you sure you want to delete this choice?")
|
||||
confirmed = confirm("¿Desea eliminar este campo?")
|
||||
} else {
|
||||
confirmed = true
|
||||
}
|
||||
@ -3755,7 +3761,7 @@ function switch_display(A, B) {
|
||||
}
|
||||
function delete_element(A) {
|
||||
if (ds.get(A, "is_db_live") == "1") {
|
||||
confirmed = confirm("All data associated with this field will be deleted. Are you sure you want to delete this field?")
|
||||
confirmed = confirm("¿Desea eliminar este campo?")
|
||||
} else {
|
||||
confirmed = true
|
||||
}
|
||||
@ -3766,7 +3772,7 @@ function delete_element(A) {
|
||||
}
|
||||
function delete_from_db(c) {
|
||||
if (ds.get(c, "is_db_live") == "1") {
|
||||
JJ("#statusText").html("Deleting ... Please wait ...");
|
||||
JJ("#statusText").html("Eliminando, por favor, espere...");
|
||||
JJ.post("delete_element.php", {
|
||||
form_id: json_form.id,
|
||||
element_id: c
|
||||
@ -3776,7 +3782,7 @@ function delete_from_db(c) {
|
||||
if (b.status == "ok") {
|
||||
delete_element_markup(c)
|
||||
} else {
|
||||
alert("An error occured while deleting your field!")
|
||||
alert("Ha ocurrido un error mientras se eliminaba el campo")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user