Commit 296ef7e0 authored by KR Moorhouse's avatar KR Moorhouse

Merge branch '3962-advanced-tab-dev-mode-notice' into 'develop'

Add dev mode notice to Advanced Settings main content.

Closes #3962

See merge request !3824
parents e644dad7 e9aa231a
define( ['views/advanced/settingItem'], function( settingItem ) {
var view = Marionette.CollectionView.extend({
childView: settingItem
var view = Marionette.CompositeView.extend({
childView: settingItem,
template: '#tmpl-nf-advanced-main-content',
attachHtml: function( collectionView, childView ) {
jQuery( collectionView.el ).find( '.child-view-container' ).append( childView.el );
}
});
return view;
......
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.
......@@ -35,6 +35,17 @@
<div id="merge-tags-box"></div>
</script>
<script id="tmpl-nf-advanced-main-content" type="text/template">
<div>
<div class="child-view-container"></div>
<# if(1 != nfAdmin.devMode){ #>
<div style="clear:both;padding-top:100px;padding:20px;opacity:.5;text-align:center;">
For more technical features, <a href="<?php echo add_query_arg('page', 'nf-settings', admin_url('admin.php')); ?>#ninja_forms[builder_dev_mode]">enable Developer Mode</a>.
</div>
<# } #>
</div>
</script>
<!-- MERGE TAGS BOX TEMPLATES -->
<script id="tmpl-nf-merge-tag-box" type="text/template">
<div class="merge-tag-filter"></div>
......
<?php
$I = new AcceptanceTester( $scenario );
// Login to wp-admin
$I->loginAsAdmin();
$I->wantTo( 'see the Dev Mode notice in Advanced Settings' );
$I->amOnPage( '/wp-admin/admin.php?page=ninja-forms&form_id=1' );
$I->waitForText( 'Advanced' );
$I->click( 'Advanced' );
$I->waitForText( 'Display Settings' );
$I->waitForText( 'Restrictions' );
try{
$I->waitForText( 'Calculations' );
}catch(Exception $e){
$I->waitForText( 'For more technical features, enable Developer Mode.' );
}
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