Clean code
This commit is contained in:
parent
6293f76692
commit
8adf1852b1
@ -1190,7 +1190,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
//Time Type
|
//Time Type
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("TimeType").'</td><td colspan="3">';
|
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("TimeType").'</td><td colspan="3">';
|
||||||
print $form->select_type_duration('offsetunit');
|
print $form->selectTypeDuration('offsetunit');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//Reminder Type
|
//Reminder Type
|
||||||
@ -1203,7 +1203,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
//Mail Model
|
//Mail Model
|
||||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
||||||
print $form->select_model_mail('actioncommsend', 'actioncomm_send');
|
print $form->selectModelMail('actioncommsend', 'actioncomm_send');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5673,35 +5673,27 @@ class Form
|
|||||||
return $retstring;
|
return $retstring;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
||||||
/**
|
/**
|
||||||
* select_type_duration
|
* selectTypeDuration
|
||||||
*
|
*
|
||||||
* @param string $prefix Prefix
|
* @param string $prefix Prefix
|
||||||
* @param string $selected Selected type
|
* @param string $selected Selected type
|
||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
*/
|
*/
|
||||||
public function select_type_duration($prefix, $selected = 'minute')
|
public function selectTypeDuration($prefix, $selected = 'minute')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$retstring = '';
|
|
||||||
|
|
||||||
$TDurationTypes = array('year'=>$langs->trans('Years'), 'month'=>$langs->trans('Month'), 'week'=>$langs->trans('Weeks'), 'day'=>$langs->trans('Days'), 'hour'=>$langs->trans('Hours'), 'minute'=>$langs->trans('Minutes'));
|
$TDurationTypes = array('year'=>$langs->trans('Years'), 'month'=>$langs->trans('Month'), 'week'=>$langs->trans('Weeks'), 'day'=>$langs->trans('Days'), 'hour'=>$langs->trans('Hours'), 'minute'=>$langs->trans('Minutes'));
|
||||||
|
|
||||||
$retstring .= '<select class="flat" id="select_'.$prefix.'type_duration" name="'.$prefix.'type_duration">';
|
$retstring = '<select class="flat" id="select_'.$prefix.'type_duration" name="'.$prefix.'type_duration">';
|
||||||
|
foreach ($TDurationTypes as $key=>$typeduration) {
|
||||||
foreach ($TDurationTypes as $key=>$typeduration){
|
|
||||||
|
|
||||||
$retstring .= '<option value="'.$key.'"';
|
$retstring .= '<option value="'.$key.'"';
|
||||||
if($key == $selected)
|
if ($key == $selected) {
|
||||||
{
|
|
||||||
$retstring .= " selected";
|
$retstring .= " selected";
|
||||||
}
|
}
|
||||||
$retstring .= ">".$typeduration."</option>";
|
$retstring .= ">".$typeduration."</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$retstring .= "</select>";
|
$retstring .= "</select>";
|
||||||
|
|
||||||
return $retstring;
|
return $retstring;
|
||||||
@ -7980,17 +7972,15 @@ class Form
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
||||||
/**
|
/**
|
||||||
* select_model_mail
|
* selectModelMail
|
||||||
*
|
*
|
||||||
* @param string $prefix Prefix
|
* @param string $prefix Prefix
|
||||||
* @param string $modelType Model type
|
* @param string $modelType Model type
|
||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
*/
|
*/
|
||||||
public function select_model_mail($prefix, $modelType = '')
|
public function selectModelMail($prefix, $modelType = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
|
||||||
global $langs, $db, $user;
|
global $langs, $db, $user;
|
||||||
|
|
||||||
$retstring = '';
|
$retstring = '';
|
||||||
|
|||||||
5
htdocs/security.txt
Normal file
5
htdocs/security.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Security policies of Dolibarr ERP CRM project
|
||||||
|
Contact: mailto:security@dolibarr.org
|
||||||
|
Preferred-Languages: en
|
||||||
|
Policy: https://github.com/Dolibarr/dolibarr/security/policy
|
||||||
|
Expires: Sat, 31 Dec 2050 00:00:00 GMT
|
||||||
Loading…
Reference in New Issue
Block a user