{"id":1034,"date":"2023-04-27T09:16:43","date_gmt":"2023-04-27T08:16:43","guid":{"rendered":"https:\/\/gaelscoilnaduglaise.ie\/glaoigh-orainn\/"},"modified":"2023-09-26T16:23:43","modified_gmt":"2023-09-26T15:23:43","slug":"glaoigh-orainn","status":"publish","type":"page","link":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/","title":{"rendered":"D\u00e9an teangmh\u00e1il"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;rgba(0,0,0,0.4)&#8221; background_image=&#8221;https:\/\/gaelscoilnaduglaise.ie\/wp-content\/uploads\/2022\/11\/Admissions-Header-Image-1.jpg&#8221; background_blend=&#8221;overlay&#8221; height=&#8221;60vh&#8221; custom_padding=&#8221;15vh||||false|false&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; header_font_size=&#8221;6vw&#8221; header_font_size_tablet=&#8221;9vw&#8221; header_font_size_phone=&#8221;12vw&#8221; header_font_size_last_edited=&#8221;on|desktop&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h1>D\u00e9an teangmh\u00e1il linn<\/h1>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;||98px|||&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; width_tablet=&#8221;&#8221; width_phone=&#8221;&#8221; width_last_edited=&#8221;on|phone&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; header_2_font_size=&#8221;2vw&#8221; header_2_text_align_tablet=&#8221;&#8221; header_2_text_align_phone=&#8221;center&#8221; header_2_text_align_last_edited=&#8221;on|phone&#8221; header_2_font_size_tablet=&#8221;4vw&#8221; header_2_font_size_phone=&#8221;8vw&#8221; header_2_font_size_last_edited=&#8221;on|phone&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Ba bhre\u00e1 linn cloiste\u00e1il uait<\/h2>\n<p>M\u00e1 t\u00e1 eolas ar leith uait, n\u00f3 m\u00e1 t\u00e1 n\u00edos m\u00f3 eolas faoin scoil uait, l\u00edon an fhoirm th\u00edos chun teangmh\u00e1il a dh\u00e9anamh linn.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][de_fb_form form_id=&#8221;contact page form&#8221; use_custom_email=&#8221;off&#8221; custom_contact_email=&#8221;oifig@gaelscoilnaduglaise.ie&#8221; from_name=&#8221;custom&#8221; custom_from_name=&#8221;GND Website Contact Page Form Submission&#8221; from_email=&#8221;custom&#8221; custom_from_email=&#8221;gaelscoil.analytics@gmail.com&#8221; replyto_name=&#8221;name&#8221; replyto_email=&#8221;email&#8221; email_title=&#8221;GND Website Contact Page Form Submission&#8221; save_to_database=&#8221;on&#8221; google_recaptcha=&#8221;on&#8221; recaptcha_sitekey_type=&#8221;recaptcha_3&#8243; recaptcha_sitekey_v3=&#8221;6Lew8lQoAAAAAGjQk88-Ja3wAe3QxYEryVtGosaB&#8221; recaptcha_seckey_v3=&#8221;6Lew8lQoAAAAADqYxPfyOHXn2hBcpzKumoDGh-57&#8243; use_honeypot_captcha=&#8221;off&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][de_fb_form_field field_title=&#8221;Animm&#8221; field_id=&#8221;name&#8221; required_mark=&#8221;on&#8221; _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][\/de_fb_form_field][de_fb_form_field field_title=&#8221;Seoladh r\u00edomhphoist&#8221; field_id=&#8221;email&#8221; field_type=&#8221;email&#8221; required_mark=&#8221;on&#8221; _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][\/de_fb_form_field][de_fb_form_field field_title=&#8221;Teachtaireacht&#8221; field_id=&#8221;message&#8221; field_type=&#8221;text&#8221; _builder_version=&#8221;4.19.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][\/de_fb_form_field][\/de_fb_form][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>D\u00e9an teangmh\u00e1il linnBa bhre\u00e1 linn cloiste\u00e1il uait M\u00e1 t\u00e1 eolas ar leith uait, n\u00f3 m\u00e1 t\u00e1 n\u00edos m\u00f3 eolas faoin scoil uait, l\u00edon an fhoirm th\u00edos chun teangmh\u00e1il a dh\u00e9anamh linn.<div class=\"et_pb_module de_fb_form de_fb_form_0 clearfix  align-button_right align-module_\">\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<div class=\"et_pb_module_inner\">\n\t\t\t\t\t\t\t<form\r\n                method=\"POST\"\r\n                enctype=\"multipart\/form-data\"\r\n                action=\"\"\r\n                id=\"fb_form_null-0\"\r\n                class=\"et_pb_contact fb_form   hide_until_loaded\"\r\n                data-ajax-btn=\"Processing\"\r\n                data-ajax-hide-sub=\"off\"\r\n                data-reset-form-on-submit=\"true\"\r\n                style=\"display: none;\">\r\n\t\t\t\t<div class=\"preloader form_loading divi\">\r\n\t\t\t\t\t<div class=\"ajax-loading\">\r\n\t\t\t\t\t\t<div class=\"divi-style\">\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div class=\"lines\">\r\n\t\t\t\t\t\t\t<div class=\"line\"><\/div>\r\n\t\t\t\t\t\t\t<div class=\"line\"><\/div>\r\n\t\t\t\t\t\t\t<div class=\"line\"><\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div class=\"spinner donut-cont\">\r\n\t\t\t\t\t\t\t<div class=\"donut\"><\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div class=\"spinner donutmulti-cont\">\r\n\t\t\t\t\t\t\t<div class=\"donut multi\"><\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div class=\"spinner ripple-cont\">\r\n\t\t\t\t\t\t\t<div class=\"ripple\"><\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<h3 class=\"form-title\"><\/h3>\r\n\t\t\t\t\t\t<div class=\"divi-form-wrapper\">\r\n                                 \t\t\t<\/div>\r\n<input type=\"hidden\" value=\"null-0\" name=\"form_key\"><input type=\"hidden\" value=\"null-0\" name=\"unique_id\">\t\t\t<div class=\"et_contact_bottom_container\">\r\n\t\t\t\t<div class=\"submit-container\">\r\n\t\t\t<script>\r\n\t\t\tjQuery(document).ready(function($){\r\n\t\t\t\tjQuery(\"#fb_form_null-0\").submit(function(e){\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t$(this).find('.divi-form-submit').prop('disabled', true);\r\n\t\t\t\t\tvar required_check = true;\r\n\t\t\t\t\tvar form = jQuery(this);\r\n                    let required_fields = $('.required',form);\r\n                    if ( required_fields.length > 0 ) {\r\n                        $.each(required_fields, function (index, element) {\r\n                            $(this).closest('.et_pb_contact_field').parent().find('.error').remove();\r\n                            if ( !$(this).closest('.de_fb_form_field').hasClass('condition-hide') ) {\r\n                                var field_type = $(this).closest('.et_pb_contact_field').data('type');\r\n\r\n                                if ( field_type == 'checkbox' || field_type == 'radio' ) {\r\n                                    if ( jQuery(this).find('input:checked').length == 0 ) {\r\n                                        required_check = false;\r\n                                    }\r\n                                } else if ( field_type == 'file' || field_type == 'image' ) {\r\n                                    var value_field_id = jQuery(this).find('input.upload_field').attr('id') + '_value';\r\n                                    if ( jQuery(this).find('.files .template-upload').length == 0 && jQuery(this).find('#' + value_field_id).val() == \"\") {\r\n                                        required_check = false;\r\n                                    }\r\n                                } else {\r\n                                    if ( jQuery(this).val() == '' ) {\r\n                                        required_check = false;\r\n                                    }\r\n                                }\r\n                                if ( !required_check ) {\r\n                                    var required_message = $(this).attr('data-required_message');\r\n                                    var required_message_pos = $(this).attr('data-required_position');\r\n\r\n                                    if ( required_message_pos == 'top' ) {\r\n                                        $(this).closest('.et_pb_contact_field').before('<p class=\"error\">' + required_message + '<\/p>');\r\n                                    } else {\r\n                                        $(this).closest('.et_pb_contact_field').after('<p class=\"error\">' + required_message + '<\/p>');\r\n                                    }\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    if ( form.find('.bloom_subscribe').find('input[required]').length > 0 ) {\r\n                \t\tform.find('.bloom_subscribe').find('.error').remove();\r\n                \t\tif ( !form.find('.bloom_subscribe').find('input[required]').is(\":checked\") ) {\r\n                \t\t\trequired_check = false;\r\n                \t\t\tvar required_message = \"This field is required.\";\r\n                            var required_message_pos = \"bottom\";\r\n\r\n                            if ( required_message_pos == 'top' ) {\r\n                                form.find('.bloom_subscribe').prepend('<p class=\"error\">' + required_message + '<\/p>');\r\n                            } else {\r\n                                form.find('.bloom_subscribe').append('<p class=\"error\">' + required_message + '<\/p>');\r\n                            }\r\n                \t\t}\r\n                \t}\r\n\r\n                \tif ( !required_check ) {\r\n                        $('html, body').animate({\r\n                            scrollTop: form.offset().top - 10\r\n                        }, 300);\r\n\r\n                        form.find('.divi-form-submit').removeProp('disabled');\r\n                        form.find('.divi-form-submit').removeAttr('disabled');\r\n                    }\r\n\r\n\t\t\t\t    var validation_result = form.valid();\r\n\r\n\t\t\t\t    if ( !validation_result ) {\r\n\t\t\t\t    \te.preventDefault();\r\n                        \/\/Here we check for an icon related to this input and we retrieve it to move it to correct place\r\n                        \/\/since validate function places the label before the icon -\r\n                        let inputs_error= $('.input-field.error',form);\r\n                        inputs_error.each(function (){\r\n                            let input=$(this);\r\n                            let parent=input.parent();\r\n                            let label = $('label.error',parent).first();\r\n                            let icon = $('.dfb_input_icon',parent).first();\r\n                            if(icon.length){\r\n                                if(input.next().is(label)){\r\n                                    label.detach().appendTo(parent.parent());\r\n                                }\r\n                            }\r\n                        });\r\n\t\t\t\t    \t$(this).find('.divi-form-submit').removeProp('disabled');\r\n\t\t\t\t    \t$(this).find('.divi-form-submit').removeAttr('disabled');\r\n\t\t\t\t    \treturn false;\r\n\t\t\t\t    }\r\n\r\n\t\t\t\t\t\t\t    if ( $(this).find('.signature-field').length > 0 ) {\r\n\t\t\t\t    \t$.each( $(this).find('.signature-field'), function(i) {\r\n\t\t\t\t    \t\tvar field_id = $(this).find('input').attr('id');\r\n\t\t\t\t    \t\t$(\"#\" + field_id).val( fb_signature.signature_objs['signaturePad_' + field_id].toDataURL() );\r\n\t\t\t\t    \t});\r\n\t\t\t\t    }\r\n\t\t\t\t    if ( required_check ) {\r\n\t\t\t\t    \tif ( form.find('.file_preview_container .template-upload').length > 0 ) {\r\n\t\t\t\t    \t\te.preventDefault();\r\n\t\t\t\t\t\t\t$(this).addClass('submitting');\r\n\t\t                \tde_fb_ajax_files_upload( form );\r\n\t\t                } else {\r\n\t\t                \tif ( form.find('.divi-form-submit').hasClass('de_fb_ajax_submit')) {\r\n\t\t\t\t\t\t\t\t$(this).addClass('submitting');\r\n\t\t\t                \tde_fb_ajax_form_submit( form[0] );\r\n\t\t\t                \te.preventDefault();\r\n\t\t\t                } else {\r\n\t\t\t\t\t\t\t\t$(this).addClass('submitting');\r\n\t\t\t                \tjQuery(\"#fb_form_null-0\").unbind('submit').submit();\r\n\t\t\t                }\t\r\n\t\t                }\r\n\t\t\t\t    } else {\r\n\t\t\t\t    \te.preventDefault();\r\n\t\t\t\t    }\r\n\t\t\t\t    \/\/$(this).find('.divi-form-submit').removeProp('disabled');\r\n\t\t\t\t    \/\/$(this).find('.divi-form-submit').removeAttr('disabled');\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t<\/script>\r\n\r\n                    <button class=\"divi-form-submit et_pb_button \" type=\"submit\">Submit<\/button>\r\n\r\n                <input type=\"hidden\" name=\"form_type\" value=\"contact\">\r\n\t\t\t\t<input type=\"hidden\" name=\"divi-form-submit\" value=\"yes\">\r\n\t\t\t\t<input type=\"hidden\" name=\"form_id\" value=\"&#8221;contact\">\r\n<input type=\"text\" name=\"form_type_confirm\" style=\"display:none!important;\" tabindex=\"-1\" autocomplete=\"off\">\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/form>\r\n\r\n<script>\r\n\tjQuery(document).ready(function($){\r\n\r\n\t\t$('#fb_form_null-0').validate({\r\n\t\t  normalizer: function(value) {\r\n\t\t    \/\/ Trim the value of every element\r\n\t\t    return $.trim(value);\r\n\t\t  },\r\n\t\t  errorPlacement : function( error, element ) {\r\n\t\t\telement.parent().append( error ); \/\/ default error placement\r\n\t\t  }\r\n\t\t});\r\n\r\n\t\tif ( $('.de_fb_autocomplete').length > 0 && typeof init_autocomplete_fields == 'function' ) {\r\n\t\t\tinit_autocomplete_fields();\r\n\t\t}\r\n\t});\r\n\t\r\n\tif ( window.history.replaceState ) {\r\n\t  window.history.replaceState( null, null, window.location.href );\r\n\t}\r\n<\/script>\r\n<script name=\"send_ai_data\">\r\nlet isSendingData = false;\r\n\r\nlet form_ai_spend = 0;jQuery(document).ready(function($) {\r\n\tif ($(\"#fb_form_null-0 [name='dfb_ai_form']\").length) {\r\n\t\t\t\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').addClass('hidethis');\r\n\t\t\t\tif (form_ai_spend >= 10) {\r\n\t\t\t\t\t\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').addClass('hidethis');\r\n\t\t\t\t\t\treturn;\r\n\t\t}\r\n\t}\r\n});\r\n\/\/ This function will remove any newline characters within the <table> tags\r\nfunction removeNewLinesWithinTable(ai_response) {\r\n  \/\/ Define a regex pattern to find the <table> tags and the content within them\r\n  let tablePattern = \/<table[\\s\\S]*?<\\\/table>\/gi;\r\n  \/\/ This function will remove all newline characters within a table match\r\n  function removeNewLines(match) {\r\n    \/\/ Remove \\n newline characters from the matched table html string\r\n    return match.replace(\/\\n\/g, \"\");\r\n  }\r\n  \/\/ Replace all <table>...<\\\/table> instances with the modified ones without \\n\r\n  let modifiedAIResponse = ai_response.replace(tablePattern, removeNewLines);\r\n  \/\/ Return the updated JSON string\r\n  return modifiedAIResponse;\r\n}\r\nfunction send_ai_data(ai_ids, ai_settings, ai_field_values, ai_field_titles) {\r\n\r\n\t\t\tvar honeypot_val = jQuery('#fb_form_null-0').find('[name=\"form_type_confirm\"]').val();\r\n\t\tif(honeypot_val != '') {\r\n\t\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').removeProp('disabled');\r\n\t\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').removeAttr('disabled');\r\n\t\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').removeClass('hidethis');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\tif (form_ai_spend >= 10) {\r\n\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').removeProp('disabled');\r\n\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').removeAttr('disabled');\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (isSendingData) {\r\n\t\treturn; \/\/ Exit if already sending data\r\n\t}\r\n\r\n\tisSendingData = true;\r\n\r\n\t\r\n\tai_settings['form_ai_spend_limit'] = '10';\r\n\tai_settings['form_ai_spend_limit_action'] = 'hide_form';\r\n\tai_settings['form_ai_save_to_db'] = '';\r\n\tai_settings['form_ai_suggestion_rate_limit'] = '30';\r\n\tai_settings['form_ai_debug'] = '';\r\n\r\n\tjQuery.ajax({\r\n\ttype: \"POST\",\r\n\turl: 'https:\/\/gaelscoilnaduglaise.ie\/wp-admin\/admin-ajax.php',\r\n\tdata: {\r\n\t\taction: de_formai_ajax_data.action,\r\n\t\t_ajax_nonce: de_formai_ajax_data.nonce,\r\n\t\tform_id: 'null-0',\r\n\t\tform_title: '',\r\n\t\tform_unique: 'null-0',\r\n\t\tai_ids: ai_ids,\r\n\t\tai_settings: ai_settings,\r\n\t\tai_fields: ai_field_values,\r\n\t\tai_titles: ai_field_titles,\r\n\t},\r\n\tbeforeSend: function() {\r\n\t\tjQuery('body').addClass('de_fb_ai_processing');\r\n\t\tjQuery('#fb_form_null-0 .ai_loading').removeClass('hidethis');\r\n\t\t\r\n\t\tjQuery('.ai_loading_text.typing').each(function() {\r\n\t\t\tvar ai_text_method = jQuery(this).attr('data-ai_text_method');\r\n\t\t\tif (ai_text_method == 'same_line') {\r\n\t\t\t\tvar ai_text = JSON.parse(jQuery(this).attr('data-ai_text')),\r\n\t\t\t\tai_text_color = JSON.parse(jQuery(this).attr('data-ai_text_color'));\r\n\t\t\t} else {\r\n\t\t\t\tvar ai_text_string = jQuery(this).attr('data-ai_text'),\r\n\t\t\t\tai_text_color_string = jQuery(this).attr('data-ai_text_color');\r\n\t\t\t\tvar ai_text = [ai_text_string];\r\n\t\t\t\tai_text_color = [ai_text_color_string];\r\n\t\t\t}\r\n\t\t\tvar ai_loading_id = jQuery(this).attr('id'),\r\n\t\t\tai_text_pause = jQuery(this).attr('data-ai_text_pause'),\r\n\t\t\tai_type_speed = jQuery(this).attr('data-ai_type_speed'),\r\n\t\t\tloop_text = jQuery(this).attr('data-ai_loop_text');\r\n\t\t\tdfb_typing_ai_text(ai_text, ai_loading_id, ai_text_color, ai_text_pause, ai_type_speed, ai_text_method, loop_text);\r\n\t\t});\r\n\r\n\t\tjQuery('#fb_form_null-0 .dfb_ai_output').html('');\r\n\t\tif (ai_settings['form_ai_output_to_field'] == 'on') { \r\n\t\t\tvar outputField = ai_settings['form_ai_output_field'];\r\n\t\t\tvar outputFieldType = ai_settings['form_ai_output_to_field_type'];\r\n\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"]').closest('.et_pb_module').hide();\r\n\t\t\tswitch (outputFieldType) {\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"] option').first().prop('selected', true);\r\n\t\t\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"] option').not(':first').remove();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tsuccess: function(response) {\r\n\t\tjQuery('body').removeClass('de_fb_ai_processing');\r\n\t\tconsole.log(response);\r\n\t\t\/\/ if response contains error key then show error\r\n\t\tif (response.error) {\r\n\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output').html('');\r\n\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output').append('<div class=\"ai_error\"><\/div>');\r\n\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output').find('.ai_error').html(response.error.message);\r\n\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output').removeClass('hidethis');\r\n\t\t\tjQuery('#fb_form_null-0 .ai_loading').addClass('hidethis');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tjQuery('#fb_form_null-0 .ai_loading').addClass('hidethis');\r\n\t\tif (form_ai_spend >= 10) {\r\n\t\t\t\t\t\t\tjQuery('#fb_form_null-0').addClass('hidethis');\r\n\t\t\t\t\t\treturn;\r\n\t\t}\r\n\t\tvar ai_response = response.data.ai_response\r\n\t\tjQuery('.dfb_ai_output').html('');\r\n\t\tif (ai_settings['form_ai_output_to_field'] == 'on') { \r\n\t\t\tvar outputField = ai_settings['form_ai_output_field'];\r\n\t\t\tvar outputFieldType = ai_settings['form_ai_output_to_field_type'];\r\n\t\t\t\r\n\t\t\tswitch (outputFieldType) {\r\n\t\t\t\tcase 'text':\r\n\t\t\t\tcase 'textarea':\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tjQuery('#fb_form_null-0 #'+outputField+'').val(response.data.ai_response); \r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\tvar selectItems = ai_response.replace(new RegExp('\\r?\\n','g'), '');\r\n\t\t\t\t\tvar selectItems = selectItems.replace(\"\\\\\\\"\", \"\\\"\");\r\n\t\t\t\t\t\/\/var selectItems = JSON.parse(selectItems);\r\n\t\t\t\t\tfunction testJSON(selectItems) {\r\n\t\t\t\t\t\tif (typeof selectItems !== \"string\") {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tJSON.parse(selectItems);\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t} catch (error) {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (testJSON(selectItems) == true) {\r\n\t\t\t\t\t\tvar selectItems = JSON.parse(selectItems);\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"] option').each(function() { \r\n\t\t\t\t\t\t\tconst optionValue = jQuery(this).val();\r\n\t\t\t\t\t\t\tconst optionText = jQuery(this).text().trim();\r\n\t\t\t\t\t\t\tif (optionValue === '' && optionText === '') {\r\n\t\t\t\t\t\t\t\tjQuery(this).remove();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"] option').first().prop('selected', true);\r\n\t\t\t\t\t\tjQuery.each(selectItems, function (i, item) {\r\n\t\t\t\t\t\t\tif(item != ''){\r\n\t\t\t\t\t\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"]').append(jQuery('<option>', {  \r\n\t\t\t\t\t\t\t\t\tvalue: item,\r\n\t\t\t\t\t\t\t\t\ttext : item \r\n\t\t\t\t\t\t\t\t}));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 [name=\"'+outputField+'\"]').closest('.et_pb_module').show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output[data-ainame='+ai_settings['ai_name']+']').html('');\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output[data-ainame='+ai_settings['ai_name']+']').append('<div class=\"api-error\"><\/div>');\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output[data-ainame='+ai_settings['ai_name']+']').find('.api-error').html(ai_response);\r\n\t\t\t\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output[data-ainame='+ai_settings['ai_name']+']').removeClass('hidethis');\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'checkbox':\r\n\t\t\t\tcase 'radio':\r\n\t\t\t\t\tfieldValue = e.target.checked ? e.target.value : '';\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tfieldValue = '';\r\n\t\t\t}\r\n\t\t} else { \r\n\t\t\tai_response = removeNewLinesWithinTable(ai_response);\r\n\t\t\tjQuery('#fb_form_null-0 .dfb_ai_output[data-ainame='+ai_settings['ai_name']+']').html(ai_response.replace(\/\\n\/g,'<br\/>')).removeClass('hidethis');\r\n\t\t}\r\n\t\tjQuery('#'+ai_settings['ai_name'] ).val(\"AI Suggestion:<br><br>\"+ai_response.replace(new RegExp('\\r?\\n','g'), '<br \/>'));\r\n\t\t\r\n\t\t\t\t\tjQuery('#fb_form_null-0').find('.divi-form-submit').removeClass('hidethis');\r\n\t\t\t\tif (jQuery('#fb_form_null-0').hasClass(\"multistep\")) {\r\n\t\t\tsetFormHeight();\r\n\t\t}\r\n\t},\r\n\terror: function(xhr, status, error) {\r\n\t\tjQuery('#fb_form_null-0 .dfb_ai_output[data-ainame='+ai_settings['ai_name']+']').html('There was an error: ' + error).removeClass('hidethis');\r\n\t},\r\n\tcomplete: function() {\r\n\t\tjQuery('body').removeClass('de_fb_ai_processing');\r\n\t\tisSendingData = false; \/\/ Reset the flag after the AJAX request is complete\r\n\t}\r\n\t});\r\n}\r\n<\/script>\r\n\n\t\t\t\t<\/div>\n\t\t\t<\/div><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-1034","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>D\u00e9an teangmh\u00e1il - GND<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/\" \/>\n<meta property=\"og:locale\" content=\"ga_IE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"D\u00e9an teangmh\u00e1il - GND\" \/>\n<meta property=\"og:description\" content=\"D\u00e9an teangmh\u00e1il linnBa bhre\u00e1 linn cloiste\u00e1il uait M\u00e1 t\u00e1 eolas ar leith uait, n\u00f3 m\u00e1 t\u00e1 n\u00edos m\u00f3 eolas faoin scoil uait, l\u00edon an fhoirm th\u00edos chun teangmh\u00e1il a dh\u00e9anamh linn.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/\" \/>\n<meta property=\"og:site_name\" content=\"GND\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-26T15:23:43+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/\",\"url\":\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/\",\"name\":\"D\u00e9an teangmh\u00e1il - GND\",\"isPartOf\":{\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/#website\"},\"datePublished\":\"2023-04-27T08:16:43+00:00\",\"dateModified\":\"2023-09-26T15:23:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/#breadcrumb\"},\"inLanguage\":\"ga-IE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/gaelscoilnaduglaise.ie\/ga\/leathanach-baile\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"D\u00e9an teangmh\u00e1il\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/#website\",\"url\":\"https:\/\/gaelscoilnaduglaise.ie\/\",\"name\":\"Gaelscoil na Duglaise\",\"description\":\"Gaelscoil Na Duglaise\",\"publisher\":{\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/gaelscoilnaduglaise.ie\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ga-IE\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/#organization\",\"name\":\"Gaelscoil na Duglaise\",\"url\":\"https:\/\/gaelscoilnaduglaise.ie\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ga-IE\",\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/gaelscoilnaduglaise.ie\/wp-content\/uploads\/2023\/09\/GND-Logo-Dark-1.png\",\"contentUrl\":\"https:\/\/gaelscoilnaduglaise.ie\/wp-content\/uploads\/2023\/09\/GND-Logo-Dark-1.png\",\"width\":400,\"height\":100,\"caption\":\"Gaelscoil na Duglaise\"},\"image\":{\"@id\":\"https:\/\/gaelscoilnaduglaise.ie\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"D\u00e9an teangmh\u00e1il - GND","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/","og_locale":"ga_IE","og_type":"article","og_title":"D\u00e9an teangmh\u00e1il - GND","og_description":"D\u00e9an teangmh\u00e1il linnBa bhre\u00e1 linn cloiste\u00e1il uait M\u00e1 t\u00e1 eolas ar leith uait, n\u00f3 m\u00e1 t\u00e1 n\u00edos m\u00f3 eolas faoin scoil uait, l\u00edon an fhoirm th\u00edos chun teangmh\u00e1il a dh\u00e9anamh linn.","og_url":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/","og_site_name":"GND","article_modified_time":"2023-09-26T15:23:43+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/","url":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/","name":"D\u00e9an teangmh\u00e1il - GND","isPartOf":{"@id":"https:\/\/gaelscoilnaduglaise.ie\/#website"},"datePublished":"2023-04-27T08:16:43+00:00","dateModified":"2023-09-26T15:23:43+00:00","breadcrumb":{"@id":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/#breadcrumb"},"inLanguage":"ga-IE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gaelscoilnaduglaise.ie\/ga\/glaoigh-orainn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gaelscoilnaduglaise.ie\/ga\/leathanach-baile\/"},{"@type":"ListItem","position":2,"name":"D\u00e9an teangmh\u00e1il"}]},{"@type":"WebSite","@id":"https:\/\/gaelscoilnaduglaise.ie\/#website","url":"https:\/\/gaelscoilnaduglaise.ie\/","name":"Gaelscoil na Duglaise","description":"Gaelscoil Na Duglaise","publisher":{"@id":"https:\/\/gaelscoilnaduglaise.ie\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gaelscoilnaduglaise.ie\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ga-IE"},{"@type":"Organization","@id":"https:\/\/gaelscoilnaduglaise.ie\/#organization","name":"Gaelscoil na Duglaise","url":"https:\/\/gaelscoilnaduglaise.ie\/","logo":{"@type":"ImageObject","inLanguage":"ga-IE","@id":"https:\/\/gaelscoilnaduglaise.ie\/#\/schema\/logo\/image\/","url":"https:\/\/gaelscoilnaduglaise.ie\/wp-content\/uploads\/2023\/09\/GND-Logo-Dark-1.png","contentUrl":"https:\/\/gaelscoilnaduglaise.ie\/wp-content\/uploads\/2023\/09\/GND-Logo-Dark-1.png","width":400,"height":100,"caption":"Gaelscoil na Duglaise"},"image":{"@id":"https:\/\/gaelscoilnaduglaise.ie\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/pages\/1034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":13,"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/pages\/1034\/revisions"}],"predecessor-version":[{"id":1516,"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/pages\/1034\/revisions\/1516"}],"wp:attachment":[{"href":"https:\/\/gaelscoilnaduglaise.ie\/ga\/wp-json\/wp\/v2\/media?parent=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}