diff --git a/edit_form.php b/edit_form.php index 48c6310..20f6df5 100644 --- a/edit_form.php +++ b/edit_form.php @@ -1,14 +1,14 @@ 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; - + $show_status_bar = true; //for header.php - - require('includes/header.php'); + + require('includes/header.php'); ?>
@@ -218,8 +218,8 @@ EOT;
  • -
  • -
  • +
  • +
  • @@ -241,7 +241,7 @@ EOT; Etiqueta del campo (?) - @@ -289,8 +289,8 @@ Formato de fecha (?) @@ -311,8 +311,8 @@ Formato de teléfono (?) @@ -346,8 +346,8 @@ Opciones (?)
    - - + + (?)
    @@ -404,42 +404,42 @@ País predeterminado - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - + - + - - - + + + - - - - - - + + + + + + @@ -450,47 +450,47 @@ País predeterminado - + - + - - - + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + - + - - - + + + @@ -503,7 +503,7 @@ País predeterminado - + @@ -514,103 +514,103 @@ País predeterminado - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - - + + - + - - - + + + - + - - + + - - - - - - - + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - + + - - + + - + - - + + - - - - + + + + @@ -622,7 +622,7 @@ Valor predeterminado (?) -( ) +( ) - @@ -707,14 +707,15 @@ Instrucciones para los usuarios +
    - var json_form = {$json_form}; var json_elements = {$json_element}; EOT; - require('includes/footer.php'); + require('includes/footer.php'); ?> diff --git a/includes/language.php b/includes/language.php index a8b38ff..8a713da 100644 --- a/includes/language.php +++ b/includes/language.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'; diff --git a/includes/mobile-view-functions.php b/includes/mobile-view-functions.php index bb681e0..f564b01 100644 --- a/includes/mobile-view-functions.php +++ b/includes/mobile-view-functions.php @@ -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 = "

    {$element->error_message}

    "; + $error_message = "

    {$element->error_message}

    "; } //check for required @@ -714,38 +710,37 @@ EOT; //check for guidelines if(!empty($element->guidelines)){ - $guidelines = "

    id}\">{$element->guidelines}

    "; + $guidelines = "

    id}\">{$element->guidelines}

    "; } $element_markup = << - - - - - - - - - {$guidelines} {$error_message} - + {$element->title} {$span_required} + {$error_message} + {$guidelines} + 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 = "

    {$element->error_message}

    "; + $error_message = "

    {$element->error_message}

    "; } //check for required @@ -755,10 +750,30 @@ EOT; //check for guidelines if(!empty($element->guidelines)){ - $guidelines = "

    id}\">{$element->guidelines}

    "; + $guidelines = "

    id}\">{$element->guidelines}

    "; } $element_markup = <<{$element->title} {$span_required} + {$error_message} + {$guidelines} +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +EOT; + +/*
  • @@ -778,13 +793,13 @@ $element_markup = <<{$lang['name_suffix']} {$guidelines} {$error_message}
  • -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 = << @@ -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 = "

    {$element->error_message}

    "; + $error_message = "

    {$element->error_message}

    "; } //check for required @@ -1408,7 +1421,7 @@ EOT; //check for guidelines if(!empty($element->guidelines)){ - $guidelines = "

    id}\">{$element->guidelines}

    "; + $guidelines = "

    id}\">{$element->guidelines}

    "; } @@ -1438,7 +1451,29 @@ EOT; } $element_markup = << + {$element->title} {$span_required} + {$error_message} + {$guidelines} +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +EOT; + +/*
  • @@ -1473,7 +1508,8 @@ $element_markup = <<{$lang['address_country']}
     {$guidelines} {$error_message}
  • -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;

    {$form->success_message}

    @@ -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 diff --git a/includes/standard-view-functions.php b/includes/standard-view-functions.php index c544826..fbe4533 100644 --- a/includes/standard-view-functions.php +++ b/includes/standard-view-functions.php @@ -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 = << @@ -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'] = "Cte 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'] = "Cte 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; @@ -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; @@ -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;

    {$form->success_message}

    @@ -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;

    {$form->success_message}

    @@ -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 diff --git a/includes/view-functions.php b/includes/view-functions.php index 80033df..79c3e7c 100644 --- a/includes/view-functions.php +++ b/includes/view-functions.php @@ -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); } } ?> \ No newline at end of file diff --git a/js/machform.js b/js/machform.js index 4471907..e0b7b09 100644 --- a/js/machform.js +++ b/js/machform.js @@ -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 '
    ' + return '
    ' }, simple_name: function () { - return '
    ' + return '
    ' }, date: function () { - return '
    / / Elegir una fecha
    ' + return '
    / / Elegir una fecha
    ' }, europe_date: function () { - return '
    / / Elegir una fecha
    ' + return '
    / / Elegir una fecha
    ' }, 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 {