<commit_before>/**
 * The JazzeeEntityPageRecommenders type
  @extends JazzeePage
 */
function JazzeeEntityPageRecommenders(){}
JazzeeEntityPageRecommenders.prototype = new JazzeePage();
JazzeeEntityPageRecommenders.prototype.constructor = JazzeeEntityPageRecommenders;

/**
 * Create a new RecommendersPage with good default values
 * @param {String} id the id to use
 * @returns {RecommendersPage}
 */
JazzeeEntityPageRecommenders.prototype.newPage = function(id,title,classId,className,status,pageStore){
  var standardPageTypeId = pageStore.getPageType('JazzeeEntityPageStandard');
  var page = JazzeePage.prototype.newPage.call(this, id,title,classId,className,status,pageStore);
  page.setVariable('lorDeadline', null);
  page.setVariable('lorDeadlineEnforced', 0);
  page.setVariable('recommenderEmailText', "Dear %RECOMMENDER_FIRST_NAME% %RECOMMENDER_LAST_NAME%,\n"
      + "%APPLICANT_NAME% has requested a letter of recommendation from you in support of their application for admission to our program. \n"
      + "We use an online system to collect letters of recommendation.  You have been assigned a unique URL for accessing this system.  Please save this email so that you can return to your letter at a later date. \n"
      + "Click the following link to access the online system; or, you may need to copy and paste this link into your browser. \n"
      + "%LINK% \n");
  var recommendation = new JazzeeEntityPageStandard.prototype.newPage('newchildpage' + pageStore.getUniqueId(),'Recommendation',standardPageTypeId,'JazzeeEntityPageStandard','new',pageStore);
  page.addChild(recommendation);
  return page;
};

JazzeeEntityPageRecommenders.prototype.workspace = function(){
  JazzeePage.prototype.workspace.call(this);
  var pageClass = this;
  $('#workspace-right-top').append(this.selectListBlock('isRequired', 'This page is', {0:'Optional',1:'Required'}));
  $('#workspace-right-top').append(this.selectListBlock('answerStatusDisplay', 'Answer Status is', {0:'Not Shown',1:'Shown'}));
  
  var min = {0: 'No Minimum'};
  for(var i = 1; i<=20;i++){
    min[i] = i;
  }
  $('#workspace-right-top').append(this.selectListBlock('min','Minimum Recommenders Required:', min));
  var max = {0: 'No Maximum'};
  for(var i = 1; i<=20;i++){
    max[i] = i;
  }
  $('#workspace-right-top').append(this.selectListBlock('max','Maximum Recommenders Allows:', max));
  
  $('#workspace-right-top').append(this.textInputVariableBlock('lorDeadline', 'The deadine for submitting recommendations is ', 'the same as the application'));
  $('#workspace-right-top').append(this.selectListVariableBlock('lorDeadlineEnforced', 'The deadine for recommender is', {0:'Not Enforced',1:'Enforced'}));
  $('#workspace-right-top').append(this.recommendationPageBlock());
  $('#workspace-right-top').append(this.recommenderEmailBlock());
};

/**
 * Get the recommendation page (it is the first child)
 * @returns {ApplyPage}
 */
JazzeeEntityPageRecommenders.prototype.getRecommendationPage = function(){
  for (var firstId in this.children) break;
  return this.children[firstId];
};

/**
 * Edit the recommendation Page block
 * @returns {jQuery}
 */
JazzeeEntityPageRecommenders.prototype.recommendationPageBlock = function(){
  var pageClass = this;
  var p = $('<p>').addClass('edit lorPage').html('Edit Recommendation Page').bind('click',function(e){
    pageClass.getRecommendationPage().workspace();
    //get rid of the min/max/preview/delete controls
    $('#workspace-right-top').empty();
    $('#workspace-right-bottom').empty();<commit_msg>use blank string instead of false for lorDeadlineEnforced<commit_after>/**
 * The JazzeeEntityPageRecommenders type
  @extends JazzeePage
 */
function JazzeeEntityPageRecommenders(){}
JazzeeEntityPageRecommenders.prototype = new JazzeePage();
JazzeeEntityPageRecommenders.prototype.constructor = JazzeeEntityPageRecommenders;

/**
 * Create a new RecommendersPage with good default values
 * @param {String} id the id to use
 * @returns {RecommendersPage}
 */
JazzeeEntityPageRecommenders.prototype.newPage = function(id,title,classId,className,status,pageStore){
  var standardPageTypeId = pageStore.getPageType('JazzeeEntityPageStandard');
  var page = JazzeePage.prototype.newPage.call(this, id,title,classId,className,status,pageStore);
  page.setVariable('lorDeadline', null);
  page.setVariable('lorDeadlineEnforced', 0);
  page.setVariable('recommenderEmailText', "Dear %RECOMMENDER_FIRST_NAME% %RECOMMENDER_LAST_NAME%,\n"
      + "%APPLICANT_NAME% has requested a letter of recommendation from you in support of their application for admission to our program. \n"
      + "We use an online system to collect letters of recommendation.  You have been assigned a unique URL for accessing this system.  Please save this email so that you can return to your letter at a later date. \n"
      + "Click the following link to access the online system; or, you may need to copy and paste this link into your browser. \n"
      + "%LINK% \n");
  var recommendation = new JazzeeEntityPageStandard.prototype.newPage('newchildpage' + pageStore.getUniqueId(),'Recommendation',standardPageTypeId,'JazzeeEntityPageStandard','new',pageStore);
  page.addChild(recommendation);
  return page;
};

JazzeeEntityPageRecommenders.prototype.workspace = function(){
  JazzeePage.prototype.workspace.call(this);
  var pageClass = this;
  $('#workspace-right-top').append(this.selectListBlock('isRequired', 'This page is', {0:'Optional',1:'Required'}));
  $('#workspace-right-top').append(this.selectListBlock('answerStatusDisplay', 'Answer Status is', {0:'Not Shown',1:'Shown'}));
  
  var min = {0: 'No Minimum'};
  for(var i = 1; i<=20;i++){
    min[i] = i;
  }
  $('#workspace-right-top').append(this.selectListBlock('min','Minimum Recommenders Required:', min));
  var max = {0: 'No Maximum'};
  for(var i = 1; i<=20;i++){
    max[i] = i;
  }
  $('#workspace-right-top').append(this.selectListBlock('max','Maximum Recommenders Allows:', max));
  
  $('#workspace-right-top').append(this.textInputVariableBlock('lorDeadline', 'The deadine for submitting recommendations is ', 'the same as the application'));
  $('#workspace-right-top').append(this.selectListVariableBlock('lorDeadlineEnforced', 'The deadine for recommender is', {'':'Not Enforced',true:'Enforced'}));
  $('#workspace-right-top').append(this.recommendationPageBlock());
  $('#workspace-right-top').append(this.recommenderEmailBlock());
};

/**
 * Get the recommendation page (it is the first child)
 * @returns {ApplyPage}
 */
JazzeeEntityPageRecommenders.prototype.getRecommendationPage = function(){
  for (var firstId in this.children) break;
  return this.children[firstId];
};

/**
 * Edit the recommendation Page block
 * @returns {jQuery}
 */
JazzeeEntityPageRecommenders.prototype.recommendationPageBlock = function(){
  var pageClass = this;
  var p = $('<p>').addClass('edit lorPage').html('Edit Recommendation Page').bind('click',function(e){
    pageClass.getRecommendationPage().workspace();
    //get rid of the min/max/preview/delete controls
    $('#workspace-right-top').empty();
    $('#workspace-right-bottom').empty();
{'fraction_non_alphanumeric': 0.14297729184188393, 'fraction_numerical': 0.003924866834875245, 'mean_word_length': 5.795238095238095, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '527019', 'n_tokens_mistral': 2215, 'n_tokens_neox': 2149, 'n_words': 516}