Commit d211a72f authored by KR Moorhouse's avatar KR Moorhouse

Updated translation to include paragraph tags. Switched out jBox call with modal library instead.

parent a976c1ae
......@@ -114,8 +114,32 @@ define( [], function() {
*/
doDeleteFieldModal: function( e, dataModel ) {
// Build warning modal to warn user a losing all data related to field
var that = this;
var modalData = {
width: 450,
closeOnClick: false,
closeOnEsc: true,
content: nfi18n.fieldDataDeleteMsg,
btnPrimary: {
text: nfi18n.delete,
callback: function() {
// close and destory modal.
deleteModal.toggleModal( false );
deleteModal.destroy();
// proceed as normal, data will be deleted in backend on publish
that.clickDelete( e, dataModel );
}
},
btnSecondary: {
text: nfi18n.cancel,
callback: function() {
// close and destory modal
deleteModal.toggleModal( false );
deleteModal.destroy();
// set deleting to false so edit can work as normal
that.deleting = false;
}
}
};
var deleteModal = new NinjaModal( modalData );
// var message, container, messageBox, deleteMsgs, buttons, confirm, cancel, lineBreak;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -71,9 +71,7 @@ return apply_filters( 'ninja_forms_i18n_builder', array(
__( 'Fr', 'ninja-forms' ),
__( 'Sa', 'ninja-forms' )
),
'fieldDataDeleteMsg' => __( 'This will DELETE all data' .
' associated with this field. You will not be able to' .
' retrieve data for this field!' ),
'fieldDataDeleteMsg' => sprintf( __( '%sThis will DELETE all data associated with this field.%sYou will not be able to retrieve data for this field!%s' ), '<p>', '<br />', '</p>' ),
'delete' => __( 'Delete' ),
'cancel' => __( 'Cancel' ),
'valueChars' => __( 'In order to prevent errors, values may only contain'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment