NIHVIVO-3445 template changes to use subjectName and propertyNameForDisplay; js change to ensure submit is disabled when there is no selected object in the autocomplete field
This commit is contained in:
parent
1982bda0ee
commit
900d069ed5
3 changed files with 17 additions and 9 deletions
|
@ -28,3 +28,6 @@ form.customForm h4 {
|
||||||
background: none;
|
background: none;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
.disabledSubmit {
|
||||||
|
cursor: default ! important;
|
||||||
|
}
|
||||||
|
|
|
@ -185,6 +185,7 @@ var customForm = {
|
||||||
}
|
}
|
||||||
//Disable submit button until selection made
|
//Disable submit button until selection made
|
||||||
this.button.attr('disabled', 'disabled');
|
this.button.attr('disabled', 'disabled');
|
||||||
|
this.button.addClass('disabledSubmit'); // tlw
|
||||||
},
|
},
|
||||||
|
|
||||||
// Bind event listeners that persist over the life of the page. Event listeners
|
// Bind event listeners that persist over the life of the page. Event listeners
|
||||||
|
@ -378,6 +379,7 @@ var customForm = {
|
||||||
if(this.supportEdit) {
|
if(this.supportEdit) {
|
||||||
//On initialization in this mode, submit button is disabled
|
//On initialization in this mode, submit button is disabled
|
||||||
this.button.removeAttr('disabled');
|
this.button.removeAttr('disabled');
|
||||||
|
this.button.removeClass('disabledSubmit'); // tlw
|
||||||
}
|
}
|
||||||
this.setButtonText('existing');
|
this.setButtonText('existing');
|
||||||
|
|
||||||
|
@ -411,7 +413,8 @@ var customForm = {
|
||||||
|
|
||||||
//Resetting so disable submit button again for object property autocomplete
|
//Resetting so disable submit button again for object property autocomplete
|
||||||
if(this.supportEdit) {
|
if(this.supportEdit) {
|
||||||
//this.button.attr('disabled', 'disabled');
|
this.button.attr('disabled', 'disabled');
|
||||||
|
this.button.addClass('disabledSubmit');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,13 @@
|
||||||
<#assign selectedObjectUri = ""/>
|
<#assign selectedObjectUri = ""/>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if editConfiguration.formTitle?contains("collaborator") >
|
||||||
|
<#assign formTitle = "Select an existing Collaborator for ${editConfiguration.subjectName}" />
|
||||||
|
<#else>
|
||||||
|
<#assign formTitle = editConfiguration.formTitle />
|
||||||
|
</#if>
|
||||||
|
|
||||||
<h2>${editConfiguration.formTitle}</h2>
|
<h2>${formTitle}</h2>
|
||||||
|
|
||||||
<#if editConfiguration.propertySelectFromExisting = true>
|
<#if editConfiguration.propertySelectFromExisting = true>
|
||||||
<#if rangeOptionsExist = true >
|
<#if rangeOptionsExist = true >
|
||||||
|
@ -34,11 +39,9 @@
|
||||||
<p>${editConfiguration.propertyPublicDescription}</p>
|
<p>${editConfiguration.propertyPublicDescription}</p>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#---This section should become autocomplete instead-->
|
<#---This section should become autocomplete instead-->
|
||||||
<p>
|
<p>
|
||||||
<label for="relatedIndLabel"> ${titleVerb} <span class='requiredHint'> *</span></label>
|
<label for="relatedIndLabel"> ${propertyNameForDisplay?capitalize} Name<span class='requiredHint'> *</span></label>
|
||||||
<input class="acSelector" size="50" type="text" id="relatedIndLabel" name="objectLabel" value="${objectLabel}" />
|
<input class="acSelector" size="50" type="text" id="relatedIndLabel" name="objectLabel" value="${objectLabel}" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -68,7 +71,7 @@
|
||||||
<p> There are no entries in the system from which to select. </p>
|
<p> There are no entries in the system from which to select. </p>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
<p> </p>
|
||||||
<#if editConfiguration.propertyOfferCreateNewOption = true>
|
<#if editConfiguration.propertyOfferCreateNewOption = true>
|
||||||
<#include "defaultOfferCreateNewOptionForm.ftl">
|
<#include "defaultOfferCreateNewOptionForm.ftl">
|
||||||
|
|
||||||
|
@ -102,7 +105,6 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customFormWithAutocomplete.css" />')}
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customFormWithAutocomplete.css" />')}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue