Skip to content

Commit 0c5edec

Browse files
committed
Textarea will retain line breaks and code refactored
2 parents 0eaab79 + 3effc94 commit 0c5edec

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,14 @@ MOD_JDSCF_THANKYOU_DEFAULT="Thank you."
144144
MOD_JDSCF_BAD_REQUEST="Bad Request"
145145
MOD_JDSCFEMAIL_SEND_ERROR="An error occurred while sending email."
146146
MOD_JDSCF_MODULE_NOT_FOUND="Module not found"
147+
<<<<<<< HEAD
147148
MOD_JDSCF_OPTIONS_CALENDAR_MIN_LBL="Min Date"
148149
MOD_JDSCF_OPTIONS_CALENDAR_MIN_DESC="The minimum/earliest date that can be selected"
149150
MOD_JDSCF_OPTIONS_CALENDAR_MAX_LBL="Max Date"
150151
MOD_JDSCF_OPTIONS_CALENDAR_MAX_DESC="The maximum/latest date that can be selected"
151152
MOD_JDSCF_OPTIONS_CALENDAR_DATE_FOMRAT_LBL="Date Format"
152-
MOD_JDSCF_OPTIONS_CALENDAR_DATE_FOMRAT_DESC="It will be used to format date input<br/><br/><table width="260" border="1" cellspacing="0"> <tr> <td>DD</td> <td>Day of the month, 2 digits with leading zeros</td> <td>01 to 31</td> </tr> <tr> <td>ddd</td> <td>A textual representation of a day, three letters</td> <td>Mon through Sun</td> </tr> <tr> <td>dddd</td> <td>A full textual representation of the day of the week</td> <td>Sunday through Saturday</td> </tr> <tr> <td>Do</td> <td>English ordinal suffix with the day of the month, 2 characters with date.</td> <td>st, nd, rd or th</td> </tr> <tr> <td>Do</td> <td>English ordinal suffix with the day of the month, 2 characters with date.</td> <td>01st, 02nd, 03rd or Nth</td> </tr> <tr> <td>MM</td> <td>Numeric representation of a month, with leading zeros</td> <td>01 through 12</td> </tr> <tr> <td>MMM</td> <td>A short textual representation of a month, three letters</td> <td>Jan through Dec</td> </tr> <tr> <td>MMMM</td> <td>A full textual representation of a month, such as January or March</td> <td>January through December</td> </tr> <tr> <td>YY</td> <td>A two digit representation of a year</td> <td>99 or 03</td> </tr> <tr> <td>YYYY</td> <td>A full numeric representation of a year, 4 digits</td> <td>1999 or 2003</td> </tr></table>"
153+
MOD_JDSCF_OPTIONS_CALENDAR_DATE_FOMRAT_DESC="It will be used to format date input<br/><br/><table width="260" border="1" cellspacing="0"> <tr> <td>DD</td> <td>Day of the month, 2 digits with leading zeros</td> <td>01 to 31</td> </tr> <tr> <td>ddd</td> <td>A textual representation of a day, three letters</td> <td>Mon through Sun</td> </tr> <tr> <td>dddd</td> <td>A full textual representation of the day of the week</td> <td>Sunday through Saturday</td> </tr> <tr> <td>Do</td> <td>English ordinal suffix with the day of the month, 2 characters with date.</td> <td>st, nd, rd or th</td> </tr> <tr> <td>Do</td> <td>English ordinal suffix with the day of the month, 2 characters with date.</td> <td>01st, 02nd, 03rd or Nth</td> </tr> <tr> <td>MM</td> <td>Numeric representation of a month, with leading zeros</td> <td>01 through 12</td> </tr> <tr> <td>MMM</td> <td>A short textual representation of a month, three letters</td> <td>Jan through Dec</td> </tr> <tr> <td>MMMM</td> <td>A full textual representation of a month, such as January or March</td> <td>January through December</td> </tr> <tr> <td>YY</td> <td>A two digit representation of a year</td> <td>99 or 03</td> </tr> <tr> <td>YYYY</td> <td>A full numeric representation of a year, 4 digits</td> <td>1999 or 2003</td> </tr></table>"
154+
=======
155+
MOD_JDSCF_MODULE_CUSTOM_CSS_LABEL="Module Custom CSS"
156+
MOD_JDSCF_MODULE_CUSTOM_CSS_DESC="Custom CSS can be used to style your module html tag."
157+
>>>>>>> 3effc9421d8e7c38e1e39f96ead69b22d1d55ac4

mod_jdsimplecontactform.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@
1515
$document->addStylesheet(JURI::root() . 'media/mod_jdsimplecontactform/assets/css/style.css?v=' . $document->getMediaVersion());
1616
$document->addStylesheet('//cdn.jsdelivr.net/npm/pikaday/css/pikaday.css');
1717

18+
// Adding custom css here
19+
20+
$custom_css = (explode(".",$params->get('custom_css')));
21+
22+
foreach($custom_css as $css){
23+
if($css){
24+
$style = '.jd-simple-contact-message-'.$module->id.' '.'.'.$css;
25+
}
26+
}
27+
28+
$document->addStyleDeclaration($style);
29+
1830
$layout = $params->get('layout', 'default');
1931
// Adding Module Class Suffix.
2032
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');

mod_jdsimplecontactform.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@
162162
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
163163
/>
164164

165+
<field
166+
name="custom_css"
167+
type="textarea"
168+
label="MOD_JDSCF_MODULE_CUSTOM_CSS_LABEL"
169+
description="MOD_JDSCF_MODULE_CUSTOM_CSS_DESC"
170+
rows="9"
171+
/>
172+
165173
<field
166174
name="moduleclass_sfx"
167175
type="textarea"

0 commit comments

Comments
 (0)