Skip to content

Commit

Permalink
Merge pull request #16 from subhashuyadav/commit-1
Browse files Browse the repository at this point in the history
Basecamp related changes
  • Loading branch information
Nathan Porter authored Jun 20, 2016
2 parents 3f91d01 + a5e901d commit 089227f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
20 changes: 10 additions & 10 deletions includes/class-ukuupeople.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ function ukuuCRM_dashboard_setup() {
);
wp_add_dashboard_widget (
'ukuuCRM-dashboard-createactivity-widget',
__( 'Quick Add Touchpoint' ,'UkuuPeople' ),
__( 'Quick Add TouchPoint' ,'UkuuPeople' ),
array( $this, 'ukuuCRM_dashboard_createactivity_content' ),
$control_callback = null
);
Expand Down Expand Up @@ -796,7 +796,7 @@ function ukuu_custom_touchpoint_list( $post ) {
echo "<input type='hidden' value='$contact_id' name='hidden_cid'>";
$post_term = wp_get_post_terms( $post->ID, 'wp-type-activity-types', array("fields" => "names") );
$acttype = get_terms( 'wp-type-activity-types' ,'hide_empty=0' );
echo '<select name="touchpoint-list" id="touchpoint-list" class="postbox">';
echo '<select name="touchpoint-list" id="touchpoint-list" class="postbox form-control" required="">';
if( empty( $post_term ) ){
echo "<option value='' selected>".__( 'Select Touchpoint type', 'UkuuPeople' )."..</option>";
}
Expand Down Expand Up @@ -1021,19 +1021,19 @@ public static function ukuuCRM_dashboard_createactivity_content() {
<form name="quickaddform" enctype="multipart/form-data" method="post" id="quickAddform">
<table class="quickadd">
<tr>
<td class="quickadd-label"><?php _e('Contact', 'UkuuPeople') ?></td>
<td><input type="text" name="dname" placeholder="<?php _e('Start typing name', 'UkuuPeople') ?>"><input id="dcontact_id" type="hidden" name="contact_id"></td>
<td class="quickadd-label"><?php _e('Contact*', 'UkuuPeople') ?></td>
<td><input type="text" name="dname" required placeholder="<?php _e('Start typing name', 'UkuuPeople') ?>"><input id="dcontact_id" type="hidden" name="contact_id"></td>
</tr>

<tr>
<td class="quickadd-label"><?php _e('Subject', 'UkuuPeople') ?></td>
<td><input type="text" name="dsubject" placeholder="<?php _e('Enter subject', 'UkuuPeople') ?>"></td>
<td class="quickadd-label"><?php _e('Subject*', 'UkuuPeople') ?></td>
<td><input type="text" name="dsubject" required placeholder="<?php _e('Enter subject', 'UkuuPeople') ?>"></td>
</tr>

<tr>
<td class="quickadd-label"><?php _e('Type', 'UkuuPeople') ?></td>
<td><select name="dtype"><?php
echo "<option value='' selected>".__( 'Select Touchpoint type', 'UkuuPeople' )."..</option>";
<td class="quickadd-label"><?php _e('Type*', 'UkuuPeople') ?></td>
<td><select class="form-control" required="" name="dtype"><?php
echo "<option value='' selected>".__( 'Select TouchPoint type', 'UkuuPeople' )."..</option>";
foreach ($acttype as $key => $value ) {
echo "<option value=".$value->slug.">".$value->name."</option>";
}
Expand Down Expand Up @@ -1071,7 +1071,7 @@ public static function ukuuCRM_dashboard_createactivity_content() {

<tr>
<td class="quickadd-label"></td>
<td><input type="button" name="dassign" value="<?php _e('Click to select Assignee', 'UkuuPeople') ?>">
<td><input type="button" name="dassign" value="<?php _e('Click to Select Assignee', 'UkuuPeople') ?>">
<input type="text" id="touchpoint_assign_name_display" name="touchpoint_assign_name_display" style="display:none">
<input type="hidden" id="touchpoint_assign_id" name="touchpoint_assign_id"></td>
</tr>
Expand Down
13 changes: 13 additions & 0 deletions script/ukuucrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,16 @@ jQuery( '#graph' ).ready(function() {
.attr('class', 'y axis');
}
});

jQuery('.post-type-wp-type-activity #post').on('submit', function (e) {
var datavalue = jQuery('input[name="post_title"]').val();
if ( datavalue == "" ) {
jQuery('.errordesc').remove();
jQuery('<div class="errordesc">Please enter valid description</div>').insertAfter("#titlewrap");
jQuery('.errordesc').css('color','red');
return false;
} else{
jQuery('.errordesc').remove();
return true;
}
});

0 comments on commit 089227f

Please sign in to comment.