| @@ -1,10 +1,13 @@ | ||
| 1 | +<?php | |
| 2 | +defined('ABSPATH') || die('Restricted Access'); | |
| 3 | +?> | |
| 1 | 4 | <div class="cell grid-x acym__content margin-bottom-1" id="acym__forms__information"> |
| 2 | 5 | <div class="cell"> |
| 3 | 6 | <div class="grid-x grid-margin-x margin-y"> |
| 4 | 7 | <div class="cell medium-6 grid-x acym_vcenter"> |
| 5 | 8 | <label for="acym__forms__information__name" class="cell medium-6 large-4"> |
| 6 | - <?php echo acym_translation('ACYM_FORM_NAME'); ?> | |
| 9 | + <?php echo esc_html(acym_translation('ACYM_FORM_NAME')); ?> | |
| 7 | 10 | </label> |
| 8 | 11 | <input type="text" id="acym__forms__information__name" class="cell large-5" name="form[name]" v-model="form.name"> |
| 9 | 12 | </div> |
| 10 | 13 | <?php if ($data['form']->type != 'shortcode') { ?> |
| @@ -9,45 +12,44 @@ | ||
| 9 | 12 | </div> |
| 10 | 13 | <?php if ($data['form']->type != 'shortcode') { ?> |
| 11 | 14 | <div class="cell medium-6 grid-x acym_vcenter"> |
| 12 | 15 | <label for="acym__forms__information__page" class="cell medium-6 large-4"> |
| 13 | - <?php echo acym_translation('ACYM_PAGE_SELECTION').acym_info('ACYM_PAGE_SELECTION_DESC'); ?> | |
| 16 | + <?php echo esc_html(acym_translation('ACYM_PAGE_SELECTION')); | |
| 17 | + acym_info(['textShownInTooltip' => 'ACYM_PAGE_SELECTION_DESC']); ?> | |
| 14 | 18 | </label> |
| 15 | 19 | <div class="cell medium-6"> |
| 16 | 20 | <select2multiple v-model="form.pages" |
| 17 | - :name="'form[pages]'" | |
| 18 | - :value="<?php echo acym_escape(json_encode($data['form']->pages)); ?>" | |
| 19 | - :options="<?php echo acym_escape(json_encode($data['all_pages'])); ?>"></select2multiple> | |
| 21 | + :name="'form[pages]'" | |
| 22 | + :value="<?php echo esc_attr(json_encode($data['form']->pages)); ?>" | |
| 23 | + :options="<?php echo esc_attr(json_encode($data['all_pages'])); ?>"></select2multiple> | |
| 20 | 24 | </div> |
| 21 | 25 | </div> |
| 22 | 26 | <?php } ?> |
| 23 | 27 | <div class="cell medium-6 grid-x acym_vcenter"> |
| 24 | 28 | <?php |
| 25 | - echo acym_switch( | |
| 26 | - 'form[active]', | |
| 27 | - $data['form']->active, | |
| 28 | - acym_translation('ACYM_ACTIVATED'), | |
| 29 | - [], | |
| 30 | - 'large-4 medium-6 small-9', | |
| 31 | - 'auto', | |
| 32 | - '', | |
| 33 | - null, | |
| 34 | - true, | |
| 35 | - 'v-model="form.active"' | |
| 36 | - ); | |
| 29 | + acym_switch([ | |
| 30 | + 'name' => 'form[active]', | |
| 31 | + 'value' => $data['form']->active, | |
| 32 | + 'label' => acym_translation('ACYM_ACTIVATED'), | |
| 33 | + 'attributes' => [ | |
| 34 | + 'v-model' => 'form.active', | |
| 35 | + ], | |
| 36 | + 'labelClass' => 'large-4 medium-6 small-9', | |
| 37 | + ]); | |
| 37 | 38 | ?> |
| 38 | 39 | </div> |
| 39 | 40 | <div class="cell medium-6 grid-x acym_vcenter"> |
| 40 | 41 | <label for="acym__forms__available__language" class="cell medium-6 large-4"> |
| 41 | - <?php echo acym_translation('ACYM_LANGUAGE_AVAILABLE').acym_info('ACYM_LANGUAGE_AVAILABLE_INFO'); ?> | |
| 42 | + <?php echo esc_html(acym_translation('ACYM_LANGUAGE_AVAILABLE')); | |
| 43 | + acym_info(['textShownInTooltip' => 'ACYM_LANGUAGE_AVAILABLE_INFO']); ?> | |
| 42 | 44 | </label> |
| 43 | 45 | |
| 44 | 46 | <div class="cell medium-6"> |
| 45 | 47 | <div class="cell medium-6"> |
| 46 | 48 | <select2multiple v-model="form['display_languages']" |
| 47 | - :name="'form[display_languages]'" | |
| 48 | - :value="<?php echo acym_escape(json_encode($data['form']->display_languages)); ?>" | |
| 49 | - :options="<?php echo acym_escape(json_encode($data['all_languages'])); ?>"></select2multiple> | |
| 49 | + :name="'form[display_languages]'" | |
| 50 | + :value="<?php echo esc_attr(json_encode($data['form']->display_languages)); ?>" | |
| 51 | + :options="<?php echo esc_attr(json_encode($data['all_languages'])); ?>"></select2multiple> | |
| 50 | 52 | </div> |
| 51 | 53 | </div> |
| 52 | 54 | </div> |
| 53 | 55 | <?php |
| @@ -52,12 +54,14 @@ | ||
| 52 | 54 | </div> |
| 53 | 55 | <?php |
| 54 | 56 | if ($data['form']->type == 'shortcode') { |
| 55 | 57 | echo '<div class="cell grid-x acym_vcenter">'; |
| 56 | - echo '<p class="cell shrink" v-if="!form.id"><i class="acymicon-exclamation-triangle acym__color__orange acym__forms__information__shortcode__warning margin-right-1"></i>'.acym_translation( | |
| 57 | - 'ACYM_PLEASE_SAVE_FORM_TO_GET_SHORTCODE' | |
| 58 | + echo '<p class="cell shrink" v-if="!form.id"><i class="acymicon-exclamation-triangle acym__color__orange acym__forms__information__shortcode__warning margin-right-1"></i>'.esc_html( | |
| 59 | + acym_translation( | |
| 60 | + 'ACYM_PLEASE_SAVE_FORM_TO_GET_SHORTCODE' | |
| 61 | + ) | |
| 58 | 62 | ).'</p>'; |
| 59 | - echo '<p class="cell shrink" v-if="form.id">'.acym_translation('ACYM_SHORTCODE_COPY_PASTE').'</p>'; | |
| 63 | + echo '<p class="cell shrink" v-if="form.id">'.esc_html(acym_translation('ACYM_SHORTCODE_COPY_PASTE')).'</p>'; | |
| 60 | 64 | echo '<code class="cell shrink acym__forms__information__shortcode margin-left-1" v-if="form.id">[acymailing_form_shortcode id="{{ form.id }}"]</code>'; |
| 61 | 65 | echo '</div>'; |
| 62 | 66 | } |
| 63 | 67 | ?> |