Projects STRLCPY gophish Commits 53537a22
🤬
  • Fix resource selection during campaign copy (#2482)

    Clear the selection of resource (template, page, profile) whenever the original
    resource is deleted and there is only one currently available resource present
    in the DB while copying a campaign. Without this fix, the only available
    resource is shown as the original resource, instead of showing [Deleted].
  • Loading...
  • Vivek Kekuda committed with GitHub 2 years ago
    53537a22
    1 parent 2b85a2bd
  • ■ ■ ■ ■ ■ ■
    static/js/src/app/campaigns.js
    skipped 256 lines
    257 257   .success(function (campaign) {
    258 258   $("#name").val("Copy of " + campaign.name)
    259 259   if (!campaign.template.id) {
     260 + $("#template").val("").change();
    260 261   $("#template").select2({
    261 262   placeholder: campaign.template.name
    262 263   });
    skipped 2 lines
    265 266   $("#template").trigger("change.select2")
    266 267   }
    267 268   if (!campaign.page.id) {
     269 + $("#page").val("").change();
    268 270   $("#page").select2({
    269 271   placeholder: campaign.page.name
    270 272   });
    skipped 2 lines
    273 275   $("#page").trigger("change.select2")
    274 276   }
    275 277   if (!campaign.smtp.id) {
     278 + $("#profile").val("").change();
    276 279   $("#profile").select2({
    277 280   placeholder: campaign.smtp.name
    278 281   });
    skipped 150 lines
Please wait...
Page is in error, reload to recover