mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 11:14:24 +08:00
Merge pull request #5846 from sboursen-scinote/sb_SCI-8239
Save as new protocol template from task - read the protocol name [SCI-8239]
This commit is contained in:
commit
f44f083b0b
2 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,10 @@
|
|||
.on('shown.bs.modal', function() {
|
||||
$(`${protocolModal} #protocol_name`).parent().removeClass('error');
|
||||
$(`${protocolModal} #protocol_name`).val('');
|
||||
const protocolName = $(`a[data-target="${protocolModal}"]`).attr('data-protocol-name');
|
||||
if (protocolName) {
|
||||
$(this).find('.sci-input-field').val(protocolName);
|
||||
}
|
||||
$(this).find('.sci-input-field').focus();
|
||||
})
|
||||
.on('ajax:error', 'form', function(e, error) {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<a
|
||||
data-toggle="modal"
|
||||
data-target="#newProtocolModal"
|
||||
v-bind:data-protocol-name="protocol.attributes.name"
|
||||
:class="{ disabled: !protocol.attributes.urls.save_to_repo_url }"
|
||||
>
|
||||
<span class="fas fa-save"></span>
|
||||
|
|
Loading…
Reference in a new issue