- 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
@ -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>
|
||||
@ -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>
|
||||
|
||||
@ -707,6 +707,7 @@ Instrucciones para los usuarios
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<?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