Public or private option for email rule in control panel
This commit is contained in:
parent
927ec5afc4
commit
c23ec71ad0
|
@ -671,7 +671,7 @@ function add_to_mailing_list {
|
||||||
$"List folder name:" 1 1 "" 1 35 26 25 \
|
$"List folder name:" 1 1 "" 1 35 26 25 \
|
||||||
$"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
|
$"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
|
||||||
$"List email address:" 3 1 "" 3 35 26 25 \
|
$"List email address:" 3 1 "" 3 35 26 25 \
|
||||||
$"Public:" 4 1 "yes" 4 35 4 25 \
|
$"Public:" 4 1 $"yes" 4 35 4 25 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -686,7 +686,7 @@ function add_to_mailing_list {
|
||||||
if [ ${#LIST_PUBLIC} -lt 1 ]; then
|
if [ ${#LIST_PUBLIC} -lt 1 ]; then
|
||||||
LIST_PUBLIC='no'
|
LIST_PUBLIC='no'
|
||||||
fi
|
fi
|
||||||
if [[ $LIST_PUBLIC == 'y' || $LIST_PUBLIC == 'Y' || $LIST_PUBLIC == 'true' || $LIST_PUBLIC == 'True' || $LIST_PUBLIC == 'yes' || $LIST_PUBLIC == 'Yes' || $LIST_PUBLIC == 'YES' ]]; then
|
if [[ $LIST_PUBLIC == $'y' || $LIST_PUBLIC == $'Y' || $LIST_PUBLIC == $'true' || $LIST_PUBLIC == $'True' || $LIST_PUBLIC == $'yes' || $LIST_PUBLIC == $'Yes' || $LIST_PUBLIC == $'YES' ]]; then
|
||||||
LIST_PUBLIC='yes'
|
LIST_PUBLIC='yes'
|
||||||
else
|
else
|
||||||
LIST_PUBLIC='no'
|
LIST_PUBLIC='no'
|
||||||
|
@ -730,9 +730,10 @@ function email_rule {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title $"Email rule for user $SELECTED_USERNAME" \
|
--title $"Email rule for user $SELECTED_USERNAME" \
|
||||||
--form "\n" 8 65 3 \
|
--form "\n" 9 65 4 \
|
||||||
$"When email arrives from address:" 1 1 "" 1 35 24 28 \
|
$"When email arrives from address:" 1 1 "" 1 35 24 28 \
|
||||||
$"Move to folder:" 2 1 "" 2 35 24 28 \
|
$"Move to folder:" 2 1 "" 2 35 24 28 \
|
||||||
|
$"Public:" 3 1 $"no" 3 35 4 25 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -741,7 +742,16 @@ function email_rule {
|
||||||
esac
|
esac
|
||||||
RULE_EMAIL=$(cat $data | sed -n 1p)
|
RULE_EMAIL=$(cat $data | sed -n 1p)
|
||||||
RULE_FOLDER=$(cat $data | sed -n 2p)
|
RULE_FOLDER=$(cat $data | sed -n 2p)
|
||||||
|
RULE_PUBLIC=$(cat $data | sed -n 3p)
|
||||||
|
|
||||||
|
if [ ${#RULE_PUBLIC} -lt 1 ]; then
|
||||||
|
RULE_PUBLIC='no'
|
||||||
|
fi
|
||||||
|
if [[ $RULE_PUBLIC == $'y' || $RULE_PUBLIC == $'Y' || $RULE_PUBLIC == $'true' || $RULE_PUBLIC == $'True' || $RULE_PUBLIC == $'yes' || $RULE_PUBLIC == $'Yes' || $RULE_PUBLIC == $'YES' ]]; then
|
||||||
|
RULE_PUBLIC='yes'
|
||||||
|
else
|
||||||
|
RULE_PUBLIC='no'
|
||||||
|
fi
|
||||||
if [ ${#RULE_EMAIL} -lt 2 ]; then
|
if [ ${#RULE_EMAIL} -lt 2 ]; then
|
||||||
dialog --title $"Add email rule" \
|
dialog --title $"Add email rule" \
|
||||||
--msgbox $"No email address was given" 6 40
|
--msgbox $"No email address was given" 6 40
|
||||||
|
@ -759,7 +769,7 @@ function email_rule {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${PROJECT_NAME}-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
|
${PROJECT_NAME}-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
|
||||||
-g "$RULE_FOLDER"
|
-g "$RULE_FOLDER" --public $RULE_PUBLIC
|
||||||
dialog --title $"Add email rule" \
|
dialog --title $"Add email rule" \
|
||||||
--msgbox $"Email rule for $RULE_EMAIL was added" 6 40
|
--msgbox $"Email rule for $RULE_EMAIL was added" 6 40
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue