mirror of https://github.com/gophish/gophish
Updating campaign datepicker format to match other date formats. Fixes #1288
parent
b4ff771b3a
commit
4ec9f07859
File diff suppressed because one or more lines are too long
|
@ -35,7 +35,7 @@ function launch() {
|
||||||
// Validate our fields
|
// Validate our fields
|
||||||
var send_by_date = $("#send_by_date").val()
|
var send_by_date = $("#send_by_date").val()
|
||||||
if (send_by_date != "") {
|
if (send_by_date != "") {
|
||||||
send_by_date = moment(send_by_date, "MM/DD/YYYY hh:mm a").utc().format()
|
send_by_date = moment(send_by_date, "MMMM Do YYYY, h:mm a").utc().format()
|
||||||
}
|
}
|
||||||
campaign = {
|
campaign = {
|
||||||
name: $("#name").val(),
|
name: $("#name").val(),
|
||||||
|
@ -49,7 +49,7 @@ function launch() {
|
||||||
smtp: {
|
smtp: {
|
||||||
name: $("#profile").select2("data")[0].text
|
name: $("#profile").select2("data")[0].text
|
||||||
},
|
},
|
||||||
launch_date: moment($("#launch_date").val(), "MM/DD/YYYY hh:mm a").utc().format(),
|
launch_date: moment($("#launch_date").val(), "MMMM Do YYYY, h:mm a").utc().format(),
|
||||||
send_by_date: send_by_date || null,
|
send_by_date: send_by_date || null,
|
||||||
groups: groups,
|
groups: groups,
|
||||||
}
|
}
|
||||||
|
@ -287,14 +287,16 @@ $(document).ready(function () {
|
||||||
"vertical": "bottom"
|
"vertical": "bottom"
|
||||||
},
|
},
|
||||||
"showTodayButton": true,
|
"showTodayButton": true,
|
||||||
"defaultDate": moment()
|
"defaultDate": moment(),
|
||||||
|
"format": "MMMM Do YYYY, h:mm a"
|
||||||
})
|
})
|
||||||
$("#send_by_date").datetimepicker({
|
$("#send_by_date").datetimepicker({
|
||||||
"widgetPositioning": {
|
"widgetPositioning": {
|
||||||
"vertical": "bottom"
|
"vertical": "bottom"
|
||||||
},
|
},
|
||||||
"showTodayButton": true,
|
"showTodayButton": true,
|
||||||
"useCurrent": false
|
"useCurrent": false,
|
||||||
|
"format": "MMMM Do YYYY, h:mm a"
|
||||||
})
|
})
|
||||||
// Setup multiple modals
|
// Setup multiple modals
|
||||||
// Code based on http://miles-by-motorcycle.com/static/bootstrap-modal/index.html
|
// Code based on http://miles-by-motorcycle.com/static/bootstrap-modal/index.html
|
||||||
|
|
Loading…
Reference in New Issue