PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | front/Params/article.php +0 -74 10.10.2 → 11.1.1 View file →
@@ -1,74 +1,0 @@
1 -<?php
2 -
3 -include_once __DIR__.DIRECTORY_SEPARATOR.'AcymJFormField.php';
4 -
5 -class JFormFieldArticle extends AcymJFormField
6 -{
7 - public function __construct($form = null)
8 - {
9 - $this->type = 'article';
10 - parent::__construct($form);
11 - }
12 -
13 - public function getInput()
14 - {
15 - $modalId = 'acym_article_'.$this->id;
16 - $callback = 'jSelectArticle_'.$this->id;
17 -
18 - $title = '';
19 - $value = intval($this->value);
20 - if (!empty($value)) {
21 - $title = acym_CMSArticleTitle($value);
22 - }
23 -
24 - acym_addScript(
25 - true,
26 - "
27 - function $callback(id, title, catid, object, url, language) {
28 - window.processModalSelect('Article', '".$this->id."', id, title, catid, object, url, language);
29 - toggle_$callback(id);
30 - jQuery('#".$modalId."').modal('hide');
31 - }
32 -
33 - function toggle_$callback(selection) {
34 - if (selection && selection > 0) {
35 - jQuery('#button_$modalId').hide();
36 - jQuery('#clear_$modalId').show();
37 - } else {
38 - jQuery('#".$this->id."_name').val('');
39 - jQuery('#".$this->id."_id').val('');
40 -
41 - jQuery('#button_$modalId').show();
42 - jQuery('#clear_$modalId').hide();
43 - }
44 - }
45 -
46 - jQuery(function($){
47 - toggle_$callback($value);
48 - });"
49 - );
50 -
51 - $html = '<span class="input-append">';
52 - $html .= '<input class="input-medium" id="'.$this->id.'_name" type="text" value="'.acym_escape($title).'" disabled="disabled" size="35" />';
53 - $urlSelect = acym_articleSelectionPage().'&function='.$callback;
54 - $html .= acym_cmsModal(
55 - true,
56 - $urlSelect,
57 - 'ACYM_SELECT',
58 - true,
59 - acym_translation('ACYM_SELECT_AN_ARTICLE'),
60 - $modalId
61 - );
62 - $html .= '<a id="clear_'.$modalId.'" class="btn hasTooltip" data-toggle="modal" role="button" onclick="toggle_'.$callback.'(0);">'.acym_translation('ACYM_CLEAR').'</a>';
63 - $html .= '</span>';
64 -
65 - $html .= '<input type="hidden" id="'.$this->id.'_id" name="'.$this->name.'" value="'.$value.'" />';
66 -
67 - return $html;
68 - }
69 -
70 - public function getLabel()
71 - {
72 - return str_replace($this->id, $this->id.'_id', parent::getLabel());
73 - }
74 -}