Commit 9a9fd7d4 authored by haystack's avatar haystack

show some love to the modal

parent bcb1f716
......@@ -49,9 +49,15 @@
padding: 15px 15px 0 15px;
}
.civicrm-modal-selector
{
padding: 0 0 15px 0;
}
.civicrm-modal-component-section,
.civicrm-modal-action-section-event,
.civicrm-modal-profile-mode-section
.civicrm-modal-profile-mode-section,
.civicrm-modal-content .hijack
{
padding: 15px 15px 0 15px;
}
......@@ -59,14 +65,12 @@
.civicrm-modal-hint
{
padding: 8px 0 0 0;
font-size: 11px;
font-style: italic;
color: #5A5A5A;
}
.civicrm-modal-content .hijack
{
padding: 8px 0 0 0;
line-height: 1.6;
}
......
......@@ -73,28 +73,39 @@ jQuery(function ($) {
$('#profile-section, #profile-mode-section').hide();
$('#event-section, #action-section-event').hide();
$('#petition-section').hide();
$('.hijack').show();
break;
case 'event':
$('#contribution-section').hide();
$('#profile-section, #profile-mode-section').hide();
$('#event-section, #component-section, #action-section-event').show();
$('#petition-section').hide();
$('.hijack').show();
break;
case 'profile':
$('#contribution-section, #component-section').hide();
$('#profile-section, #profile-mode-section').show();
$('#event-section, #action-section-event').hide();
$('#petition-section').hide();
$('.hijack').show();
break;
case 'user-dashboard':
$('#contribution-section, #event-section, #component-section, #action-section-event').hide();
$('#profile-section, #profile-mode-section').hide();
$('#petition-section').hide();
$('.hijack').show();
break;
case 'petition':
$('#contribution-section, #component-section').hide();
$('#profile-section, #profile-mode-section').hide();
$('#event-section, #action-section-event').hide();
$('#petition-section').show();
$('.hijack').show();
break;
default:
$('#contribution-section, #event-section, #component-section, #action-section-event').hide();
$('#profile-section, #profile-mode-section').hide();
$('.hijack').hide();
$('#petition-section').hide();
break;
}
......
......@@ -34,31 +34,32 @@
*/
// define title
$title = __( 'Please select a CiviCRM front-end page type.', 'civicrm' );
$title = __( 'Please select a CiviCRM front-end page type', 'civicrm' );
?>
<div id="civicrm_frontend_pages" style="display: none;">
<div class="wrap">
<div class="civicrm-wrap-inner">
<div>
<div class="civicrm-modal-header">
<h3><?php echo $title; ?></h3>
<span><?php echo $title; ?></span>
</div><!-- /.civicrm-modal-header -->
<div class="civicrm-modal-content">
<select id="add_civicomponent_id">
<option value=""><?php _e( 'Select a frontend element.', 'civicrm' ); ?></option>
<option value="contribution"><?php _e( 'Contribution Page', 'civicrm' ); ?></option>
<option value="event"><?php _e( 'Event Page', 'civicrm' ); ?></option>
<option value="profile"><?php _e( 'Profile', 'civicrm' ); ?></option>
<option value="user-dashboard"><?php _e( 'User Dashboard', 'civicrm' ); ?></option>
<option value="petition"><?php _e( 'Petition', 'civicrm' ); ?></option>
</select>
<div class="civicrm-modal-selector">
<select id="add_civicomponent_id">
<option value=""><?php _e( '-- Select a front-end element --', 'civicrm' ); ?></option>
<option value="contribution"><?php _e( 'Contribution Page', 'civicrm' ); ?></option>
<option value="event"><?php _e( 'Event Page', 'civicrm' ); ?></option>
<option value="profile"><?php _e( 'Profile', 'civicrm' ); ?></option>
<option value="user-dashboard"><?php _e( 'User Dashboard', 'civicrm' ); ?></option>
<option value="petition"><?php _e( 'Petition', 'civicrm' ); ?></option>
</select>
</div>
<span id="contribution-section" style="display: none;">
<div id="contribution-section" style="display: none;">
<select id="add_contributepage_id">
<?php
$contributionPages = $this->get_contribution_pages();
......@@ -68,9 +69,9 @@ $title = __( 'Please select a CiviCRM front-end page type.', 'civicrm' );
}
?>
</select>
</span>
</div>
<span id="event-section" style="display: none;">
<div id="event-section" style="display: none;">
<select id="add_eventpage_id">
<?php
$eventPages = $this->get_event();
......@@ -80,23 +81,23 @@ $title = __( 'Please select a CiviCRM front-end page type.', 'civicrm' );
}
?>
</select>
</span>
</div>
<span id="action-section-event" style="display: none;">
<div id="action-section-event" style="display: none;">
<div class="civicrm-modal-action-section-event">
<input type="radio" name="event_action" value="info" checked="checked" /> <?php _e( 'Event Info Page', 'civicrm' ); ?>
<input type="radio" name="event_action" value="register" /> <?php _e( 'Event Registration Page', 'civicrm' ); ?>
</div>
</span>
</div>
<span id="component-section" style="display: none;">
<div id="component-section" style="display: none;">
<div class="civicrm-modal-component-section">
<input type="radio" name="component_mode" value="live" checked="checked"/> <?php _e( 'Live Page', 'civicrm' ); ?>
<input type="radio" name="component_mode" value="test" /> <?php _e( 'Test Drive', 'civicrm' ); ?>
</div>
</span>
</div>
<span id="profile-section" style="display: none;">
<div id="profile-section" style="display: none;">
<select id="add_profilepage_id">
<?php
$profilePages = $this->get_profile_page();
......@@ -106,18 +107,18 @@ $title = __( 'Please select a CiviCRM front-end page type.', 'civicrm' );
}
?>
</select>
</span>
</div>
<span id="profile-mode-section" style="display: none;">
<div id="profile-mode-section" style="display: none;">
<div class="civicrm-modal-profile-mode-section">
<input type="radio" name="profile_mode" value="create" checked="checked"/> <?php _e( 'Create', 'civicrm' ); ?>
<input type="radio" name="profile_mode" value="edit" /> <?php _e( 'Edit', 'civicrm' ); ?>
<input type="radio" name="profile_mode" value="edit" /> <?php _e( 'View', 'civicrm' ); ?>
<input type="radio" name="profile_mode" value="search" /> <?php _e( 'Search/Public Directory', 'civicrm' ); ?>
</div>
</span>
</div>
<span id="petition-section" style="display: none;">
<div id="petition-section" style="display: none;">
<select id="add_petition_id">
<?php
$petitionPages = $this->get_petition();
......@@ -127,18 +128,18 @@ $title = __( 'Please select a CiviCRM front-end page type.', 'civicrm' );
}
?>
</select>
</span>
<div class="civicrm-modal-hint">
<?php _e( "Can't find your form? Make sure it is active.", 'civicrm' ); ?>
</div>
<div class="hijack">
<div class="hijack" style="display: none;">
<?php _e( 'If you only insert one shortcode, you can choose to override all page content with the content of the shortcode.', 'civicrm' ); ?><br/>
<input type="radio" name="hijack-page" value="1" checked="checked"/> <?php _e( 'Override page content', 'civicrm' ); ?>
<input type="radio" name="hijack-page" value="0" /> <?php _e( "Don't override", 'civicrm' ); ?>
<input type="radio" name="hijack-page" value="1" /> <?php _e( 'Override page content', 'civicrm' ); ?>
<input type="radio" name="hijack-page" value="0" checked="checked" /> <?php _e( "Don't override", 'civicrm' ); ?>
</div>
<div class="civicrm-modal-hint">
<span><?php _e( "Can't find your form? Make sure it is active.", 'civicrm' ); ?></span>
</div>
</div><!-- /.civicrm-modal-content -->
<div class="civicrm-modal-footer">
......@@ -146,6 +147,6 @@ $title = __( 'Please select a CiviCRM front-end page type.', 'civicrm' );
<a class="button" style="color:#bbb;" href="#" onclick="tb_remove(); return false;"><?php _e( 'Cancel', 'civicrm' ); ?></a>
</div><!-- /.civicrm-modal-footer -->
</div><!-- /.civicrm-wrap-inner -->
</div>
</div><!-- /.wrap -->
</div>
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