diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index f4c9483..dadce9c 100644 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -423,8 +423,8 @@ class Invoice extends BaseController $params->number = (int)'919677462018'; $params->type = "text"; $params->message = $message; - $params->instance_id = '65C9B978325A2'; - $params->access_token = '65c715e797d16'; + $params->instance_id = $_ENV['WAAI_INSTANCE']; + $params->access_token = $_ENV['WAAI_TOKEN']; $whatsapp_result = $notification->sendWhatsAppMessage(SEND_WAAI_URL, "POST", $params); } catch (\Exception $e) { diff --git a/app/Models/NotificationModel.php b/app/Models/NotificationModel.php index 1679c64..73c3d04 100644 --- a/app/Models/NotificationModel.php +++ b/app/Models/NotificationModel.php @@ -7,7 +7,7 @@ class NotificationModel extends Model protected $table = 'templates'; protected $primaryKey = 'template_id'; // protected $allowedFields = ['invoice_id','invoice_number','donor_id','invoice_date','event_id','business_id','created_on','business_id']; - protected $allowedFields = ['template_name', 'subject', 'message','mode','crteated_on', 'created_by', 'updated_on', 'updated_by', 'isactive']; + protected $allowedFields = ['template_name', 'subject', 'message','mode','crteated_on', 'created_by', 'updated_on', 'updated_by', 'isactive','donor_id']; public function setCustomTable($tableName) { diff --git a/app/Views/campaign_creation_form.php b/app/Views/campaign_creation_form.php index 8adf5f5..f2ff8bf 100644 --- a/app/Views/campaign_creation_form.php +++ b/app/Views/campaign_creation_form.php @@ -38,13 +38,13 @@
- +
- +
- +
diff --git a/app/Views/notifications_form.php b/app/Views/notifications_form.php index bfb9e91..cfa5e9f 100644 --- a/app/Views/notifications_form.php +++ b/app/Views/notifications_form.php @@ -87,9 +87,9 @@
" id="myForm2">
- +
- +
@@ -105,9 +105,9 @@
- +
- +
@@ -150,17 +150,17 @@
- +
- +
- +
- @@ -169,16 +169,16 @@
- +
- +
@@ -257,8 +257,10 @@ // Determine which option is selected and show the corresponding fields const selectedOption = dropdown.value; if(selectedOption === "media"){ + $('#media_url').attr('required', 'required'); fieldsForMediaURL.style.display = "block"; } else { + $('#media_url').removeAttr('required'); fieldsForMediaURL.style.display = "none"; document.getElementById("media_url").value = ""; }