Skip to content

Commit 565ea75

Browse files
authored
Merge pull request #9 from joomdev/dev
v1.5 released
2 parents 50b1419 + 5ff475a commit 565ea75

24 files changed

+130
-48
lines changed

assets/css/style.css

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/style.css.map

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/scss/mixins/_grid-framework.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
flex-grow: 1;
3838
max-width: 100%;
3939
}
40+
.jdscf-col#{$infix}-auto {
41+
flex: 0 0 auto;
42+
width: auto;
43+
max-width: 100%; // Reset earlier grid tiers
44+
}
4045
@for $i from 1 through $columns {
4146
.jdscf-col#{$infix}-#{$i} {
4247
@include make-col($i, $columns);

fields/help.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* @package JD Simple Contact Form
4+
* @author JoomDev https://www.joomdev.com
5+
* @copyright Copyright (C) 2009 - 2020 JoomDev.
6+
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
7+
*/
8+
// no direct access
9+
defined('_JEXEC') or die('Restricted access');
10+
11+
jimport('joomla.form.formfield');
12+
13+
class JFormFieldHelp extends JFormField {
14+
15+
protected $type = 'Help';
16+
17+
// getLabel() left out
18+
19+
public function getInput() {
20+
return '<a href="https://docs.joomdev.com/article/jd-simple-contact-form/" target="_blank" class="btn primary-btn"><span class="icon-question-sign" aria-hidden="true"></span> Help</a>';
21+
}
22+
}

forms/fielditem.xml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@
3131
<option value="hidden">MOD_JDSCF_TYPE_HIDDEN_LBL</option>
3232
</field>
3333
<field
34+
showon="type!:hidden"
35+
name="show_label"
36+
type="radio"
37+
label="MOD_JDSCF_SHOW_LABEL_LBL"
38+
description="MOD_JDSCF_SHOW_LABEL_DESC"
39+
class="btn-group btn-group-yesno"
40+
default="1"
41+
>
42+
<option value="1">JYES</option>
43+
<option value="0">JNO</option>
44+
</field>
45+
<field
46+
showon="show_label:1"
3447
name="label"
3548
type="text"
3649
filter="RAW"
@@ -45,18 +58,6 @@
4558
label="MOD_JDSCF_VALUE_LBL"
4659
description="MOD_JDSCF_VALUE_DESC"
4760
/>
48-
<field
49-
showon="type!:hidden"
50-
name="show_label"
51-
type="radio"
52-
label="MOD_JDSCF_SHOW_LABEL_LBL"
53-
description="MOD_JDSCF_SHOW_LABEL_DESC"
54-
class="btn-group btn-group-yesno"
55-
default="1"
56-
>
57-
<option value="1">JYES</option>
58-
<option value="0">JNO</option>
59-
</field>
6061
<field
6162
showon="type!:hidden"
6263
name="required"
@@ -87,9 +88,11 @@
8788
showon="type!:hidden"
8889
name="width"
8990
type="list"
91+
default="12"
9092
label="MOD_JDSCF_WIDTH_LBL"
9193
description="MOD_JDSCF_WIDTH_DESC"
9294
>
95+
<option value="auto">JGLOBAL_AUTO</option>
9396
<option value="12">12</option>
9497
<option value="10">10</option>
9598
<option value="9">9</option>

helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* @package JD Simple Contact Form
55
* @author JoomDev https://www.joomdev.com
6-
* @copyright Copyright (C) 2009 - 2019 JoomDev.
6+
* @copyright Copyright (C) 2009 - 2020 JoomDev.
77
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
88
*/
99
// no direct access

language/en-GB/en-GB.mod_jdsimplecontactform.ini

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,38 @@ MOD_JDSCF_EMAIL_BCC_DESC="BCC email address to recieve submissions. Use comma to
137137
MOD_JDSCF_EMAIL_TEMPLATE_LBL="Email Template"
138138
MOD_JDSCF_EMAIL_TEMPLATE_DESC="Select the email template, The <b>default</b> template lists all fields in the order they exist in <br><b>{field:label}: {field:value}</b></br> format."
139139

140+
; Months for Calendar
141+
MOD_JDSCF_JANUARY="January"
142+
MOD_JDSCF_FEBRUARY="February"
143+
MOD_JDSCF_MARCH="March"
144+
MOD_JDSCF_APRIL="April"
145+
MOD_JDSCF_MAY="May"
146+
MOD_JDSCF_JUNE="June"
147+
MOD_JDSCF_JULY="July"
148+
MOD_JDSCF_AUGUST="August"
149+
MOD_JDSCF_SEPTEMBER="September"
150+
MOD_JDSCF_OCTOBER="October"
151+
MOD_JDSCF_NOVEMBER="November"
152+
MOD_JDSCF_DECEMBER="December"
153+
154+
; Weekdays for Calendar
155+
MOD_JDSCF_MONDAY="Monday"
156+
MOD_JDSCF_TUESDAY="Tuesday"
157+
MOD_JDSCF_WEDNESDAY="Wednesday"
158+
MOD_JDSCF_THURSDAY="Thursday"
159+
MOD_JDSCF_FRIDAY="Friday"
160+
MOD_JDSCF_SATURDAY="Saturday"
161+
MOD_JDSCF_SUNDAY="Sunday"
162+
163+
; Short Weekdays for Calendar
164+
MOD_JDSCF_MON="MON"
165+
MOD_JDSCF_TUE="TUE"
166+
MOD_JDSCF_WED="WED"
167+
MOD_JDSCF_THUR="THUR"
168+
MOD_JDSCF_FRI="FRI"
169+
MOD_JDSCF_SAT="SAT"
170+
MOD_JDSCF_SUN="SUN"
171+
140172
; Single Email Fields
141173
MOD_JDSCF_SINGLE_SEND_COPY="Send Copy of Email"
142174
MOD_JDSCF_SINGLE_SEND_COPY_LBL_TITLE="Send me a copy"
@@ -170,7 +202,8 @@ MOD_JDSCF_DEFAULT_SUBJECT="New Submission"
170202

171203
MOD_JDSCF_TEXTAREA_ROWS_LBL="Rows"
172204
MOD_JDSCF_TEXTAREA_ROWS_DESC=""
173-
205+
MOD_JDSCF_CAPTCHA_TYPE_LBL="Captcha Type"
206+
MOD_JDSCF_CAPTCHA_TYPE_DESC="Select Type of Captcha"
174207
MOD_JDSCF_THANKYOU_DEFAULT="<div class='alert alert-success'>Thanks for reaching out!</div>"
175208
MOD_JDSCF_BAD_REQUEST="Bad Request"
176209
MOD_JDSCFEMAIL_SEND_ERROR="An error occurred while sending email."

layouts/emails/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* @package JD Simple Contact Form
44
* @author JoomDev https://www.joomdev.com
5-
* @copyright Copyright (C) 2009 - 2019 JoomDev.
5+
* @copyright Copyright (C) 2009 - 2020 JoomDev.
66
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
77
*/
88
// no direct access

layouts/field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* @package JD Simple Contact Form
44
* @author JoomDev https://www.joomdev.com
5-
* @copyright Copyright (C) 2009 - 2019 JoomDev.
5+
* @copyright Copyright (C) 2009 - 2020 JoomDev.
66
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
77
*/
88
// no direct access

layouts/fields/calendar.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* @package JD Simple Contact Form
44
* @author JoomDev https://www.joomdev.com
5-
* @copyright Copyright (C) 2009 - 2019 JoomDev.
5+
* @copyright Copyright (C) 2009 - 2020 JoomDev.
66
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
77
*/
88
// no direct access
@@ -48,7 +48,14 @@
4848
</div>
4949

5050
<?php
51-
$js = 'var jdscf_picker_' . $module->id . ' = new Pikaday({'
51+
52+
$js = 'var monthNames = [ "'. JText::_("MOD_JDSCF_JANUARY") .'", "'. JText::_("MOD_JDSCF_FEBRUARY") .'", "'. JText::_("MOD_JDSCF_MARCH") .'", "'. JText::_("MOD_JDSCF_APRIL") .'", "'. JText::_("MOD_JDSCF_MAY") .'", "'. JText::_("MOD_JDSCF_JUNE") .'", "'. JText::_("MOD_JDSCF_JULY") .'", "'. JText::_("MOD_JDSCF_AUGUST") .'", "'. JText::_("MOD_JDSCF_SEPTEMBER") .'", "'. JText::_("MOD_JDSCF_OCTOBER") .'", "'. JText::_("MOD_JDSCF_NOVEMBER") .'", "'. JText::_("MOD_JDSCF_DECEMBER") .'" ];';
53+
54+
$js .= 'var weekDays = [ "'. JText::_("MOD_JDSCF_MONDAY") .'", "'. JText::_("MOD_JDSCF_TUESDAY") .'", "'. JText::_("MOD_JDSCF_WEDNESDAY") .'", "'. JText::_("MOD_JDSCF_THURSDAY") .'", "'. JText::_("MOD_JDSCF_FRIDAY") .'", "'. JText::_("MOD_JDSCF_SATURDAY") .'", "'. JText::_("MOD_JDSCF_SUNDAY") .'" ];';
55+
56+
$js .= 'var shortWeekDays = [ "'. JText::_("MOD_JDSCF_MON") .'", "'. JText::_("MOD_JDSCF_TUE") .'", "'. JText::_("MOD_JDSCF_WED") .'", "'. JText::_("MOD_JDSCF_THUR") .'", "'. JText::_("MOD_JDSCF_FRI") .'", "'. JText::_("MOD_JDSCF_SAT") .'", "'. JText::_("MOD_JDSCF_SUN") .'" ];';
57+
58+
$js .= 'var jdscf_picker_' . $module->id . ' = new Pikaday({'
5259
. 'field: document.getElementById("' . $field->id . '")';
5360
if (isset($field->calendar_min) && !empty($field->calendar_min) && $field->calendar_min != '0000-00-00 00:00:00') {
5461
$js .= ',minDate: moment("' . $field->calendar_min . '").toDate()';
@@ -61,9 +68,13 @@
6168
} else {
6269
$js .= ',format: "MM-DD-YYYY"';
6370
}
64-
71+
$js .= ',i18n: {';
72+
$js .= 'months : monthNames,';
73+
$js .= 'weekdays : weekDays,';
74+
$js .= 'weekdaysShort: shortWeekDays';
75+
$js .= '}';
6576
$js .= ',defaultDate: moment("' . date('Y-m-d') . '").toDate(),setDefaultDate:true';
66-
6777
$js .= '});';
78+
6879
ModJDSimpleContactFormHelper::addJS($js, $module->id);
6980
?>

0 commit comments

Comments
 (0)